Remote link establishment method and device, electronic equipment, medium and product

By establishing remote links managed by middleware in cloud service technology, the problem of easy disconnection of links between the client and the server is solved, improving data transmission efficiency and link stability.

CN119363805APending Publication Date: 2025-01-24DAWNING INT INFORMATION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411629847.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In cloud service technology, the link between the user side and the server is easily disconnected due to network failure or user misoperation, resulting in low data transmission efficiency.

Method used

Establish a request by receiving the link of the user terminal, establish a target communication protocol link between the middleware and the user side, and determine the target security protocol link according to the target user logo and cache. Finally To establish a remote link between the user's side and the server.

Benefits of technology

This method can avoid frequent establishment of links by reusing existing security protocol links, thereby improving the efficiency of data transmission and improving the stability and user experience of the link.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363805A_ABST
    Figure CN119363805A_ABST
Patent Text Reader

Abstract

The invention provides a remote link establishment method and device, electronic equipment, a medium and a product. The method comprises the following steps: receiving a link establishment request sent by a user side, wherein the link establishment request comprises a target user identifier; establishing a target communication protocol link between the middleware and the user side according to the link establishment request; determining a target security protocol link according to the target user identifier and a cache, the target security protocol link being a link between the middleware and a server; and performing association processing on the target communication protocol link and the target security protocol link to establish a remote link between the user side and the server. According to the scheme, the link is managed through the middleware, the existing security protocol link can be reused, frequent link establishment is avoided, and therefore the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud service technology, and in particular to a method, device, electronic device, medium and product for establishing a remote link. Background Art

[0002] With the rapid development of cloud service technology, more and more enterprises and individuals choose to use cloud services to manage and run their applications. Cloud services provide flexible computing resources, storage capabilities and network support, allowing users to easily expand and manage their applications.

[0003] In actual applications, the user sends a link establishment request to the server at the user end, and the server establishes a link according to the link establishment request, and realizes data transmission between the user end and the server through the link.

[0004] However, when a network failure or user error occurs, the link will be disconnected and needs to be re-established, resulting in low data transmission efficiency. Summary of the invention

[0005] The present application provides a remote link establishment method, device, electronic device, medium and product to improve the efficiency of data transmission.

[0006] In a first aspect, the present application provides a method for establishing a remote link, comprising: receiving a link establishment request sent by a user terminal, the link establishment request including a target user identifier; establishing a target communication protocol link between a middleware and the user terminal according to the link establishment request; determining a target security protocol link according to the target user identifier and a cache, the target security protocol link being a link between the middleware and a server; and associating the target communication protocol link with the target security protocol link to establish a remote link between the user terminal and the server.

[0007] Optionally, the method as described above determines the target security protocol link based on the target user identifier and the cache, including: determining multiple historical link information stored in the cache, and corresponding multiple historical user identifiers; if the multiple historical user identifiers include the target user identifier, determining the target security protocol link based on the target user identifier, or establishing the target security protocol link based on the historical link information corresponding to the target user identifier; if the target user identifier is not included in the multiple historical user identifiers, establishing the target security protocol link, determining the target link information corresponding to the target security protocol link, and storing the target link information in the cache.

[0008] Optionally, the method as described above associates the target communication protocol link with the target security protocol link, including: determining whether there is a target association relationship corresponding to the target communication protocol link and the target security protocol link in the cache; if so, associating the target communication protocol link with the target security protocol link according to the target association relationship; if not, associating the input stream of the target communication protocol link with the output stream of the target security protocol link, associating the input stream of the target security protocol link with the output stream of the target communication protocol link, generating the target association relationship, and storing the target association relationship in the cache.

[0009] Optionally, as described above, the method further includes: receiving target uplink data through the target communication protocol link; determining a target timestamp of the target security protocol link; determining a data type of the target uplink data, the data type including a heartbeat message or a non-heartbeat message; if the data type is a heartbeat message, updating the target timestamp according to the current moment; if the data type is a non-heartbeat message, sending the target uplink data to the server through the target security protocol link, and updating the target timestamp according to the current moment.

