Communication establishment method and device

By introducing a compatibility interface to the terminal to receive compatibility notification messages from the target server, the problem of mismatch between the mobile terminal and the server encryption engine version is solved, and the efficiency and success rate of communication establishment are improved.

CN119254818AActive Publication Date: 2025-01-03SHENZHEN COMTOP INFORMATION TECH
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411465145.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-01-03
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

The mismatch of encryption engine versions between the mobile terminal and the server leads to a reduced communication establishment efficiency, and a method is needed to improve the efficiency of communication establishment.

Method used

By introducing a compatibility interface to the terminal, a compatibility notification message sent by the target server is received, which contains supported candidate server encryption engine and plaintext message service port information, and communication is established with the target server based on this information.

Benefits of technology

It improves the efficiency and success rate of communication establishment between the mobile terminal and the server, ensuring that notification messages can be received and adapted through the compatibility interface when the encryption communication establishment fails, and connectivity can be achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254818A_ABST
    Figure CN119254818A_ABST
Patent Text Reader

Abstract

The invention relates to a communication establishment method and device. The method comprises the following steps: sending an encrypted communication establishment request to a target server by adopting an initial terminal encryption engine, so that the target server establishes encrypted communication with a terminal according to the encrypted communication establishment request; if it is determined that the encrypted communication establishment fails, obtaining a compatibility notification message sent by the target server through a compatibility interface; wherein the compatibility notification message comprises engine information of each candidate server encryption engine supported by the target server and message port information of a plaintext message service port of the target server; and establishing communication with the target server according to the compatibility notification message. By adopting the method, the efficiency of establishing communication between the mobile terminal and the server 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 security technology, and in particular to a communication establishment method and device. Background Art

[0002] At present, mobile terminals and mobile Internet technologies are developing rapidly, and most mobile terminals can access the Internet and remote networks such as cloud platforms. When a mobile terminal requests to access the network, it initiates an encrypted connection request to the server on the network side through an encryption engine such as OpenSSL for identity authentication. Only after the authentication is passed, the mobile terminal is allowed to access the server.

[0003] However, since there may be version mismatches between the encryption engines of the mobile terminal and the server, in this case, the communication connection between the mobile terminal and the server can only be established manually, which greatly reduces the efficiency of establishing communication between the mobile terminal and the server. Summary of the invention

[0004] Based on this, it is necessary to provide a communication establishment method and device that can improve the efficiency of communication establishment between a mobile terminal and a server in order to address the above technical problems.

[0005] In a first aspect, the present application provides a communication establishment method, applied to a terminal, comprising:

[0006] Using the initial terminal encryption engine to send an encrypted communication establishment request to the target server, so that the target server establishes encrypted communication with the terminal according to the encrypted communication establishment request;

[0007] If it is determined that the encrypted communication fails to be established, a compatibility notification message sent by the target server is obtained through a compatibility interface; wherein the compatibility notification message includes engine information of each candidate server encryption engine supported by the target server and message port information of a plain text message service port of the target server;

[0008] Establishing communication with the target server according to the compatibility notification message.

[0009] In one embodiment, determining that the encrypted communication fails to be established includes:

[0010] If the target server fails to establish the encrypted communication, the server determines that the encrypted communication has failed to be established if the target server fails to establish the encrypted communication, or if the target server fails to establish the encrypted communication, the server determines that the encrypted communication has failed to establish the encrypted communication.

[0011] In one of the embodiments, the engine information of each candidate server-side encryption engine includes server-side version information of the candidate server-side encryption engine and engine port information of the engine service port;

[0012] Correspondingly, establishing communication with the target server according to the compatibility notification message includes:

[0013] Determine encryption engine pairing results of each candidate server encryption engine and each candidate terminal encryption engine according to the server version information of each candidate server encryption engine and the terminal version information of each candidate terminal encryption engine supported by the terminal;

[0014] Establish communication with the target server according to the encryption engine pairing result and the compatibility notification message.

[0015] In one embodiment, establishing communication with the target server according to the encryption engine pairing result and the compatibility notification message includes:

