Communication method and device between terminals, computer equipment, readable storage medium and program product

By filtering the highest priority communication links and packet encapsulation in the communication network between terminal devices, the problem of instability of communication networks between terminal devices is solved, and the reliability and efficiency of communication is improved.

CN119520381APending Publication Date: 2025-02-25CHINA TELECOM CLOUD TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411646498.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The communication network between terminal devices in enterprise networks is prone to network instability or disconnection, resulting in low communication reliability.

Method used

When the first terminal sends a communication message to the second terminal, the communication link with the highest priority of message transmission is filtered out from the multiple candidate communication links, and the message is encapsulated based on the identification of the link. Gets the bandwidth value of the link, and if it is below the threshold, the message is transmitted through the link.

Benefits of technology

By filtering the highest priority communication link and performing message encapsulation, the reliability and efficiency of communication between terminals is improved, loop problems are avoided, and message transmission is ensured successfully when bandwidth is sufficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520381A_ABST
    Figure CN119520381A_ABST
Patent Text Reader

Abstract

The invention relates to an inter-terminal communication method and device, computer equipment, a readable storage medium and a program product, and relates to the technical field of communication. The method comprises the following steps: when a first terminal sends a communication message to a second terminal, screening out a first communication link with the highest message transmission priority from a plurality of candidate communication links between the first terminal and the second terminal; based on the first link identifier of the first communication link, performing message packaging on the communication message to obtain a first target message; and acquiring a bandwidth value of the first communication link, and transmitting the first target message to the second terminal through the first communication link under the condition that the bandwidth value is lower than a bandwidth threshold value. By adopting the method, the communication reliability between the terminals can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, apparatus, computer equipment, readable storage medium and program product for communication between terminals. Background Art

[0002] As the scale of enterprise networks continues to expand, enterprises will gradually deploy more and more terminal devices. In order to meet business needs and share resources, communication between terminal devices is necessary.

[0003] However, in actual applications, the communication network between the terminals may be unstable or even disconnected, which results in low reliability of communication between the terminals. Summary of the invention

[0004] Based on this, it is necessary to provide a terminal communication method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the reliability of terminal communication in response to the above technical problems.

[0005] In a first aspect, the present application provides a terminal-to-terminal communication method, including: when a first terminal sends a communication message to a second terminal, screening out a first communication link with the highest message transmission priority from multiple candidate communication links between the first terminal and the second terminal; based on a first link identifier of the first communication link, encapsulating the communication message to obtain a first target message; obtaining a bandwidth value of the first communication link, and when the bandwidth value is lower than a bandwidth threshold, transmitting the first target message to the second terminal through the first communication link.

[0006] In one of the embodiments, the method also includes: when the bandwidth value is not lower than the bandwidth threshold, screening out a second communication link with the highest message transmission priority other than the first communication link from multiple candidate communication links; based on the second link identifier of the second communication link, encapsulating the communication message to obtain a second target message; and transmitting the second target message to the second terminal through the second communication link.

[0007] In one of the embodiments, the process of determining the message transmission priority includes: transmitting the detection message in each candidate communication link respectively, and for each candidate communication link, obtaining multiple detection index values ​​of the candidate communication link during the transmission of the detection message; based on the multiple detection index values, performing link quality evaluation on the candidate communication link to obtain the link quality evaluation result of the candidate communication link; and determining the message transmission priority of each candidate communication link according to the link quality evaluation results.

[0008] In one of the embodiments, based on the first link identifier of the first communication link, the communication message is encapsulated to obtain the first target message, including: based on the first link identifier of the first communication link, creating a first identification message recording the first link identifier; encapsulating the communication message and the first identification message to obtain the first target message.

[0009] In one of the embodiments, the method also includes: receiving a response message returned by the second terminal to the communication message; the response message is generated after encapsulating the original message sent by the second terminal based on the first link identifier of the first communication link; and transmitting the response message to the first terminal through the first communication link.

[0010] In one of the embodiments, when a first terminal sends a communication message to a second terminal, a first communication link with the highest message transmission priority is screened out from a plurality of candidate communication links between the first terminal and the second terminal, including: when the first terminal sends a communication message to the second terminal, obtaining routing information of the communication message; performing routing matching based on the routing information to obtain a routing matching result; when the routing matching result indicates that the routing match is passed, screening out the first communication link with the highest message transmission priority from a plurality of candidate communication links between the first terminal and the second terminal.

[0011] In the second aspect, the present application also provides a terminal-to-terminal communication device, including: a link screening module, used to screen out a first communication link with the highest message transmission priority from multiple candidate communication links between the first terminal and the second terminal when a first terminal sends a communication message to a second terminal; a message encapsulation module, used to encapsulate the communication message based on the first link identifier of the first communication link to obtain a first target message; a communication module, used to obtain the bandwidth value of the first communication link, and when the bandwidth value is lower than the bandwidth threshold, transmit the first target message to the second terminal through the first communication link.

[0012] In a third aspect, the present application also provides a computer device, including a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program: when a first terminal sends a communication message to a second terminal, screening out a first communication link with the highest message transmission priority from a plurality of candidate communication links between the first terminal and the second terminal; based on a first link identifier of the first communication link, encapsulating the communication message to obtain a first target message; obtaining a bandwidth value of the first communication link, and when the bandwidth value is lower than a bandwidth threshold, transmitting the first target message to the second terminal through the first communication link.