[0010] Optionally, the method as described above further includes: receiving target downlink data through the target security protocol link; sending the target downlink data to the user terminal through the target communication protocol link, and updating the target timestamp according to the current time.

[0011] Optionally, as described above, the method further includes: determining multiple historical timestamps stored in the cache, the multiple historical timestamps corresponding one-to-one to multiple historical security protocol links, and the multiple historical timestamps corresponding one-to-one to multiple historical link information; determining link information to be cleared from the multiple historical link information based on the multiple historical timestamps, the duration between the historical timestamp corresponding to the link information to be cleared and the current moment is greater than a duration threshold; deleting the link information to be cleared from the cache; determining the security protocol link to be cleared from the multiple historical security protocol links based on the multiple historical timestamps, the duration between the historical timestamp corresponding to the security protocol link to be cleared and the current moment is greater than a duration threshold; and disconnecting the security protocol link to be cleared.

[0012] In a second aspect, the present application provides a device for establishing a remote link, comprising: a receiving module, used to receive a link establishment request sent by a user terminal, the link establishment request including a target user identifier; an establishing module, used to establish a target communication protocol link between the middleware and the user terminal according to the link establishment request; a determining module, used to determine a target security protocol link according to the target user identifier and a cache, the target security protocol link being a link between the middleware and a server; an associating module, used to associate the target communication protocol link with the target security protocol link to establish a remote link between the user terminal and the server.

[0013] Optionally, in the device as described above, the determination module is specifically used to determine multiple historical link information stored in the cache, and the corresponding multiple historical user identifiers; the determination module is also specifically used to determine the target security protocol link according to the target user identifier if the target user identifier is included in the multiple historical user identifiers, or to establish the target security protocol link according to the historical link information corresponding to the target user identifier; the determination module is also specifically used to establish the target security protocol link if the target user identifier is not included in the multiple historical user identifiers, and determine the target link information corresponding to the target security protocol link, and store the target link information in the cache.

[0014] Optionally, the device as described above further includes: a processing module, used to determine whether there is a target association relationship corresponding to the target communication protocol link and the target security protocol link in the cache; the processing module is also used to determine whether, if so, associate the target communication protocol link with the target security protocol link according to the target association relationship; the processing module is also used to, if not, associate the input stream of the target communication protocol link with the output stream of the target security protocol link, associate the input stream of the target security protocol link with the output stream of the target communication protocol link, generate the target association relationship, and store the target association relationship in the cache.

[0015] Optionally, as described above, the device further comprises: a transmission module, used to receive target uplink data through the target communication protocol link; the transmission module is also used to determine the target timestamp of the target security protocol link; the transmission module is also used to determine the data type of the target uplink data, the data type comprising a heartbeat message or a non-heartbeat message; the transmission module is also used to update the target timestamp according to the current time if the data type is a heartbeat message; the transmission module is also used to send the target uplink data to the server through the target security protocol link and update the target timestamp according to the current time if the data type is a non-heartbeat message.

[0016] Optionally, as described above, the device further includes: a forwarding module, used to receive target downlink data through the target security protocol link; the forwarding module is also used to send the target downlink data to the user terminal through the target communication protocol link, and update the target timestamp according to the current time.

[0017] Optionally, as described above, the device further includes: a cleaning module, used to determine multiple historical timestamps stored in the cache, the multiple historical timestamps correspond one-to-one to multiple historical security protocol links, and the multiple historical timestamps correspond one-to-one to multiple historical link information; the cleaning module is also used to clean up the link information and the duration between the historical timestamp corresponding to the current moment is greater than the duration threshold; the cleaning module is also used to delete the link information to be cleaned from the cache; the cleaning module is also used to determine the security protocol link to be cleaned from the multiple historical security protocol links based on the multiple historical timestamps, the duration between the historical timestamp corresponding to the security protocol link to be cleaned and the current moment is greater than the duration threshold; the cleaning module is also used to disconnect the security protocol link to be cleaned.