[0016] If there is a target terminal encryption engine and a target server encryption engine with a corresponding relationship in the encryption engine pairing result, then establishing communication with the target server according to the engine information of the target terminal encryption engine and the target server encryption engine;

[0017] If there is no corresponding target terminal encryption engine and target server encryption engine in the encryption engine pairing result, communication is established with the target server according to the message port information of the plaintext message service port of the target server.

[0018] In one of the embodiments, the engine port information includes the engine port number and the engine port opening time;

[0019] Correspondingly, establishing communication with the target server according to the target terminal encryption engine and the engine information of the target server encryption engine includes:

[0020] During the engine port opening time, the encryption engine of the target terminal sends the encryption communication establishment request to the engine port corresponding to the engine port number, so that the target server establishes encryption communication with the terminal according to the encryption communication establishment request.

[0021] In one of the embodiments, the message port information includes a message port number and a message port opening time;

[0022] Correspondingly, establishing communication with the target server according to the message port information of the plaintext message service port of the target server includes:

[0023] During the message port opening time, a communication establishment request is sent to the plain text message service port corresponding to the message port number, so that the target server establishes communication with the terminal according to the communication establishment request.

[0024] In one of the embodiments, the compatibility interface is an interface pre-established for the terminal for receiving messages sent by the target server based on the User Datagram Protocol.

[0025] In a second aspect, the present application also provides a communication establishment method, which is applied to a target server, comprising:

[0026] The receiving terminal uses the encrypted communication establishment request sent by the initial terminal encryption engine;

[0027] Determining, according to the encrypted communication establishment request, whether there is a server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines supported by the target server;

[0028] If it does not exist, a compatibility notification message is sent to the compatibility interface of the terminal so that the terminal establishes communication with the target server based on the compatibility notification message; wherein the compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server and the message port information of the plaintext message service port of the target server.

[0029] In a third aspect, the present application further provides a communication establishment device, configured in a terminal, comprising:

[0030] A request sending module, used to use the initial terminal encryption engine to send an encrypted communication establishment request to the target server, so that the target server establishes encrypted communication with the terminal according to the encrypted communication establishment request;

[0031] A message acquisition module, used for acquiring a compatibility notification message sent by the target server through a compatibility interface if it is determined that the encrypted communication fails to be established; wherein the compatibility notification message includes engine information of each candidate server encryption engine supported by the target server and message port information of the plaintext message service port of the target server;

[0032] The communication establishing module is used to establish communication with the target server according to the compatibility notification message.

[0033] In a fourth aspect, the present application further provides a communication establishment device, which is configured at a target server, including:

[0034] A request receiving module, used to receive an encrypted communication establishment request sent by a terminal using an initial terminal encryption engine;

[0035] An engine determination module, configured to determine, according to the encrypted communication establishment request, whether there is a server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines supported by the target server;

[0036] A message sending module is used to send a compatibility notification message to the compatibility interface of the terminal if it does not exist, so that the terminal establishes communication with the target server according to the compatibility notification message; wherein the compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server and the message port information of the plaintext message service port of the target server.

[0037] In a fifth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps involved in the first and second aspects mentioned above when executing the computer program.

[0038] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps involved in the first and second aspects above are implemented.

[0039] In a seventh aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps involved in the first and second aspects above.

[0040] In the above communication establishment method and device, the terminal uses the initial terminal encryption engine to send an encrypted communication establishment request to the target server, so that the target server establishes encrypted communication with the terminal according to the encrypted communication establishment request; if it is determined that the encrypted communication establishment fails, the compatibility notification message sent by the target server is obtained through the compatibility interface; wherein the compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server and the message port information of the plaintext message service port of the target server; according to the compatibility notification message, communication is established with the target server. The above scheme, by introducing a compatibility interface in the terminal, enables the compatibility notification message sent by the target server to be received through the compatibility interface after the encrypted communication establishment request sent to the target server by the initial terminal encryption engine fails; since the compatibility notification message contains the engine information and the message port information, the terminal can further establish a connection with the target server according to the compatibility notification message, thereby improving the efficiency and success rate of communication establishment. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0042] Figure 1 An application environment diagram of a communication establishment method in one embodiment;