[0013] In a fourth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the following steps when the computer program is executed by a processor: when a first terminal sends a communication message to a second terminal, screening out a first communication link with the highest message transmission priority from a plurality of candidate communication links between the first terminal and the second terminal; encapsulating the communication message based on a first link identifier of the first communication link to obtain a first target message; obtaining a bandwidth value of the first communication link, and when the bandwidth value is lower than a bandwidth threshold, transmitting the first target message to the second terminal through the first communication link.

[0014] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the following steps when executed by a processor: when a first terminal sends a communication message to a second terminal, screening out a first communication link with the highest message transmission priority from multiple candidate communication links between the first terminal and the second terminal; based on a first link identifier of the first communication link, encapsulating the communication message to obtain a first target message; obtaining a bandwidth value of the first communication link, and when the bandwidth value is lower than a bandwidth threshold, transmitting the first target message to the second terminal through the first communication link.

[0015] The above-mentioned inter-terminal communication method, device, computer equipment, computer-readable storage medium and computer program product configure multiple candidate communication links between the first terminal and the second terminal, which ensures that when one of the communication links is abnormal or disconnected, the communication between the terminals can be realized in time through other communication links. Therefore, when the first terminal sends a communication message to the second terminal, the first communication link with the highest message transmission priority, that is, the optimal link, can be screened out from the multiple candidate communication links to improve the efficiency of message transmission. In addition, in order to avoid the loop problem between multiple communication links, the present application will encapsulate the communication message based on the first link identifier of the first communication link, which helps to avoid the communication message from being repeatedly forwarded between multiple links, thereby reducing the possibility of loops. Finally, in order to further improve the reliability of inter-terminal communication, the present application will further obtain the bandwidth value of the first communication link. When the bandwidth value is lower than the bandwidth threshold, it means that there is sufficient capacity in the bandwidth to transmit the message at this time, so the first target message can be transmitted to the second terminal through the first communication link to realize the communication interaction between the first terminal and the second terminal. In summary, the present application can effectively improve the reliability of inter-terminal communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0017] FIG1 is a diagram of an application environment of a method for communication between terminals in one embodiment;

[0018] FIG2 is a schematic diagram of a flow chart of a method for communication between terminals in one embodiment;

[0019] FIG3 is a schematic diagram of a communication link in one embodiment;

[0020] FIG4 is a schematic diagram of a process for determining a second communication link in one embodiment;

[0021] FIG5 is a schematic diagram of a process of link quality assessment in one embodiment;

[0022] FIG6 is a schematic diagram of a process of message encapsulation in one embodiment;

[0023] FIG7 is a schematic diagram of encapsulating a message in one embodiment;

[0024] FIG8 is a schematic diagram of a process of sending a response message from a second terminal to a first terminal in one embodiment;

[0025] FIG9 is a schematic diagram of a process of route matching in one embodiment;

[0026] FIG10 is a schematic flow chart of a method for communication between terminals in a specific embodiment;

[0027] FIG11 is a schematic diagram of a communication link in a specific embodiment;

[0028] FIG12 is a schematic diagram of a scenario of a direct link in a specific embodiment;

[0029] FIG13 is a block diagram of a terminal-to-terminal communication device according to an embodiment;

[0030] FIG. 14 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0032] The terminal communication method provided in the embodiment of the present application can be applied to the SDWAN (Software-Defined Wide Area Network) as shown in FIG. 1. SDWAN is a network architecture based on software-defined network technology, which can realize network virtualization, automation and centralized management. The first terminal 102 and the second terminal 104 can both be EDGE (Edge Devices) in the SDWAN. The EDGE device is a key component of the SDWAN network, which is mainly deployed in key nodes such as various branches, data centers, headquarters or regional center agencies of the enterprise, and can provide connection services for multiple customer terminal devices or internal networks. In actual applications, there can be multiple EDGE devices in the SDWAN, and each EDGE device can be interconnected to realize business information sharing between each customer terminal. The control center 106 is the core of the SDWAN network, which is responsible for centralized management and control of the entire SDWAN network and the terminal devices in the network. The control center 106 can be connected to the first terminal 102 and the second terminal 104 respectively to manage and monitor the communication process between the first terminal 102 and the second terminal 104.

[0033] In one example, the control center 106 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0034] Specifically, when the first terminal 102 sends a communication message to the second terminal 104, the control center 106 of the SDWAN can first select the first communication link with the highest message transmission priority from the multiple candidate communication links between the first terminal 102 and the second terminal 104. Therefore, based on the first link identifier of the first communication link, the communication message is encapsulated to obtain the first target message. The control center 106 further obtains the bandwidth value of the first communication link, and when the bandwidth value is lower than the bandwidth threshold, the first target message is transmitted to the second terminal 104 through the first communication link to realize the communication between the first terminal 102 and the second terminal 104.

[0035] In an exemplary embodiment, as shown in FIG. 2 , a method for communication between terminals is provided, which is described by taking the method applied to the control center 106 of the SDWAN in FIG. 1 as an example, including:

[0036] Step S202: When the first terminal sends a communication message to the second terminal, a first communication link with the highest message transmission priority is screened out from a plurality of candidate communication links between the first terminal and the second terminal.