[0018] In a third aspect, the present application provides an electronic device comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement any method described in the first aspect.

[0019] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor as described in any one of the methods in the first aspect.

[0020] In a fifth aspect, the present application provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor as in any one of the methods in the first aspect.

[0021] The remote link establishment method, device, electronic device, medium and product provided in the present application receive a link establishment request sent by a user terminal, wherein the link establishment request includes a target user identifier; establish a target communication protocol link between the middleware and the user terminal according to the link establishment request; determine a target security protocol link according to the target user identifier and the cache, wherein the target security protocol link is a link between the middleware and the server; and associate the target communication protocol link with the target security protocol link to establish a remote link between the user terminal and the server. The above scheme manages links through the middleware, and can reuse existing security protocol links to avoid frequent link establishment, thereby improving the efficiency of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0023] Figure 1 A schematic diagram of an application scenario of a method for establishing a remote link provided in an embodiment of the present application;

[0024] Figure 2 A flowchart of a method for establishing a remote link provided in an embodiment of the present application;

[0025] Figure 3 A flowchart of a method for establishing a remote link provided in an embodiment of the present application;

[0026] Figure 4 A schematic diagram of determining a target security protocol link provided in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of updating timestamps provided in an embodiment of the present application;

[0028] Figure 6 A schematic diagram of periodic cleaning provided in an embodiment of the present application;

[0029] Figure 7 A schematic diagram of the structure of a remote link establishment device provided in an embodiment of the present application;

[0030] Figure 8 A schematic diagram of the structure of a remote link establishment device provided in an embodiment of the present application;

[0031] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0032] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0033] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0034] 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, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0035] It should be noted that the remote link establishment method, device, electronic device, medium and product of the present application can be used in the field of cloud service technology, and can also be used in any field other than cloud service. The application field of the remote link establishment method, device, electronic device, medium and product of the present application is not limited.

[0036] Figure 1 A schematic diagram of an application scenario of a method for establishing a remote link provided in an embodiment of the present application is given by way of example in combination with the illustrated scenario: a remote link is established between a user terminal and a server, and data transmission between the user terminal and the server is achieved through the remote link.

[0037] In actual applications, link establishment is based on link information, which includes environment variables or temporary variables. If the link is disconnected, the link information will be lost. To reestablish the link, the link information needs to be reconfigured, resulting in low efficiency. The link also includes historical operation records. If the link is disconnected, the historical operation records will be lost, affecting the user experience.

[0038] The method for establishing a remote link provided in this application is intended to solve the above technical problems in the prior art.

[0039] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0040] Figure 2 A flowchart of a method for establishing a remote link provided in an embodiment of the present application, the method comprising the following steps:

[0041] S201: Receive a link establishment request sent by a user terminal.

[0042] The link establishment request includes a target user identifier.

[0043] Exemplarily, the user identification may be a unique identification of the user logging into the client. The user identification is used as the unique identification of the link corresponding to the link request.

[0044] Combined with the scenario example, the user ID can accurately determine the unique corresponding link to avoid link confusion.

[0045] S202: Establish a target communication protocol link between the middleware and the client according to the link establishment request.

[0046] The target communication protocol link may be a Web Socket protocol link. The Web Socket protocol link is a protocol for full-duplex communication over a single TCP link. It allows real-time, bidirectional data transmission between a user terminal and a server without the need for an HTTP request-response model.

[0047] Combined with the scenario example, real-time, low-latency two-way communication can be achieved through the Web Socket protocol link, thereby improving the user experience.

[0048] Optionally, the middleware is controlled by the server's program to perform work.

[0049] Combined with the scenario example, middleware has functions such as executing commands and storing. Middleware can establish links and store links and information. The links and information stored by the middleware can be reused, thereby improving the efficiency of establishing links.