[0043] Figure 2 A schematic diagram of a flow chart of a communication establishment method in one embodiment;

[0044] Figure 3 A schematic diagram of a process of establishing communication with a target server in one embodiment;

[0045] Figure 4 A schematic diagram of a process of establishing communication with a target server in another embodiment;

[0046] Figure 5 A schematic flow chart of a communication establishment method in another embodiment;

[0047] Figure 6 A schematic flow chart of a communication establishment method in yet another embodiment;

[0048] Figure 7 A structural block diagram of a communication establishment device in one embodiment;

[0049] Figure 8 It is a structural block diagram of a communication establishment device in another embodiment;

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

[0051] 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.

[0052] The communication establishment method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 101 can be any smart device with an identity authentication proxy component installed, for example, the terminal 101 can be a camera, a smart power distribution meter, a drone nest, etc.; the target server 102 is the server of the access control gateway. The terminal 101 and the target server 102 communicate through DTLS (Datagram Transport Layer Security), and encrypt data based on the encryption engine. Optionally, the terminal 101 uses the initial terminal encryption engine to send an encrypted communication establishment request to the target server 102, so that the target server 102 establishes encrypted communication with the terminal according to the encrypted communication establishment request; if it is determined that the encrypted communication establishment fails, the compatibility notification message sent by the target server 102 is obtained through the compatibility interface; wherein the compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server 102 and the message port information of the plaintext message service port of the target server; according to the compatibility notification message, communication is established with the target server 102.

[0053] In one embodiment, Figure 2 As shown, a communication establishment method is provided, which is applied to Figure 1 The terminal 101 in the example is used as an example to illustrate, and specifically includes the following steps:

[0054] S201, using the initial terminal encryption engine to send an encrypted communication establishment request to the target server, so that the target server establishes encrypted communication with the terminal according to the encrypted communication establishment request.

[0055] The initial terminal encryption engine can be any encryption engine supported by the terminal; the target server is an access control gateway associated with the terminal. The encrypted communication establishment request is used to request to establish encrypted communication with the target server. In the embodiment of the present application, the encrypted communication establishment request carries the identification information of the terminal and the version information of the initial terminal encryption engine.

[0056] Optionally, the terminal may use an initial terminal encryption engine to send an encrypted communication establishment request to the target server. For example, the terminal may use a standard encryption engine (openssl0.7, openssl-unknown old version, gmssl, boringssl, etc.) to send an encrypted communication establishment request to the target server. The sending port may be 10300.

[0057] Furthermore, after receiving the encrypted communication establishment request sent by the terminal, the target server will identify the encryption engine of the terminal. If it is identified that the target server does not support the initial terminal encryption engine of the terminal, the connection of the terminal will be rejected.

[0058] S202: If it is determined that the encrypted communication fails to be established, a compatibility notification message sent by the target server is obtained through a compatibility interface.

[0059] Among them, the compatibility interface is an interface pre-established for the terminal for receiving messages sent by the target server based on the User Datagram Protocol. It should be noted that in order to ensure that the port is not attacked, the interface receiving permission is set to receive messages sent from the server based on the User Datagram Protocol (UDP). The compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server and the message port information of the plaintext message service port of the target server. The engine information is information that describes the properties of the candidate server encryption engine; in an embodiment of the present application, the engine information includes but is not limited to the server version information of the candidate server encryption engine and the engine port information of the engine service port.

[0060] Optionally, after the target server recognizes that it does not support the initial terminal encryption engine of the terminal, it will not send a connection success response message to the terminal, or will send a connection reset response message to the terminal. Therefore, if the terminal does not receive a connection success response message fed back by the target server based on the encrypted communication establishment request within a preset time period, or receives a connection reset response message fed back by the target server based on the encrypted communication establishment request, it is determined that the encrypted communication establishment has failed.

[0061] At this time, the target server will send compatibility notification information including engine information of each candidate server encryption engine supported by the target server and message port information of the target server's plaintext message service port to the compatibility interface of the terminal. The terminal receives the compatibility notification message sent by the target server by monitoring the compatibility interface.

[0062] S203: Establish communication with the target server according to the compatibility notification message.