[0037] Among them, the message is a data unit exchanged and transmitted in the network, which contains the complete data information to be sent. The communication message in this embodiment may refer to the data information exchanged between terminals during the communication process. The first terminal and the second terminal can be any EDGE device in SDWAN. There may be multiple candidate communication links between the first terminal and the second terminal. The communication link may refer to the line for data transmission between the two terminals. The message transmission priority refers to the priority of the communication message in each candidate communication link. The highest message transmission priority indicates that the corresponding candidate communication link is the best. The candidate communication link can be used as the first communication link, that is, the communication message is transmitted through the first communication link first.

[0038] In one example, the candidate communication links between the first terminal and the second terminal may be in the form of direct links and indirect links. The direct link can be understood as a link that directly connects the first terminal and the second terminal, such as link 2 in Figure 3. The indirect link can be understood as a link between the first terminal and the second terminal that also has other indirect data points, such as link 1 in Figure 3. Link 1 indicates that the first terminal and the second terminal will communicate through the corresponding POP (Point of Presence) point. In the SDWAN network, the POP point refers to the devices arranged at various physical locations in the network. These devices are mainly responsible for connecting different geographical locations and providing network connection and transmission functions. It should be noted that in this embodiment, direct links and indirect links can exist at the same time. Of course, in actual applications, other forms of links can also be deployed between the terminals according to actual conditions.

[0039] Exemplarily, there may be multiple candidate communication links of different forms between the first terminal and the second terminal. When the first terminal sends a communication message that the client terminal needs to transmit to the second terminal, the control center of the SDWAN network will select the communication link with the highest message transmission priority from among the candidate communication links according to the message transmission priority corresponding to each candidate communication link, as the optimal link for transmitting the communication message.

[0040] In one example, the message transmission priority may be determined in advance by the control center according to the link quality of each candidate communication link.

[0041] Step S204: encapsulate the communication message based on the first link identifier of the first communication link to obtain a first target message.

[0042] It should be noted that, since direct links and indirect links can exist at the same time in this embodiment, loop problems are prone to occur. Loop problems refer to the phenomenon that data packets continuously circulate during transmission in the network and cannot reach the destination. Loop problems can cause network performance to degrade or even crash. Therefore, in order to avoid loop problems, this embodiment adopts a link marking method, that is, each communication link is marked, and the communication message passing through the communication link will also carry the link mark, so that the terminal can only learn the route through one communication link.

[0043] Among them, the first link identifier can be a unique identifier for the first communication link. The form of the link identifier is not limited, and it can be numbers, letters or other symbols. The communication message refers to the original message sent by the first terminal to the second terminal. The first target message refers to the message generated after the communication message is encapsulated. Message encapsulation generally refers to the process of encapsulating data information according to a certain format and specification. In this embodiment, it refers to the process of encapsulating the first link identifier into the communication message.

[0044] Exemplarily, after the control center selects the optimal first communication link, it can generate a unique link identifier for the first communication link and encapsulate the link identifier into the communication message sent by the first terminal, so that the communication message also carries the link identifier, thereby effectively avoiding loop problems.

[0045] Step S206: Acquire the bandwidth value of the first communication link, and when the bandwidth value is lower than the bandwidth threshold, transmit the first target message to the second terminal through the first communication link.

[0046] Among them, the bandwidth value may refer to the bandwidth value actually used by the first communication link. It is understandable that in order to improve the reliability of communication between terminals, in addition to selecting the optimal link for data transmission, it is also necessary to ensure that there is a surplus of bandwidth. Sufficient bandwidth surplus can ensure that the network can still maintain a high transmission speed and stability during network peak or burst traffic, thereby further ensuring the reliability of communication between terminals. The bandwidth threshold may be a reference value set in advance for the link bandwidth. When it is lower than the threshold, it means that there is sufficient surplus bandwidth in the communication link for message transmission. When it is not lower than the threshold, it means that there is not enough surplus bandwidth in the communication link, and it is necessary to select other communication links for message transmission. In one example, the bandwidth threshold can be set based on the bandwidth required for the interaction between the first terminal and the second terminal, that is, the first terminal sends a communication message to the second terminal, and the second terminal also returns a response message, which is achieved through the same communication link, so the total bandwidth required for the communication message and the response message can be calculated, and a bandwidth threshold is generated based on this total bandwidth value to ensure that the communication link can transmit the response message to the first terminal on the basis of transmitting the communication message to the second terminal, thereby improving the reliability of communication between terminals.

[0047] Exemplarily, after completing the message encapsulation, the control center can further detect the bandwidth value currently used by the first communication link. If it is lower than the preset bandwidth threshold, it means that the first communication link has sufficient remaining bandwidth for message transmission, and the control center can transmit the first target message to the second terminal through the first communication link. If it is not lower than the preset bandwidth threshold, it means that the first communication link does not have sufficient remaining bandwidth, and it is necessary to select other communication links for message transmission.