[0050] S203: Determine a target security protocol link according to the target user identifier and the cache.

[0051] Among them, the target security protocol link is the link between the middleware and the server.

[0052] The target security protocol link may be a secure shell (SSH) protocol link. The SSH protocol link is used to remotely log in securely, execute commands, and transmit data. The SSH protocol provides strong security and reliability and is widely used in system management and remote operations.

[0053] Combined with the scenario example, the SSH protocol link can improve the security between the middleware and the server, thereby improving the security of the cloud service.

[0054] Exemplarily, the cache may store link information or historical operation records. The stored link information may be used to reduce the operation of configuration variables when establishing a secure protocol link. The stored historical operation records may be used to quickly restore historical sessions after the secure protocol link is reestablished, thereby avoiding the need for users to re-execute previous commands or operations and improving the user experience.

[0055] Optionally, the context information is stored in the cache. When the user switches devices or logs in again, the context information can be used to continue the previous operation and maintain a consistent user experience.

[0056] S204: Associating the target communication protocol link with the target security protocol link to establish a remote link between the client and the server.

[0057] Combined with the scenario example, the target communication protocol link is the link between the middleware and the user end, and the target security protocol link is the link between the middleware and the server. The target communication protocol link and the target security protocol link are independent of each other. Through association processing, the target communication protocol link and the target security protocol link work together to improve the efficiency of data transmission.

[0058] Specifically, the target communication protocol link has high stability and is not easy to disconnect. The links or link information stored in the middleware can be reused to improve the efficiency of establishing the target security protocol link. The target communication protocol link and the target security protocol link work together to cope with network failures or user misoperation, thereby improving the efficiency of data transmission.

[0059] The method for establishing a remote link provided in an embodiment of the present application receives a link establishment request sent by a user end, the link establishment request includes a target user identifier; according to the link establishment request, a target communication protocol link is established between the middleware and the user end; according to the target user identifier and the cache, a target security protocol link is determined, the target security protocol link is a link between the middleware and the server; the target communication protocol link is associated with the target security protocol link to establish a remote link between the user end and the server. The above scheme manages the link through the middleware, and can reuse the existing security protocol link to avoid frequent link establishment, thereby improving the efficiency of data transmission.

[0060] Based on any of the above embodiments, Figure 3 , the detailed process of establishing a remote link is explained.

[0061] Figure 3 A flowchart of a method for establishing a remote link provided in an embodiment of the present application. Figure 3 As shown, the method includes:

[0062] S301: Receive a link establishment request sent by a user terminal.

[0063] It should be noted that the execution process of S301 refers to S201 and will not be repeated here.

[0064] S302: Establish a target communication protocol link between the middleware and the client according to the link establishment request.

[0065] It should be noted that the execution process of S302 refers to S202 and will not be repeated here.

[0066] S303: Determine multiple historical link information stored in the cache and multiple corresponding historical user identifiers.

[0067] The plurality of historical link information are historical link information corresponding to historical links established in history, and the plurality of historical user information are user identifiers included in historical link establishment requests received in history.

[0068] Exemplarily, each time a link establishment request is received or a secure protocol link is established, the information stored in the cache is updated.

[0069] Combined with the scenario example, the data in the cache can be accessed immediately without reading from the database or other slow storage, which greatly shortens the response time. Through caching, network latency and disk I / O operations can be significantly reduced, improving the overall performance of the system.

[0070] If the target user identifier is included in the multiple historical user identifiers, S304 is executed.

[0071] If the target user identifier is not included in the multiple historical user identifiers, execute S305.

[0072] S304: Determine a target security protocol link according to the target user identifier, or establish a target security protocol link according to historical link information corresponding to the target user identifier.

[0073] Combined with the scenario example, if the target user identifier is included in the multiple historical user identifiers, it means that the target security protocol link corresponding to the target communication protocol link has been established. Examples are given for whether the target security protocol is disconnected.