[0063] Optionally, based on the engine information of each candidate server encryption engine supported by the target server in the compatibility notification message and the message port information of the plain text message service port of the target server, a suitable candidate server encryption engine can be selected from the candidate server encryption engines to establish communication with the target server by comprehensively considering the actual situation; or, communication with the target server can be established through the message port of the plain text message service port.

[0064] In the above communication establishment method, the terminal uses the initial terminal encryption engine to send an encrypted communication establishment request to the target server, so that the target server establishes encrypted communication with the terminal according to the encrypted communication establishment request; if it is determined that the encrypted communication establishment fails, the compatibility notification message sent by the target server is obtained through the compatibility interface; wherein the compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server and the message port information of the plaintext message service port of the target server; according to the compatibility notification message, communication is established with the target server. The above scheme, by introducing a compatibility interface in the terminal, enables the compatibility notification message sent by the target server to be received through the compatibility interface after the encrypted communication establishment request sent to the target server by the initial terminal encryption engine fails; since the compatibility notification message contains the engine information and the message port information, the terminal can further establish a connection with the target server according to the compatibility notification message, thereby improving the efficiency and success rate of communication establishment.

[0065] In one embodiment, the engine information of each candidate server-side encryption engine includes the server-side version information of the candidate server-side encryption engine and the engine port information of the engine service port; on this basis, Figure 3 As shown, a method for establishing communication with a target server is provided, and the above S203 is refined, specifically including the following steps:

[0066] S301, determining encryption engine pairing results of each candidate server encryption engine and each candidate terminal encryption engine according to server version information of each candidate server encryption engine and terminal version information of each candidate terminal encryption engine supported by the terminal.

[0067] The encryption engine pairing result is the result of pairing each candidate server encryption engine with each candidate terminal encryption engine.

[0068] Optionally, the terminal queries the terminal version information of each candidate terminal encryption engine supported by the terminal according to the version information of each candidate server encryption engine in the compatibility notification message, matches the encryption engine supported by the terminal from each candidate server encryption engine, and generates an encryption engine pairing result according to the matching result.

[0069] S302: Establish communication with the target server according to the encryption engine pairing result and the compatibility notification message.

[0070] Optionally, based on the encryption engine pairing result, communication can be established with the target server through the successfully paired candidate terminal encryption engine and the candidate server encryption engine. Communication can also be established with the target server through the message port of the plaintext message service port based on the compatibility notification message.

[0071] In this embodiment, the terminal pairs each candidate server encryption engine with each candidate terminal encryption engine, and establishes communication with the target server based on the pairing result and a compatibility notification message, thereby ensuring the success rate and efficiency of the communication establishment process.

[0072] Optionally, the engine port information includes the engine port number and the engine port opening time. Based on this, in one embodiment, Figure 4 As shown, a method for establishing communication with a target server is provided, which refines the above S302 and specifically includes the following steps:

[0073] S401: If there is a target terminal encryption engine and a target server encryption engine with a corresponding relationship in the encryption engine pairing result, establish communication with the target server according to the engine information of the target terminal encryption engine and the target server encryption engine.

[0074] Optionally, if there is a target terminal encryption engine and a target server encryption engine with a corresponding relationship in the encryption engine pairing result, it means that the target server and the terminal can perform encrypted communication through the encryption engine. Therefore, according to the engine information of the target terminal encryption engine and the target server encryption engine, communication can be established with the target server through the target terminal encryption engine and the target server encryption engine. There are many ways to establish communication with the target server according to the engine information of the target terminal encryption engine and the target server encryption engine, which are not limited in this application.

[0075] Optionally, the engine port information includes the engine port number and the engine port opening time. On this basis, a method for establishing communication with a target server based on the engine information of the target terminal encryption engine and the target server encryption engine is to send an encrypted communication establishment request to the engine port corresponding to the engine port number through the target terminal encryption engine during the engine port opening time, so that the target server establishes encrypted communication with the terminal according to the encrypted communication establishment request. Among them, the engine port opening time is the time when the engine port is open to the terminal, that is, the time that the terminal is allowed to send messages to the engine port. Optionally, after receiving the encrypted communication establishment request, the target server will establish an encrypted communication connection with the terminal and feedback the connection success response information to the terminal.