[0048] In this embodiment, multiple candidate communication links are configured between the first terminal and the second terminal, which ensures that when one of the communication links is abnormal or disconnected, the communication between the terminals can be realized in time through other communication links. Therefore, when the first terminal sends a communication message to the second terminal, the first communication link with the highest message transmission priority, that is, the optimal link, can be screened out from the multiple candidate communication links to improve the efficiency of message transmission. In addition, in order to avoid the loop problem between multiple communication links, this embodiment will encapsulate the communication message based on the first link identifier of the first communication link, which helps to avoid the communication message from being repeatedly forwarded between multiple links, thereby reducing the possibility of loops. Finally, in order to further improve the reliability of communication between terminals, this embodiment will further obtain the bandwidth value of the first communication link. When the bandwidth value is lower than the bandwidth threshold, it means that there is sufficient capacity in the bandwidth to transmit the message at this time, so the first target message can be transmitted to the second terminal through the first communication link to realize the communication interaction between the first terminal and the second terminal. In summary, this embodiment can effectively improve the reliability of communication between terminals.

[0049] In an exemplary embodiment, as shown in FIG4 , the inter-terminal communication method further includes:

[0050] Step S402: When the bandwidth value is not lower than the bandwidth threshold, a second communication link having the highest message transmission priority except the first communication link is selected from a plurality of candidate communication links.

[0051] The second communication link refers to a candidate communication link with the highest message transmission priority among multiple candidate communication links except the first communication link.

[0052] For example, when the bandwidth value of the first communication link is not less than the bandwidth threshold, it means that the first communication link does not have enough remaining bandwidth to transmit the communication message, so other communication links need to be selected. That is, the control center will select the second communication link with the highest message transmission priority from multiple candidate communication links except the first communication link.

[0053] Step S404: encapsulate the communication message based on the second link identifier of the second communication link to obtain a second target message.

[0054] The second link identifier may be a unique identifier for the second communication link, and each communication link may have a one-to-one corresponding unique identifier. The second target message refers to a message generated after the second link identifier is encapsulated into the communication message.

[0055] For example, when the communication link is changed, the link identifier will naturally be changed, so the communication message will be re-encapsulated. That is, the control center will also generate a unique link identifier for the second communication link and encapsulate the link identifier into the communication message.

[0056] Step S406: Transmit the second target message to the second terminal via the second communication link.

[0057] Exemplarily, after encapsulating the second target message, the control center also needs to perform bandwidth detection on the second communication link. This embodiment describes the situation where the second communication link has sufficient remaining bandwidth. At this time, the control center can directly transmit the second target message to the second terminal through the second communication link. Of course, if the second communication link does not have sufficient remaining bandwidth, the control center will continue to look for the next optimal communication link.

[0058] In one example, in addition to changing the link when the bandwidth of the first communication link is insufficient, when the first communication link fails or is disconnected during message transmission, the control center can also promptly replace other communication links and retransmit the message.

[0059] In this embodiment, when there is not enough remaining bandwidth in the first communication link, the next optimal communication link is automatically selected for message transmission to ensure that the communication message can be successfully transmitted to the second terminal, improve the reliability of communication between terminals, and achieve traffic load balancing.

[0060] In an exemplary embodiment, as shown in FIG5 , the process of determining the message transmission priority includes:

[0061] Step S502: The detection message is transmitted in each candidate communication link respectively, and for each candidate communication link, a plurality of detection indicator values ​​of the candidate communication link in the process of transmitting the detection message are obtained.

[0062] Among them, the detection message may refer to a test message used to detect the quality of the candidate communication link. It is understandable that when creating each candidate communication link, the detection message can be used to detect the link quality of each candidate communication link. The detection index value refers to the specific value of each detection index, and of course it can also be the level of the detection index. The detection index refers to an indicator for evaluating the link quality, which may include but is not limited to packet loss rate, delay, jitter, etc.

[0063] For example, when creating each candidate communication link, the control center can generate multiple test messages for detecting the quality of the candidate communication link through a link monitoring module. These test messages are transmitted in each candidate communication link respectively, and the link monitoring module can detect the packet loss rate, delay, jitter, etc. of each candidate communication link during the transmission process.

[0064] Step S504: Based on the multiple detection indicator values, link quality evaluation is performed on the candidate communication link to obtain a link quality evaluation result of the candidate communication link.

[0065] The link quality evaluation refers to the process of evaluating the quality of the candidate communication link. The link quality evaluation result can be used to characterize the link quality of the candidate communication link, which can be a specific value or a quality level.

[0066] Exemplarily, after monitoring the packet loss rate, delay, jitter and other indicator values ​​of each candidate communication link, the link monitoring module can calculate a value representing the link quality based on these indicator values.

[0067] For example, assuming that the delay of the candidate communication link is x, when x≤50 milliseconds, the delay level X of the candidate communication link can be 100, when 50 milliseconds<x≤150 milliseconds, the calculation expression of the delay level X can be: 60+40*(150-x) / 100, when 150 milliseconds<x≤400 milliseconds, the calculation expression of the delay level X can be: 60-60*(x-150) / 250, and when x>400 milliseconds, the delay level X can be 0. Assume that the packet loss rate of the candidate communication link is y, when y≤0.01, the packet loss level Y of the candidate communication link can be 100, when 0.01<y≤0.05, the calculation expression of the packet loss level Y can be: 60+40*(0.05-y) / 0.04, when 0.05<y≤0.1, the calculation expression of the packet loss level Y can be: 60-60*(y-0.05) / 0.95, when y>0.1, the packet loss level Y can be 0. Assuming that the jitter of the candidate communication link is z, when z≤80, the jitter level Z of the candidate communication link can be 100, when 80<z≤300, the calculation expression of the jitter level Z can be: 60+40*(300-z) / 220, when 300<z≤500, the calculation expression of the jitter level Z can be: 60-60*(z-300) / 200, when z>500, the jitter level Z can be 0. Finally, based on the delay level X, the packet loss rate level Y and the jitter level Z, the link quality Q is calculated, and the calculation formula can be: Q=(X*0.25+Y*0.5+Z*0.25) / 10, where 0.25, 0.5, and 0.25 are the weights of delay, packet loss rate, and jitter, respectively, which can be set according to actual conditions, and 10 is a normalized value. It should be noted that when the packet loss rate is equal to 1, it means that the packet loss rate is extremely high and the network condition is very poor, and the link quality Q can be directly considered to be zero.