[0074] As an example, for the scenario where the target security protocol link is not disconnected, the target communication protocol link and the target security protocol link both exist, but the target communication protocol link and the target security protocol link are not associated. The target security protocol link can be determined by the target user identifier and the corresponding relationship between the identifier and the link.

[0075] As another example, in the scenario where the target security protocol link is disconnected, the target communication protocol link exists at this time. If the association process is performed, the target security protocol link needs to be established first. The historical link information includes the link information of the target security protocol link that has been established. By reusing the historical link information, the target security protocol link can be quickly established.

[0076] S305: Establish a target security protocol link, determine target link information corresponding to the target security protocol link, and store the target link information into a cache.

[0077] In combination with the scenario example, if the target user identifier is not included in the multiple historical user identifiers, it means that the target security protocol link corresponding to the target communication protocol link has not been established, and the target security protocol link needs to be established.

[0078] Next, combine Figure 4 Describes how to determine the target security protocol link.

[0079] Figure 4 A schematic diagram of determining a target security protocol link provided in an embodiment of the present application. Figure 4 As shown, multiple historical user identifiers are determined from the cache. If the multiple historical user identifiers include the target user identifier, the target security protocol link can be determined from the existing security protocol links, or the target security protocol link can be established by reusing the historical link information. If the multiple historical user identifiers do not include the target user identifier, a new target security protocol link is established.

[0080] Exemplarily, if a new target security protocol link is established, the target link information corresponding to the target security protocol link is stored in the cache so that when the subsequent target security protocol link is disconnected and re-established, the target link information can be reused to quickly establish the target security protocol link.

[0081] S306: Determine whether there is a target association relationship in the cache.

[0082] The target association relationship is the association relationship between the target communication protocol link and the target security protocol link.

[0083] Exemplarily, the target association relationship corresponds one-to-one with the target communication protocol link and the target security protocol link.

[0084] If yes, execute S307.

[0085] If not, execute S308.

[0086] S307: Associating the target communication protocol link with the target security protocol link according to the target association relationship.

[0087] For example, if a target association relationship exists in the cache, it can be quickly determined through the target association relationship that the target communication protocol link and the target security protocol link can be associated and processed, thereby improving the efficiency of the association processing.

[0088] Exemplarily, after the association process is completed, data can be transmitted between the target communication protocol link and the target safety protocol link, that is, data is output from the target communication protocol link to the target safety protocol link, or data is output from the target safety protocol link to the target communication protocol link.

[0089] Optionally, the target association relationship includes an association processing method, and the target communication protocol link and the target security protocol link can be accurately associated with each other under the guidance of the association processing method.

[0090] S308, associating the input stream of the target communication protocol link with the output stream of the target security protocol link, associating the input stream of the target security protocol link with the output stream of the target communication protocol link, generating a target association relationship, and storing the target association relationship in a cache.

[0091] Combined with the scenario example, if there is no target association relationship in the cache, it means that the target communication protocol link and the target security protocol link have not been associated, and there is no guidance on the method of association processing.

[0092] As an example, after associating the input stream of the target communication protocol link with the output stream of the target security protocol link, when the user enters data in the user terminal and sends it to the middleware through the target communication protocol link, the middleware will forward the data to the target security protocol link, and then transmit it to the server to realize uplink data transmission.

[0093] As another example, after associating the input stream of the target security protocol link with the output stream of the target communication protocol link, when the server inputs data and sends it to the middleware through the target security protocol link, the middleware will forward the data to the target communication protocol link, and then transmit it to the user end, realizing downlink data transmission.

[0094] Combined with the scenario example, by generating and storing the target association relationship, the association processing can be accurately implemented in the subsequent process, thereby improving the accuracy of establishing the remote link.

[0095] A feasible implementation method, the method for establishing a remote link also includes: receiving target uplink data through a target communication protocol link; determining a target timestamp of a target security protocol link; determining a data type of the target uplink data, the data type including a heartbeat message or a non-heartbeat message; if the data type is a heartbeat message, updating the target timestamp according to the current time; if the data type is a non-heartbeat message, sending the target uplink data to a server through a target security protocol link, and updating the target timestamp according to the current time.