[0076] S402: If there is no corresponding target terminal encryption engine and target server encryption engine in the encryption engine pairing result, establish communication with the target server according to the message port information of the plaintext message service port of the target server.

[0077] Optionally, if there is no target terminal encryption engine and target server encryption engine with a corresponding relationship in the encryption engine pairing result, it means that the target server and the terminal cannot perform encrypted communication through the encryption engine. Therefore, in order to successfully establish communication with the target server, instant communication can also be established with the target server based on the plaintext message service port of the target server. There are many ways to establish communication with the target server based on the message port information of the plaintext message service port of the target server, which are not limited in this application.

[0078] Optionally, the message port information includes a message port number and a message port opening time. On this basis, a method for establishing communication with a target server according to the message port information of the plaintext message service port of the target server is to send a communication establishment request to the plaintext message service port corresponding to the message port number during the message port opening time, so that the target server establishes communication with the terminal according to the communication establishment request. Among them, the message port opening time is the time when the plaintext message service port is open to the terminal, that is, the time when the terminal is allowed to send messages to the plaintext message service port. Optionally, after receiving the communication establishment request, the target server will establish a communication connection with the terminal and feedback connection success response information to the terminal.

[0079] In an embodiment of the present application, based on the encryption engine pairing result, in the absence of a corresponding target terminal encryption engine and a target server encryption engine, a message can be sent to the target server through the plaintext message service port during the message port opening time. While ensuring that communication between the terminal and the target server is established, the communication security between the terminal and the target server is also guaranteed.

[0080] In one embodiment, Figure 5 As shown, a communication establishment method is provided, which is applied to Figure 1 The target server 102 in the example is used as an example to illustrate, and specifically includes the following steps:

[0081] S501, the receiving terminal adopts the encrypted communication establishment request sent by the initial terminal encryption engine.

[0082] Among them, the encrypted communication request is used to request to establish encrypted communication with the target server. In an embodiment of the present application, the encrypted communication establishment request carries the terminal's identification information and the version information of the initial terminal encryption engine, etc.

[0083] S502: Determine, according to the encrypted communication establishment request, whether there is a server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines supported by the target server.

[0084] Optionally, based on the version information of the initial terminal encryption engine carried in the encrypted communication establishment request, it is possible to check whether there is a server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines supported by the target server.

[0085] S503: If not, send a compatibility notification message to the compatibility interface of the terminal, so that the terminal establishes communication with the target server according to the compatibility notification message.

[0086] The compatibility notification message includes engine information of each candidate server encryption engine supported by the target server and message port information of the plaintext message service port of the target server.

[0087] Optionally, if there is no server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines supported by the target server, a compatibility notification message can be generated based on the engine information of each candidate server encryption engine supported by the target server and the message port information of the plain text message service port of the target server, and the compatibility notification message can be sent to the compatibility interface of the terminal so that the terminal establishes communication with the target server based on the compatibility notification message.

[0088] In an embodiment of the present application, the target server receives an encrypted communication establishment request sent by the initial terminal encryption engine; based on the encrypted communication establishment request, it is determined whether there is a server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines supported by the target server; if not, a compatibility notification message is sent to the compatibility interface of the terminal so that the terminal can establish communication with the target server according to the compatibility notification message; wherein the compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server and the message port information of the plaintext message service port of the target server. In the above scheme, when there is no server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines, the terminal is not directly denied access, but a compatibility notification message is sent to the compatibility interface of the terminal, so that the terminal can further establish a communication connection with the target server according to the compatibility notification message, thereby improving the success rate and efficiency of the communication connection between the terminal and the target server.

[0089] Figure 6 FIG. 2 is a communication signaling diagram of a communication establishment method in another embodiment. Based on the above embodiment, this embodiment provides an optional example of a communication establishment method. Figure 6 The specific implementation process is as follows:

[0090] S601, the terminal uses the initial terminal encryption engine to send an encrypted communication establishment request to the target server, so that the target server establishes encrypted communication with the terminal according to the encrypted communication establishment request.

[0091] S602: The target server receives an encrypted communication establishment request sent by the terminal using the initial terminal encryption engine.