[0068] Step S506: Determine the message transmission priority of each candidate communication link according to the link quality evaluation results.

[0069] Exemplarily, after calculating the link quality value of each candidate communication link, the link monitoring module can set the corresponding message transmission priority. The higher the link quality value, the better the quality of the communication link, and the higher the message transmission priority can be set. Conversely, the lower the link quality value, the worse the quality of the communication link, and the lower the message transmission priority can be set.

[0070] In this embodiment, the link quality of each candidate communication link is calculated based on multiple detection index values, thereby improving the accuracy of the link quality evaluation result. According to the link quality evaluation result, a suitable message transmission priority is configured for each candidate communication link, thereby improving the accuracy of the message transmission priority. Thus, the reliability of communication between terminals is improved.

[0071] In an exemplary embodiment, as shown in FIG6 , based on the first link identifier of the first communication link, encapsulating the communication message to obtain the first target message includes:

[0072] Step S602: Create a first identification message recording the first link identification based on the first link identification of the first communication link.

[0073] The first identification message may refer to a message recording the first link identification.

[0074] Exemplarily, when performing message encapsulation, the control center may first create a message including a link identifier of the first communication link, and then perform subsequent message encapsulation based on the message.

[0075] Step S604: encapsulate the communication message and the first identification message to obtain a first target message.

[0076] The first target message may refer to a message obtained by encapsulating the communication message and the first identification message.

[0077] It should be noted that each communication link can be established based on IPsec (Internet Protocol Security), so each communication link will perform IPsec encryption encapsulation on all communication messages to obtain an IPsec message. The message body of the IPsec message can be the first target message obtained by encapsulating the communication message and the first identification message, as shown in Figure 7.

[0078] Exemplarily, after the control center generates the first identification message, it can encapsulate the communication message and the first identification message to obtain the first target message. Then the first communication link will also perform IPsec encryption and encapsulation on the first target message, and the generated IPsec message will be transmitted to the second terminal.

[0079] It is understandable that, for the second communication link or even other communication links, when encapsulating the communication message, the encapsulation steps are the same as those for the first communication link, except that the identification message is different.

[0080] In this embodiment, a corresponding identification message is created based on the link identifier, thereby performing message encapsulation, avoiding loop problems, and improving the reliability of communication between terminals.

[0081] In an exemplary embodiment, as shown in FIG8 , the inter-terminal communication method further includes:

[0082] Step S802: Receive a response message returned by the second terminal to the communication message.

[0083] Among them, the response message is generated after encapsulating the original message sent by the second terminal based on the first link identifier of the first communication link. The original message refers to the message in which the second terminal responds to the communication message. It should be noted that after the communication message reaches the second terminal, the second terminal will record the link identifier in the communication message, and when replying the message, it will also encapsulate the original message based on the link identifier to obtain a response message. In other words, the link identifier of the response message is the same as the link identifier of the communication message.

[0084] Exemplarily, after receiving the communication message initiated by the first terminal, the second terminal will respond accordingly and generate an original message containing reply information. Since the second terminal will record the link identifier of the communication message, the second terminal will also encapsulate the link identifier into the original message to generate a response message.

[0085] Step S804: Transmit the response message to the first terminal via the first communication link.

[0086] Exemplarily, when the second terminal sends a response message to the first terminal, the control center sends the response message to the first terminal via the communication link corresponding to the link identifier. It should be noted that the communication link of the communication message and the response message is the same, and the first communication link is used as an example here, which does not mean that the response message can only be transmitted to the first terminal via the first communication link.

[0087] In this embodiment, when the second terminal sends a response message to the first terminal for the communication message, it also encapsulates the message based on the link identifier corresponding to the communication message, so as to achieve the purpose of homology and tracing, and further improve the reliability of communication between terminals.

[0088] In an exemplary embodiment, as shown in FIG9 , when a first terminal sends a communication message to a second terminal, a first communication link with the highest message transmission priority is screened out from a plurality of candidate communication links between the first terminal and the second terminal, including:

[0089] Step S902: When the first terminal sends a communication message to the second terminal, the routing information of the communication message is obtained.

[0090] Routing information may refer to the path information of the communication message from the sending point to the destination during the network transmission process. Specifically, routing information is the path guidance based on which the message is forwarded in the network, which ensures that the message can be correctly routed to the target address. Routing information may include but is not limited to the target address, that is, the terminal address of the second terminal, routing protocol, routing strategy, etc.

[0091] Exemplarily, when the first terminal sends a communication message to the second terminal, the control center first needs to obtain routing information of the communication message to perform routing matching.

[0092] Step S904: perform route matching based on the route information to obtain a route matching result.

[0093] The route matching result can be used to indicate whether the route matching is passed, or whether there is a route matching the communication message.