[0096] The target timestamp indicates the active state of the target security protocol link. The target timestamp is updated each time the target security protocol link works. The time corresponding to the target timestamp is the time when the target security protocol link was last active.

[0097] Among them, the heartbeat information is used to detect the active state of the link or the network status, so as to keep the target security protocol link alive and avoid the target security protocol link being automatically disconnected due to unused. Non-heartbeat messages are data that the user end needs to send to the server.

[0098] Next, combine Figure 5 Describe the update timestamp.

[0099] Figure 5 A schematic diagram of updating timestamps provided in an embodiment of the present application. Figure 5 As shown, the target uplink data sent by the user end is received through the target communication protocol link. The target timestamp of the target security protocol link is determined. If the target uplink data is heartbeat information, the target timestamp is updated only according to the current time. If the target uplink data is non-heartbeat information, the target uplink data is sent to the server through the target security protocol link, and the target timestamp is updated according to the current time.

[0100] In this feasible implementation, updating the target timestamp can reflect that the target security protocol link is in a normal working state at the current moment, thereby accurately indicating that subsequent data transmission is performed through the target security protocol link.

[0101] In a feasible implementation, the remote link establishment method further includes: receiving target downlink data through a target security protocol link; sending the target downlink data to the user end through a target communication protocol link, and updating the target timestamp according to the current time.

[0102] Combined with the scenario example, for the scenario where the server sends the target downlink data to the user end, the server sends the target downlink data to the middleware through the target security protocol link. The middleware forwards the target downlink data to the user end through the target communication protocol link. When the middleware forwards the target downlink data, it updates the target timestamp.

[0103] In this feasible implementation, updating the target timestamp during the transmission of downlink data can reflect that the target security protocol link is in a normal working state at the current moment, thereby accurately indicating subsequent data transmission through the target security protocol link.

[0104] A feasible implementation method, the remote link establishment method also includes: determining multiple historical timestamps stored in the cache, the multiple historical timestamps correspond one-to-one to multiple historical security protocol links, and the multiple historical timestamps correspond one-to-one to multiple historical link information; determining the link information to be cleaned from the multiple historical link information based on the multiple historical timestamps, and the time length between the historical timestamp corresponding to the link information to be cleaned and the current moment is greater than the time length threshold; deleting the link information to be cleaned from the cache; determining the security protocol link to be cleaned from the multiple historical security protocol links based on the multiple historical timestamps, and the time length between the historical timestamp corresponding to the security protocol link to be cleaned and the current moment is greater than the time length threshold; and disconnecting the security protocol link to be cleaned.

[0105] For example, if the duration threshold is 30 minutes, if the duration between the historical timestamp and the current time is greater than 30 minutes, it means that the corresponding historical security protocol link or historical link information has not been used for a long time, and the user's demand for the corresponding historical security protocol link or historical link information is not high, and cleaning it up can effectively save memory resources.

[0106] Next, combine Figure 6 Explain regular cleaning.

[0107] Figure 6 A schematic diagram of periodic cleaning provided in an embodiment of the present application. Figure 6As shown, multiple historical link information corresponds to multiple historical timestamps, and multiple historical security protocol links correspond to multiple historical timestamps. The link information to be cleaned or the security protocol link to be cleaned is determined according to the interval between the historical timestamp and the current time. The link information to be cleaned is deleted, and the security protocol link to be cleaned is disconnected.

[0108] In this feasible implementation, memory resources can be effectively saved by regularly cleaning up link information or security protocol links.

[0109] Figure 7 A schematic diagram of a remote link establishment device provided in an embodiment of the present application. Figure 7 As shown, the remote link establishment device 70 may include: a receiving module 71, an establishment module 72, a determination module 73, and an association module 74, wherein:

[0110] The receiving module 71 is used to receive a link establishment request sent by a user terminal, where the link establishment request includes a target user identifier.

[0111] The establishing module 72 is used to establish a target communication protocol link between the middleware and the user end according to the link establishment request.

[0112] The determination module 73 is used to determine the target security protocol link according to the target user identifier and the cache, and the target security protocol link is the link between the middleware and the server.

[0113] The association module 74 is used to associate the target communication protocol link with the target security protocol link to establish a remote link between the client and the server.

[0114] Optionally, the receiving module 71 may execute Figure 2 S201 in the embodiment.

[0115] Optionally, the establishment module 72 may execute Figure 2 S202 in the embodiment.

[0116] Optionally, the determination module 73 may execute Figure 2 S203 in the embodiment.

[0117] Optionally, the association module 74 may execute Figure 2 S204 in the embodiment.

[0118] It should be noted that the remote link establishment device shown in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0119] In a possible implementation manner, the determination module 73 is specifically configured to:

[0120] Determine multiple historical link information stored in the cache and corresponding multiple historical user identifiers;

[0121] If the target user identifier is included in the multiple historical user identifiers, the target security protocol link is determined according to the target user identifier, or the target security protocol link is established according to the historical link information corresponding to the target user identifier;

[0122] If the target user identifier is not included in the multiple historical user identifiers, a target security protocol link is established, target link information corresponding to the target security protocol link is determined, and the target link information is stored in a cache.

[0123] Figure 8 A schematic diagram of a remote link establishment device provided in an embodiment of the present application. Figure 7 Based on the embodiment shown, Figure 8 As shown, the remote link establishment device 80 also includes: a processing module 75, a transmission module 76, a forwarding module 77, and a cleaning module 78, wherein:

[0124] The processing module 75 is used to:

[0125] Determine whether there is a target association relationship corresponding to the target communication protocol link and the target security protocol link in the cache;

[0126] If so, the target communication protocol link and the target security protocol link are associated according to the target association relationship;

[0127] If not, the input stream of the target communication protocol link is associated with the output stream of the target security protocol link, the input stream of the target security protocol link is associated with the output stream of the target communication protocol link, and a target association relationship is generated and stored in the cache.

[0128] The transmission module 76 is used for:

[0129] Receive target uplink data through target communication protocol link;

[0130] Determine a target timestamp for a target security protocol link;

[0131] Determine the data type of the target uplink data, the data type includes a heartbeat message or a non-heartbeat message;

[0132] If the data type is a heartbeat message, the target timestamp is updated according to the current time;

[0133] If the data type is non-heartbeat message, the target uplink data is sent to the server through the target security protocol link, and the target timestamp is updated according to the current time.

[0134] The forwarding module 77 is used for:

[0135] Receive target downlink data through target security protocol link;

[0136] The target downlink data is sent to the user end through the target communication protocol link, and the target timestamp is updated according to the current time.

[0137] The cleaning module 78 is used to:

[0138] Determine multiple historical timestamps stored in the cache, the multiple historical timestamps correspond one-to-one to the multiple historical security protocol links, and the multiple historical timestamps correspond one-to-one to the multiple historical link information;

[0139] The time between the historical timestamp corresponding to the cleanup link information and the current time is greater than the time threshold;

[0140] Delete the link information to be cleaned up from the cache;

[0141] Determine, according to the multiple historical timestamps, the security protocol link to be cleared from the multiple historical security protocol links, the time length between the historical timestamp corresponding to the security protocol link to be cleared and the current time is greater than the time length threshold;

[0142] The security protocol link to be cleaned up is disconnected.

[0143] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the electronic device includes:

[0144] The electronic device includes a processor 291 and a memory 292; it may also include a communication interface 293 and a bus 294. The processor 291, the memory 292, and the communication interface 293 may communicate with each other through the bus 294. The communication interface 293 may be used for information transmission. The processor 291 may call the logic instructions in the memory 292 to execute the method of the above embodiment.