[0092] S603, the target server determines whether there is a server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines supported by the target server according to the encrypted communication establishment request; if so, establishes a communication encryption connection with the terminal; if not, executes S604.

[0093] S604: The target server sends a compatibility notification message to the compatibility interface of the terminal, so that the terminal establishes communication with the target server according to the compatibility notification message.

[0094] The compatibility notification message includes engine information of each candidate server encryption engine supported by the target server and message port information of the plaintext message service port of the target server.

[0095] S605: The terminal obtains a compatibility notification message sent by the target server through a compatibility interface.

[0096] The engine information of each candidate server-side encryption engine includes server version information of the candidate server-side encryption engine and engine port information of the engine service port.

[0097] Optionally, if no connection success response information is received from the target server based on the encrypted communication establishment request feedback within a preset time period, or if a connection reset response information is received from the target server based on the encrypted communication establishment request feedback, it is determined that the encrypted communication establishment has failed.

[0098] S606, the terminal determines the encryption engine pairing result of each candidate server encryption engine and each candidate terminal encryption engine according to the server version information of each candidate server encryption engine in the compatibility notification message and the terminal version information of each candidate terminal encryption engine supported by the terminal.

[0099] S607, the terminal determines whether there is a target terminal encryption engine and a target server encryption engine with a corresponding relationship in the encryption engine pairing result; if so, execute S608; if not, execute S609.

[0100] S608: During the engine port opening time, the terminal sends an encrypted communication establishment request to the engine port corresponding to the engine port number through the target terminal encryption engine.

[0101] S609: The terminal sends a communication establishment request to the plain text message service port corresponding to the message port number within the message port opening time.

[0102] The specific process of the above S601-S609 can refer to the description of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0103] 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.

[0104] Based on the same inventive concept, the embodiment of the present application also provides a communication establishment device for implementing the communication establishment 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 communication establishment device embodiments provided below can refer to the limitations on the communication establishment method above, and will not be repeated here.

[0105] In one embodiment, Figure 7 As shown, a communication establishment device 700 is provided, comprising: a request sending module 710, a message obtaining module 720 and a communication establishment module 730, wherein:

[0106] The request sending module 710 is used to use the initial terminal encryption engine to send an encrypted communication establishment request to the target server, so that the target server establishes encrypted communication with the terminal according to the encrypted communication establishment request.

[0107] The message acquisition module 720 is used to obtain the compatibility notification message sent by the target server through the compatibility interface if it is determined that the encrypted communication has failed to be established; wherein the compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server and the message port information of the plaintext message service port of the target server.

[0108] The communication establishing module 730 is used to establish communication with the target server according to the compatibility notification message.

[0109] In the above communication establishment device, the terminal uses the initial terminal encryption engine to send an encrypted communication establishment request to the target server, so that the target server establishes encrypted communication with the terminal according to the encrypted communication establishment request; if it is determined that the encrypted communication establishment fails, the compatibility notification message sent by the target server is obtained through the compatibility interface; wherein the compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server and the message port information of the plain text message service port of the target server; according to the compatibility notification message, communication is established with the target server. The above scheme, by introducing a compatibility interface in the terminal, enables the compatibility notification message sent by the target server to be received through the compatibility interface after the encrypted communication establishment request sent to the target server through the initial terminal encryption engine fails; since the compatibility notification message contains the engine information and the message port information, the terminal can further establish a connection with the target server according to the compatibility notification message, thereby improving the efficiency and success rate of communication establishment.

[0110] In one embodiment, the message acquisition module 720 is used to:

[0111] If no connection success response information based on the encrypted communication establishment request feedback from the target server is received within the preset time, or a connection reset response information based on the encrypted communication establishment request feedback from the target server is received, it is determined that the encrypted communication establishment has failed.

[0112] In one embodiment, the engine information of each candidate server encryption engine includes the server version information of the candidate server encryption engine and the engine port information of the engine service port; the communication establishment module 730 includes:

[0113] The result determination unit is used to determine the encryption engine pairing result of each candidate server encryption engine and each candidate terminal encryption engine according to the server version information of each candidate server encryption engine and the terminal version information of each candidate terminal encryption engine supported by the terminal.