[0094] Exemplarily, the control center can perform route matching according to the route information of the communication message, that is, query whether there is a route matching the communication message, thereby obtaining a route matching result.

[0095] Step S906: When the route matching result indicates that the route matching is passed, a first communication link with the highest message transmission priority is selected from a plurality of candidate communication links between the first terminal and the second terminal.

[0096] Exemplarily, when the route matching result indicates that the route matching is passed, it means that there is a route matching the communication message in the network, and the control center can select the first communication link with the highest message transmission priority from the multiple candidate communication links between the first terminal and the second terminal to transmit the message. When the route matching result indicates that the route matching is not passed, it means that there is no route matching the communication message in the network, and the communication message is discarded.

[0097] In this embodiment, route matching is used to query whether there is a route matching the communication message in the network. If so, the message is transmitted; if not, the message is discarded, thereby effectively improving the reliability of communication between terminals.

[0098] In a specific embodiment, as shown in FIG10 , the process of the inter-terminal communication method is as follows:

[0099] S1: When EDGE device 1 sends a communication message to EDGE device 2, the routing information of the communication message is obtained.

[0100] S2: Check whether there is a route matching the communication message.

[0101] S3: If it does not exist, discard the communication message.

[0102] S4: If it exists, select the first communication link with the highest message transmission priority from the multiple candidate communication links between EDGE device 1 and EDGE device 2. The process of determining the message transmission priority includes: transmitting the detection message in each candidate communication link respectively, and obtaining the packet loss rate, delay, and jitter of the candidate communication link in the process of transmitting the detection message for each candidate communication link. Based on the packet loss rate, delay, and jitter, the link quality of the candidate communication link is evaluated to obtain the link quality evaluation value of the candidate communication link. The larger the link quality value, the higher the message transmission priority. For example, in Figure 11, the link quality evaluation value of link 1 is 100, and the link quality evaluation value of link 2 is 50, then link 1 is used as the first communication link.

[0103] S5: Based on the first link identifier of the first communication link, create a first identification message recording the first link identifier. Still referring to Figure 11, the link identifier of link 1 is 1, and the link identifier of link 2 is 2. Encapsulate the communication message and the first identification message to obtain a first target message.

[0104] S6: Determine whether the bandwidth value of the first communication link is lower than a bandwidth threshold.

[0105] S7: If yes, the first target message is transmitted to EDGE device 2 via the first communication link.

[0106] S8: If not, select a second communication link with the highest message transmission priority from the plurality of candidate communication links except the first communication link, and return to step S5.

[0107] When EDGE device 2 sends a response message to EDGE device 1 for a communication message, EDGE device 2 will encapsulate the original message based on the link identifier of the communication link corresponding to the communication message to obtain a response message, which is then transmitted to EDGE device 1 through the communication link corresponding to the communication message.

[0108] Taking the scenario of a direct link as an example, as shown in Figure 12, client terminal 1 sends a communication message to EDGE device 1. After route matching, message encapsulation based on link identifier, and IPsec encapsulation, a final message is obtained and sent to EDGE device 2. EDGE device 2 performs IPsec decapsulation on the final message, and then decapsulates the identifier message to obtain the communication message. EDGE device 2 will record the corresponding relationship between the link identifier and the communication message. After the communication message is sent to client terminal 2, when the reply message of client terminal 2 passes through EDGE device 2, EDGE device 2 queries the corresponding link identifier and encapsulates it, and then performs IPsec encapsulation, and finally sends it to EDGE device 1. EDGE device 1 decapsulates it to obtain the reply message and sends it to client terminal 1, thus completing the communication interaction between the terminals.

[0109] In this embodiment, multiple candidate communication links are configured between EDGE device 1 and EDGE device 2, which ensures that when one of the communication links is abnormal or disconnected, the communication between the terminals can be realized in time through other communication links. Therefore, when EDGE device 1 sends a communication message to EDGE device 2, the first communication link with the highest message transmission priority, i.e., the optimal link, can be screened out from the multiple candidate communication links to improve the efficiency of message transmission. In addition, in order to avoid the loop problem between multiple communication links, this embodiment will encapsulate the communication message based on the first link identifier of the first communication link, which helps to avoid the communication message being repeatedly forwarded between multiple links, thereby reducing the possibility of loops. Finally, in order to further improve the reliability of communication between EDGE terminals, this embodiment will further obtain the bandwidth value of the first communication link. When the bandwidth value is lower than the bandwidth threshold, it means that there is sufficient capacity to transmit the message at this time. Therefore, the first target message can be transmitted to the second terminal through the first communication link to realize the communication interaction between EDGE device 1 and EDGE device 2. In summary, this embodiment can effectively improve the reliability of communication between EDGE terminals.

[0110] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0111] Based on the same inventive concept, the embodiment of the present application also provides a terminal communication device for implementing the terminal communication method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more terminal communication device embodiments provided below can refer to the above limitations on the terminal communication method, which will not be repeated here.

[0112] In an exemplary embodiment, as shown in FIG13 , a terminal-to-terminal communication device is provided, including: a link screening module 1302, for screening out a first communication link with the highest message transmission priority from a plurality of candidate communication links between the first terminal and the second terminal when a first terminal sends a communication message to a second terminal; a message encapsulation module 1304, for encapsulating the communication message based on a first link identifier of the first communication link to obtain a first target message; a communication module 1306, for acquiring a bandwidth value of the first communication link, and transmitting the first target message to the second terminal via the first communication link when the bandwidth value is lower than a bandwidth threshold.