[0145] In addition, the logic instructions in the above-mentioned memory 292 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0146] The memory 292 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, that is, implementing the methods in the above method embodiments.

[0147] The memory 292 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 292 may include a high-speed random access memory and may also include a non-volatile memory.

[0148] An embodiment of the present application provides a non-temporary computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method as described in the above embodiment.

[0149] An embodiment of the present application provides a computer program product, including a computer program, which implements the method of the above embodiment when the computer program is executed by a processor.

[0150] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0151] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-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 portion of the sub-steps or stages of other steps.

[0152] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0153] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0154] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. The processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, and an ASIC, etc. The storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc.

[0155] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0156] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not 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.

[0157] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0158] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for establishing a remote link, characterized in that: include: Receiving a link establishment request sent by a user terminal, wherein the link establishment request includes a target user identifier; Establishing a target communication protocol link between the middleware and the client according to the link establishment request; Determine a target security protocol link according to the target user identifier and the cache, wherein the target security protocol link is a link between the middleware and the server; The target communication protocol link and the target security protocol link are associated with each other to establish a remote link between the client and the server.

2. The method according to claim 1, characterized in that: Determining a target security protocol link according to the target user identifier and the cache includes: Determining a plurality of historical link information stored in the cache and a plurality of corresponding historical user identifiers; If the target user identifier is included in the multiple historical user identifiers, determining the target security protocol link according to the target user identifier, or establishing the target security protocol link according to the historical link information corresponding to the target user identifier; If the target user identifier is not included in the multiple historical user identifiers, the target security protocol link is established, and target link information corresponding to the target security protocol link is determined, and the target link information is stored in the cache.

3. The method according to claim 1 or 2, characterized in that: The target communication protocol link and the target security protocol link are associated with each other, including: Determine whether there is a target association relationship corresponding to the target communication protocol link and the target security protocol link in the cache; If so, the target communication protocol link and the target security protocol link are associated with each other according to the target association relationship; If not, the input stream of the target communication protocol link is associated with the output stream of the target security protocol link, the input stream of the target security protocol link is associated with the output stream of the target communication protocol link, and the target association relationship is generated and stored in the cache.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Receiving target uplink data via the target communication protocol link; Determining a target timestamp for the target security protocol link; Determine a data type of the target uplink data, the data type comprising a heartbeat message or a non-heartbeat message; If the data type is a heartbeat message, updating the target timestamp according to the current time; If the data type is a non-heartbeat message, the target uplink data is sent to the server via the target security protocol link, and the target timestamp is updated according to the current time.

5. The method according to claim 4, characterized in that The method further comprises: Receiving target downlink data via the target security protocol link; The target downlink data is sent to the user terminal via the target communication protocol link, and the target timestamp is updated according to the current time.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Determine a plurality of historical timestamps stored in the cache, the plurality of historical timestamps corresponding one-to-one to a plurality of historical security protocol links, and the plurality of historical timestamps corresponding one-to-one to a plurality of historical link information; Determine the link information to be cleared from the multiple historical link information according to the multiple historical timestamps, the duration between the historical timestamp corresponding to the link information to be cleared and the current time being greater than a duration threshold; Deleting the link information to be cleared from the cache; Determine, according to the multiple historical timestamps, a security protocol link to be cleared from the multiple historical security protocol links, wherein the duration between the historical timestamp corresponding to the security protocol link to be cleared and the current moment is greater than a duration threshold; The security protocol link to be cleared is disconnected.

7. A remote link establishment device, characterized in that: include: A receiving module, used for receiving a link establishment request sent by a user terminal, wherein the link establishment request includes a target user identifier; An establishing module, used for establishing a target communication protocol link between the middleware and the user end according to the link establishment request; A determination module, used to determine a target security protocol link according to the target user identifier and the cache, wherein the target security protocol link is a link between the middleware and the server; The association module is used to associate the target communication protocol link with the target security protocol link to establish a remote link between the client and the server.

8. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.