[0114] The communication establishing unit is used to establish communication with the target server according to the encryption engine pairing result and the compatibility notification message.

[0115] In one embodiment, the communication establishing unit includes:

[0116] The first communication subunit is used to establish communication with the target server according to the engine information of the target terminal encryption engine and the target server encryption engine if there is a corresponding target terminal encryption engine and a target server encryption engine in the encryption engine pairing result.

[0117] The second communication subunit is used to establish communication with the target server according to the message port information of the plaintext message service port of the target server if there is no corresponding target terminal encryption engine and target server encryption engine in the encryption engine pairing result.

[0118] In one embodiment, the engine port information includes the engine port number and the engine port opening time; the first communication subunit is specifically used for:

[0119] During the engine port opening time, an encryption communication establishment request is sent to the engine port corresponding to the engine port number through the target terminal encryption engine, so that the target server establishes encrypted communication with the terminal according to the encryption communication establishment request.

[0120] In one embodiment, the message port information includes the message port number and the message port opening time; the second communication subunit is specifically used for:

[0121] During the message port opening time, a communication establishment request is sent to the plain text message service port corresponding to the message port number, so that the target server establishes communication with the terminal according to the communication establishment request.

[0122] In one embodiment, the compatibility interface is an interface pre-established for the terminal and used to receive messages sent by the target server based on the User Datagram Protocol.

[0123] In one embodiment, Figure 8 As shown, a communication establishment device 800 is provided, comprising: a request receiving module 810, an engine determining module 820 and a message sending module 830, wherein:

[0124] The request receiving module 810 is used to receive an encrypted communication establishment request sent by the terminal using the initial terminal encryption engine.

[0125] The engine determination module 820 is used to determine whether there is a server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines supported by the target server according to the encrypted communication establishment request.

[0126] The message sending module 830 is used to send a compatibility notification message to the compatibility interface of the terminal if it does not exist, so that the terminal establishes communication with the target server according to the compatibility notification message; wherein the compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server and the message port information of the plain text message service port of the target server.

[0127] In the above communication establishment device, the target server receives the encrypted communication establishment request sent by the terminal using the initial terminal encryption engine; according to the encrypted communication establishment request, it is determined whether there is a server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines supported by the target server; if not, a compatibility notification message is sent to the compatibility interface of the terminal, so that the terminal establishes communication with the target server according to the compatibility notification message; wherein the compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server and the message port information of the plaintext message service port of the target server. The above scheme does not directly reject the access of the terminal when there is no server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines, but sends a compatibility notification message to the compatibility interface of the terminal, so that the terminal can further establish a communication connection with the target server according to the compatibility notification message, thereby improving the success rate and efficiency of the communication connection between the terminal and the target server.

[0128] Each module in the above communication establishment device can be implemented in whole or in part by software, hardware, or 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.

[0129] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG9. 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 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 communication establishment method is implemented.

[0130] Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution 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.

[0131] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the communication establishment method provided in the above embodiment when executing the computer program.

[0132] 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 steps of the communication establishment method provided in the above embodiment are implemented.

[0133] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the communication establishment method provided in the above embodiment when executed by a processor.

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

[0135] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods 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 this application can include at least one of non-volatile 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), magnetoresistive 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, etc., but are not limited to this.

[0136] 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 specification.

[0137] 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 understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations 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 communication establishment method, characterized in that: Applied to a terminal, the method comprises: Using the initial terminal encryption engine to send an encrypted communication establishment request to the target server, so that the target server establishes encrypted communication with the terminal according to the encrypted communication establishment request; If it is determined that the encrypted communication fails to be established, a compatibility notification message sent by the target server is obtained through a compatibility interface; wherein the compatibility notification message includes engine information of each candidate server encryption engine supported by the target server and message port information of a plain text message service port of the target server; Establishing communication with the target server according to the compatibility notification message.

2. The method according to claim 1, characterized in that The determining that the encrypted communication establishment fails includes: If the target server fails to establish the encrypted communication, the server determines that the encrypted communication has failed to be established if the target server fails to establish the encrypted communication, or if the target server fails to establish the encrypted communication, the server determines that the encrypted communication has failed to establish the encrypted communication.