[0113] In one of the embodiments, the device is also used to: when the bandwidth value is not lower than the bandwidth threshold, screen out a second communication link with the highest message transmission priority other than the first communication link from multiple candidate communication links; based on the second link identifier of the second communication link, encapsulate the communication message to obtain a second target message; and transmit the second target message to the second terminal through the second communication link.

[0114] In one of the embodiments, the device is also used to: transmit the detection message in each candidate communication link respectively, and for each candidate communication link, obtain multiple detection index values ​​of the candidate communication link during the transmission of the detection message; based on the multiple detection index values, perform link quality evaluation on the candidate communication link to obtain the link quality evaluation result of the candidate communication link; and determine the message transmission priority of each candidate communication link according to the link quality evaluation results.

[0115] In one of the embodiments, the message encapsulation module 1304 is further used to: create a first identification message recording the first link identifier based on the first link identifier of the first communication link; and encapsulate the communication message and the first identification message to obtain a first target message.

[0116] In one of the embodiments, the device is also used to: receive a response message returned by the second terminal to the communication message; the response message is generated after encapsulating the original message sent by the second terminal based on the first link identifier of the first communication link; and transmit the response message to the first terminal through the first communication link.

[0117] In one of the embodiments, the link filtering module 1302 is also used to: obtain routing information of the communication message when the first terminal sends a communication message to the second terminal; perform routing matching based on the routing information to obtain a routing matching result; when the routing matching result indicates that the routing match is passed, filter out the first communication link with the highest message transmission priority from multiple candidate communication links between the first terminal and the second terminal.

[0118] Each module in the above-mentioned terminal communication device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0119] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG14. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store inter-terminal communication data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for communicating between terminals is implemented.

[0120] Those skilled in the art will understand that the structure shown in FIG. 14 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0121] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: when a first terminal sends a communication message to a second terminal, a first communication link with the highest message transmission priority is screened out from a plurality of candidate communication links between the first terminal and the second terminal; based on a first link identifier of the first communication link, the communication message is encapsulated to obtain a first target message; and a bandwidth value of the first communication link is obtained, and when the bandwidth value is lower than a bandwidth threshold, the first target message is transmitted to the second terminal through the first communication link.

[0122] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the bandwidth value is not lower than the bandwidth threshold, a second communication link with the highest message transmission priority other than the first communication link is screened out from multiple candidate communication links; based on the second link identifier of the second communication link, the communication message is encapsulated to obtain a second target message; and the second target message is transmitted to the second terminal through the second communication link.

[0123] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the detection message is transmitted in each candidate communication link respectively, and for each candidate communication link, a plurality of detection index values ​​of the candidate communication link during the transmission of the detection message are obtained; based on the plurality of detection index values, a link quality evaluation is performed on the candidate communication link to obtain a link quality evaluation result of the candidate communication link; and according to each link quality evaluation result, a message transmission priority of each candidate communication link is determined.

[0124] In one embodiment, when the processor executes the computer program, the following steps are also implemented: based on the first link identifier of the first communication link, a first identification message recording the first link identifier is created; and the communication message and the first identification message are encapsulated to obtain a first target message.

[0125] In one embodiment, when the processor executes the computer program, the following steps are also implemented: receiving a response message returned by the second terminal to the communication message; the response message is generated after encapsulating the original message sent by the second terminal based on the first link identifier of the first communication link; and transmitting the response message to the first terminal through the first communication link.

[0126] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the first terminal sends a communication message to the second terminal, the routing information of the communication message is obtained; based on the routing information, the routing matching is performed to obtain a routing matching result; when the routing matching result indicates that the routing matching is passed, the first communication link with the highest message transmission priority is screened out from multiple candidate communication links between the first terminal and the second terminal.

[0127] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: when a first terminal sends a communication message to a second terminal, a first communication link with the highest message transmission priority is screened out from a plurality of candidate communication links between the first terminal and the second terminal; based on a first link identifier of the first communication link, the communication message is encapsulated to obtain a first target message; and a bandwidth value of the first communication link is obtained, and when the bandwidth value is lower than a bandwidth threshold, the first target message is transmitted to the second terminal through the first communication link.

[0128] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the bandwidth value is not lower than the bandwidth threshold, a second communication link with the highest message transmission priority other than the first communication link is screened out from multiple candidate communication links; based on the second link identifier of the second communication link, the communication message is encapsulated to obtain a second target message; and the second target message is transmitted to the second terminal through the second communication link.

[0129] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the detection message is transmitted in each candidate communication link respectively, and for each candidate communication link, multiple detection index values ​​of the candidate communication link during the transmission of the detection message are obtained; based on the multiple detection index values, the link quality of the candidate communication link is evaluated to obtain the link quality evaluation result of the candidate communication link; according to the link quality evaluation results, the message transmission priority of each candidate communication link is determined.

[0130] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the first link identifier of the first communication link, a first identification message recording the first link identifier is created; and the communication message and the first identification message are encapsulated to obtain a first target message.

[0131] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving a response message returned by the second terminal to the communication message; the response message is generated after encapsulating the original message sent by the second terminal based on the first link identifier of the first communication link; and transmitting the response message to the first terminal through the first communication link.

[0132] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the first terminal sends a communication message to the second terminal, the routing information of the communication message is obtained; based on the routing information, a route matching is performed to obtain a route matching result; when the route matching result indicates that the route matching is passed, the first communication link with the highest message transmission priority is screened out from multiple candidate communication links between the first terminal and the second terminal.

[0133] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: when a first terminal sends a communication message to a second terminal, screening out a first communication link with the highest message transmission priority from a plurality of candidate communication links between the first terminal and the second terminal; based on a first link identifier of the first communication link, encapsulating the communication message to obtain a first target message; obtaining a bandwidth value of the first communication link, and transmitting the first target message to the second terminal through the first communication link when the bandwidth value is lower than a bandwidth threshold.

[0134] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the bandwidth value is not lower than the bandwidth threshold, a second communication link with the highest message transmission priority other than the first communication link is screened out from multiple candidate communication links; based on the second link identifier of the second communication link, the communication message is encapsulated to obtain a second target message; and the second target message is transmitted to the second terminal through the second communication link.

[0135] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the detection message is transmitted in each candidate communication link respectively, and for each candidate communication link, multiple detection index values ​​of the candidate communication link during the transmission of the detection message are obtained; based on the multiple detection index values, the link quality of the candidate communication link is evaluated to obtain the link quality evaluation result of the candidate communication link; according to the link quality evaluation results, the message transmission priority of each candidate communication link is determined.

[0136] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the first link identifier of the first communication link, a first identification message recording the first link identifier is created; and the communication message and the first identification message are encapsulated to obtain a first target message.

[0137] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving a response message returned by the second terminal to the communication message; the response message is generated after encapsulating the original message sent by the second terminal based on the first link identifier of the first communication link; and transmitting the response message to the first terminal through the first communication link.

[0138] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the first terminal sends a communication message to the second terminal, the routing information of the communication message is obtained; based on the routing information, a route matching is performed to obtain a route matching result; when the route matching result indicates that the route matching is passed, the first communication link with the highest message transmission priority is screened out from multiple candidate communication links between the first terminal and the second terminal.

[0139] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0140] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0141] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0142] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for communication between terminals, characterized in that: The method comprises: When a first terminal sends a communication message to a second terminal, screening out a first communication link with the highest message transmission priority from a plurality of candidate communication links between the first terminal and the second terminal; Based on the first link identifier of the first communication link, encapsulate the communication message to obtain a first target message; A bandwidth value of the first communication link is obtained, and when the bandwidth value is lower than a bandwidth threshold, the first target message is transmitted to the second terminal through the first communication link.

2. The method according to claim 1, characterized in that The method further comprises: In a case where the bandwidth value is not lower than the bandwidth threshold, selecting a second communication link with the highest message transmission priority except the first communication link from the multiple candidate communication links; Based on the second link identifier of the second communication link, encapsulate the communication message to obtain a second target message; The second target message is transmitted to the second terminal through the second communication link.

3. The method according to claim 1, characterized in that The process of determining the message transmission priority includes: Transmitting the detection message in each of the candidate communication links respectively, and for each of the candidate communication links, obtaining a plurality of detection indicator values ​​of the candidate communication link in the process of transmitting the detection message; Based on the multiple detection indicator values, performing link quality evaluation on the candidate communication link to obtain a link quality evaluation result of the candidate communication link; According to the link quality evaluation results, the message transmission priority of each candidate communication link is determined.

4. The method according to claim 1, characterized in that: The step of encapsulating the communication message based on the first link identifier of the first communication link to obtain a first target message includes: Based on the first link identifier of the first communication link, create a first identifier message recording the first link identifier; The communication message and the first identification message are encapsulated to obtain a first target message.

5. The method according to claim 1, characterized in that: The method further comprises: receiving a response message returned by the second terminal in response to the communication message; the response message is generated by encapsulating an original message sent by the second terminal based on the first link identifier of the first communication link; The response message is transmitted to the first terminal through the first communication link.

6. The method according to claim 1, characterized in that When the first terminal sends a communication message to the second terminal, screening out a first communication link with the highest message transmission priority from a plurality of candidate communication links between the first terminal and the second terminal includes: When the first terminal sends a communication message to the second terminal, obtaining routing information of the communication message; Based on the routing information, performing routing matching to obtain a routing matching result; When the route matching result indicates that the route matching is passed, a first communication link with the highest message transmission priority is screened out from a plurality of candidate communication links between the first terminal and the second terminal.

7. A terminal communication device, characterized in that: The device comprises: A link screening module, configured to screen out a first communication link with the highest message transmission priority from a plurality of candidate communication links between the first terminal and the second terminal when the first terminal sends a communication message to the second terminal; A message encapsulation module, used to encapsulate the communication message based on the first link identifier of the first communication link to obtain a first target message; The communication module is used to obtain a bandwidth value of the first communication link, and when the bandwidth value is lower than a bandwidth threshold, transmit the first target message to the second terminal through the first communication link.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • SVC streaming media transmission optimization method based on OpenFlow

    CN103326946A

  • Method for processing message in hybrid access network and network equipment

    CN111769968A

  • SD-WAN network intelligent link selection method based on cloud computing

    CN111835639A

  • Message transmission method and device

    CN112751741A

  • Link quality detection method and device

    CN114615178A