3. The method according to claim 1, characterized in that The engine information of each candidate server-side encryption engine includes the server-side version information of the candidate server-side encryption engine and the engine port information of the engine service port; Correspondingly, establishing communication with the target server according to the compatibility notification message includes: Determine encryption engine pairing results of each candidate server encryption engine and each candidate terminal encryption engine according to the server version information of each candidate server encryption engine and the terminal version information of each candidate terminal encryption engine supported by the terminal; Establish communication with the target server according to the encryption engine pairing result and the compatibility notification message.

4. The method according to claim 3, characterized in that: The establishing communication with the target server according to the encryption engine pairing result and the compatibility notification message includes: If there is a target terminal encryption engine and a target server encryption engine with a corresponding relationship in the encryption engine pairing result, then establish communication with the target server according to the engine information of the target terminal encryption engine and the target server encryption engine; If there is no corresponding target terminal encryption engine and target server encryption engine in the encryption engine pairing result, communication is established with the target server according to the message port information of the plaintext message service port of the target server.

5. The method according to claim 4, characterized in that The engine port information includes the engine port number and the engine port opening time; Correspondingly, establishing communication with the target server according to the target terminal encryption engine and the engine information of the target server encryption engine includes: During the engine port opening time, the encryption engine of the target terminal sends the encryption communication establishment request to the engine port corresponding to the engine port number, so that the target server establishes encryption communication with the terminal according to the encryption communication establishment request.

6. The method according to claim 4, characterized in that The message port information includes the message port number and the message port opening time; Correspondingly, establishing communication with the target server according to the message port information of the plaintext message service port of the target server includes: During the message port opening time, a communication establishment request is sent to the plain text message service port corresponding to the message port number, so that the target server establishes communication with the terminal according to the communication establishment request.

7. The method according to claim 1, characterized in that The compatibility interface is an interface pre-established for the terminal for receiving a message sent by the target server based on the User Datagram Protocol.

8. A communication establishment method, characterized in that: Applied to the target server, including: The receiving terminal uses the encrypted communication establishment request sent by the initial terminal encryption engine; Determining, according to the encrypted communication establishment request, whether there is a server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines supported by the target server; If it does not exist, a compatibility notification message is sent to the compatibility interface of the terminal so that the terminal establishes communication with the target server based on the compatibility notification message; wherein the compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server and the message port information of the plaintext message service port of the target server.

9. A communication establishment device, characterized in that: Configured in a terminal, the device includes: A request sending module, used to use the initial terminal encryption engine to send an encrypted communication establishment request to the target server, so that the target server establishes encrypted communication with the terminal according to the encrypted communication establishment request; A message acquisition module, used for acquiring a compatibility notification message sent by the target server through a compatibility interface if it is determined that the encrypted communication fails to be established; wherein the compatibility notification message includes engine information of each candidate server encryption engine supported by the target server and message port information of the plaintext message service port of the target server; The communication establishing module is used to establish communication with the target server according to the compatibility notification message.

10. A communication establishment device, characterized in that: Configured at the target server, the device includes: A request receiving module, used to receive an encrypted communication establishment request sent by a terminal using an initial terminal encryption engine; An engine determination module, configured to determine, according to the encrypted communication establishment request, whether there is a server encryption engine corresponding to the initial terminal encryption engine among the candidate server encryption engines supported by the target server; A message sending module is used to send a compatibility notification message to the compatibility interface of the terminal if it does not exist, so that the terminal establishes communication with the target server according to the compatibility notification message; wherein the compatibility notification message includes the engine information of each candidate server encryption engine supported by the target server and the message port information of the plaintext message service port of the target server.

Citation Information

Patent Citations

  • Self-authenticating domain specific browser identifiers

    CN112166586A

  • Certificateless secure network connection handshake method

    CN112564923A

  • Data unvarnished transmission method and system, medium and computing equipment

    CN113992448A

  • Communication method, communication device, electronic equipment and computer storage medium

    CN116846625A

  • SSL VPN terminal authentication method and system based on user security level

    CN117714125A