Network request transmission method and device, equipment, storage medium and program product

By obtaining the connection information of the target forwarding device after the terminal is started and creating the corresponding connection channel, the problem of network request failure in a weak network environment is solved, and the effect of improving the success rate of network requests is achieved.

CN119652976AActive Publication Date: 2025-03-18TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411584740.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-03-18
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

The network connection between the terminal and the server in a weak network environment may fail due to link overload, packet loss, excessive delay, or operator restrictions, resulting in a low success rate of network requests.

Method used

After the target terminal is started, a device acquisition request is sent to the server to obtain the connection information of the target forwarding device, a connection channel between the terminal and the forwarding device is created, and a network request is sent through the pre-created connection channel between the terminal and the server. If the sending fails, the request is forwarded to the server through the forwarding device.

Benefits of technology

By building a second transmission channel of the terminal request server, the success rate of network requests is improved, especially in a weak network environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652976A_ABST
    Figure CN119652976A_ABST
Patent Text Reader

Abstract

The invention relates to a network request transmission method and device, equipment, a storage medium and a program product. The method comprises the steps of sending an equipment acquisition request to a server after a target terminal is started; receiving device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request; for each target forwarding device, establishing a connection channel between the target terminal and the target forwarding device based on the device connection information of the target forwarding device, and obtaining a first connection channel corresponding to the target forwarding device; sending a network request to the server through a second connection channel between the target terminal and the server; and if the network request fails to be sent, sending the network request to each target forwarding device through a first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the network request to the server through a third connection channel between the target forwarding device and the server. By adopting the method, the network request success rate 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 computer technology, and in particular to a network request transmission method, device, equipment, storage medium and program product. Background Art

[0002] When a terminal running a target application requests a service from a server that provides services for the target application, it needs to send a network request to the server. In traditional technologies, a terminal usually sends a network request to a server through a connection channel between the terminal and the server to request related services from the server. However, the network connection between the terminal and the server may not be reachable due to various reasons, such as link overload, high packet loss, high latency, operator restrictions, etc., especially when the terminal is in a weak network environment, network request sending often fails, resulting in a low success rate of the terminal's network request. Summary of the invention

[0003] Based on this, it is necessary to provide a network request transmission method, device, equipment, storage medium and program product that can improve the success rate of network requests in response to the above technical problems.

[0004] In a first aspect, the present application provides a network request transmission method, which is applied to a target terminal; the method comprises:

[0005] After the target terminal is started, a device acquisition request is sent to the server;

[0006] receiving device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request;

[0007] For each of the target forwarding devices, based on the device connection information of the target forwarding device, a connection channel between the target terminal and the target forwarding device is created to obtain a first connection channel corresponding to the target forwarding device;

[0008] Sending a network request to the server through a pre-created second connection channel between the target terminal and the server;

[0009] If the network request fails to be sent, the network request is sent to each target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the network request to the server through a third connection channel pre-created between the target forwarding device and the server.

[0010] In a second aspect, the present application provides a network request transmission device, which is applied to a target terminal; the device includes:

[0011] A sending module, used for sending a device acquisition request to a server after the target terminal is started;

[0012] A receiving module, configured to receive device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request;

[0013] A creation module, configured to create, for each of the target forwarding devices, a connection channel between the target terminal and the target forwarding device based on the device connection information of the target forwarding device, and obtain a first connection channel corresponding to the target forwarding device;

[0014] The sending module is also used to send a network request to the server through a second connection channel pre-created between the target terminal and the server; if the network request fails to be sent, the network request is sent to each target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the network request to the server through a third connection channel pre-created between the target forwarding device and the server.

[0015] In a third aspect, the present application provides a target terminal, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the method embodiments of the present application when executing the computer program.

[0016] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the method embodiments of the present application.

[0017] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps in the method embodiments of the present application when the computer program is executed by a processor.

[0018] The above-mentioned network request transmission method, device, equipment, storage medium and program product, after the target terminal is started, the target terminal sends a device acquisition request to the server; receives the device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request; for each target forwarding device, based on the device connection information of the target forwarding device, creates a connection channel between the target terminal and the target forwarding device, and obtains the first connection channel corresponding to the target forwarding device; sends a network request to the server through the pre-created second connection channel between the target terminal and the server; if the network request fails to be sent, for each target forwarding device, sends a network request to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the network request to the server through the pre-created third connection channel between the target forwarding device and the server. Compared with the traditional network request transmission scheme, the present application constructs a second transmission channel for the terminal to request the server by requesting the target forwarding device from the server after the target terminal is started. Once the target terminal fails to send a network request to the server, the network request success rate of the terminal can be improved by sending a network request to the target forwarding device and forwarding the network request to the server through the target forwarding device. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A diagram of an application environment of a network request transmission method in an embodiment;

[0020] Figure 2 A schematic diagram of a flow chart of a network request transmission method in one embodiment;

[0021] Figure 3 A schematic diagram of a flow chart of a network request transmission method in another embodiment;

[0022] Figure 4 It is a structural block diagram of a network request transmission device in one embodiment;

[0023] Figure 5 FIG. 4 is a diagram showing the internal structure of a target terminal in an embodiment. DETAILED DESCRIPTION

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

[0025] The network request transmission method provided in this application can be applied to Figure 1In the application environment shown. After the target terminal 102 is started, the target terminal 102 may send a device acquisition request to the server 104, and receive the device connection information of at least one target forwarding device 106 fed back by the server 104 in response to the device acquisition request. For each target forwarding device 106, the target terminal 102 may create a connection channel between the target terminal 102 and the target forwarding device 106 based on the device connection information of the target forwarding device 106, and obtain the first connection channel corresponding to the target forwarding device 106. The target terminal 102 may send a network request to the server 104 through the second connection channel between the target terminal 102 and the server 104 created in advance. If the network request fails to be sent, for each target forwarding device 106, the target terminal 102 may send a network request to the target forwarding device 106 through the first connection channel corresponding to the target forwarding device 106, so that the target forwarding device 106 forwards the network request to the server 104 through the third connection channel between the target forwarding device 106 and the server 104 created in advance.

[0026] In one embodiment, Figure 2 As shown, a network request transmission method is provided, which is applied to a target terminal; the method comprises the following steps:

[0027] Step 202: After the target terminal is started, a device acquisition request is sent to the server.

[0028] The device acquisition request is used to request the server for the device connection information of the target forwarding device. The device connection information includes the device IP (Internet Protocol) address of the target forwarding device and the connection type information of the target forwarding device. The connection type information is used to describe whether the target forwarding device can be directly connected to the target terminal.

[0029] Specifically, after the target terminal is started, the target terminal may create a second connection channel between the target terminal and the server. Furthermore, the target terminal may send a device acquisition request to the server through the second connection channel between the target terminal and the server.

[0030] Step 204: receiving device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request.

[0031] Specifically, the server corresponds to multiple candidate forwarding devices. The server can receive a device acquisition request sent by the target terminal, and in response to the device acquisition request, select at least one target forwarding device from the multiple candidate forwarding devices corresponding to the server. Furthermore, the server can send the device connection information of the selected target forwarding device to the target terminal, and the target terminal can receive the device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request.

[0032] In one embodiment, the server may select a target forwarding device from multiple candidate forwarding devices corresponding to the server in response to the device acquisition request. Furthermore, the server may send the device connection information of the selected target forwarding device to the target terminal, and the target terminal may receive the device connection information of the target forwarding device fed back by the server in response to the device acquisition request.

[0033] In one embodiment, the server may select multiple target forwarding devices from multiple candidate forwarding devices corresponding to the server in response to the device acquisition request. Then, the server may send the device connection information of the selected multiple target forwarding devices to the target terminal, and the target terminal may receive the device connection information of the multiple target forwarding devices fed back by the server in response to the device acquisition request. In this way, since there are multiple target forwarding devices, even if some of the target forwarding devices cannot successfully forward the network request to the server due to various reasons, there are still other target forwarding devices that can successfully forward the network request to the server, which can further improve the success rate of the terminal's network request.

[0034] Step 206: for each target forwarding device, based on the device connection information of the target forwarding device, a connection channel between the target terminal and the target forwarding device is created to obtain a first connection channel corresponding to the target forwarding device.

[0035] Step 208: Send a network request to the server through the pre-created second connection channel between the target terminal and the server.

[0036] Specifically, after the target terminal is started, the target terminal can create a second connection channel between the target terminal and the server. The target terminal can first send a network request to the server through the second connection channel between the target terminal and the server. It can be understood that if the network request is successfully sent to the server through the second connection channel between the target terminal and the server, the target forwarding device will not be enabled to forward the network request. If the network request is failed to be sent to the server through the second connection channel between the target terminal and the server, the target forwarding device will be enabled to forward the network request.

[0037] Step 210, if the network request fails to be sent, then for each target forwarding device, a network request is sent to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the network request to the server through the third connection channel pre-created between the target forwarding device and the server.

[0038] In one embodiment, if sending a network request to the server through the second connection channel between the target terminal and the server fails, then for each target forwarding device, the target terminal can send a network request to the target forwarding device through the first connection channel corresponding to the target forwarding device. The target forwarding device can receive the network request and forward the network request to the server through the third connection channel between the target forwarding device and the server that is pre-created. It can be understood that the third connection channel between the target forwarding device and the server is created immediately after the target forwarding device is started.

[0039] In the above network request transmission method, after the target terminal is started, the target terminal sends a device acquisition request to the server; receives the device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request; for each target forwarding device, based on the device connection information of the target forwarding device, creates a connection channel between the target terminal and the target forwarding device, and obtains the first connection channel corresponding to the target forwarding device; sends a network request to the server through the pre-created second connection channel between the target terminal and the server; if the network request fails to be sent, for each target forwarding device, sends a network request to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the network request to the server through the pre-created third connection channel between the target forwarding device and the server. Compared with the traditional network request transmission scheme, the present application constructs a second transmission channel for the terminal to request the server by requesting the target forwarding device from the server after the target terminal is started. Once the target terminal fails to send a network request to the server, the network request success rate of the terminal can be improved by sending a network request to the target forwarding device and forwarding the network request to the server through the target forwarding device.

[0040] In one embodiment, the method further includes: for each target forwarding device, receiving request response data forwarded by the target forwarding device; the request response data is generated by the server in response to the network request and sent to the target forwarding device.

[0041] In one embodiment, after the target terminal is started, the target terminal may send a device acquisition request to the server, and receive device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request. For each target forwarding device, the target terminal may create a connection channel between the target terminal and the target forwarding device based on the device connection information of the target forwarding device, and obtain the first connection channel corresponding to the target forwarding device. The target terminal may send a network request to the server through a pre-created second connection channel between the target terminal and the server. If the network request fails to be sent, for each target forwarding device, the target terminal may send a network request to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the network request to the server through a pre-created third connection channel between the target forwarding device and the server. The server may generate request response data in response to the network request, and send the request response data to the target forwarding device. The target forwarding device may forward the request response data to the target terminal, and the target terminal may receive the request response data forwarded by the target forwarding device.

[0042] In the above embodiment, by forwarding the request response data generated by the server in response to the network request to the target terminal through the target forwarding device, it is possible to avoid the situation where the request response data cannot be successfully returned to the target terminal through the second connection channel between the target terminal and the server, thereby improving the terminal's network request success rate.

[0043] In one embodiment, the method also includes: receiving an encryption key and a decryption key corresponding to the encryption key fed back by the server in response to a request to obtain a device; if the network request fails to be sent, for each target forwarding device, sending the network request to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the network request to the server through a third connection channel pre-created between the target forwarding device and the server, including: if the network request fails to be sent, encrypting the network request with the encryption key to obtain request encrypted data; for each target forwarding device, sending request encrypted data to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the request encrypted data to the server through the third connection channel pre-created between the target forwarding device and the server; wherein, after receiving the request encrypted data, the server uses the decryption key to decrypt the request encrypted data to obtain the network request.

[0044] In one embodiment, after the target terminal is started, the target terminal may send a device acquisition request to the server, and receive the device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request, and receive the encryption key fed back by the server in response to the device acquisition request and the decryption key corresponding to the encryption key. For each target forwarding device, the target terminal may create a connection channel between the target terminal and the target forwarding device based on the device connection information of the target forwarding device, and obtain the first connection channel corresponding to the target forwarding device. The target terminal may send a network request to the server through a pre-created second connection channel between the target terminal and the server. If the network request fails to be sent, the target terminal may encrypt the network request using the encryption key to obtain the request encrypted data. For each target forwarding device, the target terminal may send the request encrypted data to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the request encrypted data to the server through the pre-created third connection channel between the target forwarding device and the server. After receiving the request encrypted data, the server may decrypt the request encrypted data using the decryption key to obtain the network request. The server may generate request response data in response to the network request, and send the request response data to the target forwarding device. The target forwarding device may forward the request response data to the target terminal, and the target terminal may receive the request response data forwarded by the target forwarding device.

[0045] In the above embodiment, the network request is encrypted by the encryption key agreed upon by the target terminal and the server, and then sent to the target forwarding device. The target forwarding device then forwards the encrypted request data after encrypting the network request to the server, and the server uses the decryption key corresponding to the encryption key to decrypt the encrypted request data to obtain the network request. In this way, the target forwarding device can only obtain the encrypted request data after encrypting the network request, but cannot obtain the network request itself, thereby improving the security of network request transmission.

[0046] In one embodiment, for each target forwarding device, request response data forwarded by the target forwarding device is received, including: for each target forwarding device, encrypted response data is received forwarded by the target forwarding device; the encrypted response data is obtained by encrypting the request response data using an encryption key after the server generates the request response data in response to the network request; and the encrypted response data is decrypted using a decryption key to obtain the request response data.

[0047] In one embodiment, after the target terminal is started, the target terminal may send a device acquisition request to the server, and receive the device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request, and receive the encryption key fed back by the server in response to the device acquisition request and the decryption key corresponding to the encryption key. For each target forwarding device, the target terminal may create a connection channel between the target terminal and the target forwarding device based on the device connection information of the target forwarding device, and obtain the first connection channel corresponding to the target forwarding device. The target terminal may send a network request to the server through a pre-created second connection channel between the target terminal and the server. If the network request fails to be sent, the target terminal may encrypt the network request using the encryption key to obtain the request encrypted data. For each target forwarding device, the target terminal may send the request encrypted data to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the request encrypted data to the server through the pre-created third connection channel between the target forwarding device and the server. After receiving the request encrypted data, the server may decrypt the request encrypted data using the decryption key to obtain the network request. For each target forwarding device, the server can generate request response data in response to the network request, and use the encryption key to encrypt the request response data to obtain encrypted response data, and send the encrypted response data to the target forwarding device, and the target forwarding device can forward the encrypted response data to the target terminal. The target terminal can receive the encrypted response data forwarded by the target forwarding device, and use the decryption key to decrypt the encrypted response data to obtain the request response data.

[0048] In the above embodiment, the request response data is encrypted by the encryption key agreed upon by the target terminal and the server, and then sent to the target forwarding device. The target forwarding device then forwards the encrypted response data after encrypting the request response data to the target terminal, and the target terminal decrypts the encrypted response data using the decryption key corresponding to the encryption key to obtain the request response data. In this way, the target forwarding device can only obtain the encrypted response data after encrypting the request response data, but cannot obtain the request response data itself, thereby improving the security of the request response data transmission.

[0049] In one embodiment, the server corresponds to multiple candidate forwarding devices; at least one target forwarding device is selected by the server from multiple candidate forwarding devices based on at least one of the distance between the candidate forwarding device and the target terminal, the connection type information of the candidate forwarding device, or the operator information of the candidate forwarding device; the connection type information is used to describe whether the candidate forwarding device can be directly connected to the target terminal.

[0050] In one embodiment, the server may preferentially select as the target forwarding device a candidate forwarding device whose distance to the target terminal is shorter, whose connection type information indicates that the candidate forwarding device and the target terminal can be directly connected, or whose operator information is consistent with the operator information of the target terminal.

[0051] In the above embodiment, by selecting a target forwarding device from multiple candidate forwarding devices based on at least one of the distance between the candidate forwarding device and the target terminal, the connection type information of the candidate forwarding device, or the operator information of the candidate forwarding device, a target forwarding device with a higher success rate in forwarding network requests can be selected, thereby further improving the success rate of the terminal's network requests.

[0052] In one embodiment, the method further includes: if the network request is sent successfully, receiving request response data fed back by the server through the second connection channel; the request response data is generated by the server in response to the network request.

[0053] In one embodiment, after the target terminal is started, the target terminal may send a device acquisition request to the server, and receive device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request. For each target forwarding device, the target terminal may create a connection channel between the target terminal and the target forwarding device based on the device connection information of the target forwarding device, and obtain a first connection channel corresponding to the target forwarding device. The target terminal may send a network request to the server through a pre-created second connection channel between the target terminal and the server. If the network request is sent successfully, the server may generate request response data in response to the network request, and feed back the request response data to the target terminal through the second connection channel between the target terminal and the server. The target terminal may receive the request response data fed back by the server through the second connection channel.

[0054] In the above embodiment, if the network request is sent successfully, the request response data is fed back to the target terminal directly through the second connection channel between the target terminal and the server, which can improve the transmission efficiency of the request response data.

[0055] In one embodiment, a target application is running in the target terminal; at least one target forwarding device includes at least one of a third-party terminal or an edge device of the target terminal; and the third-party terminal is a terminal other than the target terminal that is running the target application.

[0056] In the above embodiment, by limiting the target forwarding device to include at least one of a third-party terminal or an edge device of the target terminal, the success rate of the terminal's network request can be further improved.

[0057] In one embodiment, Figure 3As shown, after the target terminal is started, the target terminal can create a second connection channel between the target terminal and the server. Then, the target terminal can send a device acquisition request to the server through the second connection channel between the target terminal and the server. The server corresponds to multiple candidate forwarding devices. The server can receive the device acquisition request sent by the target terminal, and in response to the device acquisition request, select at least one target forwarding device from the multiple candidate forwarding devices corresponding to the server. Then, the server can send the device connection information of the selected target forwarding device, and the encryption key and the decryption key corresponding to the encryption key fed back by the server in response to the device acquisition request to the target terminal, and the target terminal can receive the device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request, as well as the encryption key and the decryption key. For each target forwarding device, the target terminal can create a connection channel between the target terminal and the target forwarding device based on the device connection information of the target forwarding device, and obtain the first connection channel corresponding to the target forwarding device. The target terminal can send a network request to the server through the second connection channel between the target terminal and the server. If the network request fails to be sent, the target terminal can encrypt the network request using the encryption key to obtain the request encrypted data. For each target forwarding device, the target terminal can send request encrypted data to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the request encrypted data to the server through the third connection channel pre-created between the target forwarding device and the server. After receiving the request encrypted data, the server can use the decryption key to decrypt the request encrypted data to obtain the network request. For each target forwarding device, the server can generate request response data in response to the network request, and use the encryption key to encrypt the request response data to obtain the response encrypted data, and send the response encrypted data to the target forwarding device, and the target forwarding device can forward the response encrypted data to the target terminal. The target terminal can receive the response encrypted data forwarded by the target forwarding device, and use the decryption key to decrypt the response encrypted data to obtain the request response data.

[0058] It should be understood that, although each step in the flow chart of the above-mentioned embodiments is shown in order, these steps are not necessarily performed in order. Unless there is a clear explanation in this article, the execution of these steps does not have strict order restrictions, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the above-mentioned embodiments may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in order, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0059] In one embodiment, Figure 4 As shown, a network request transmission device 400 is provided, which is applied to a target terminal; the device specifically includes:

[0060] The sending module 402 is used to send a device acquisition request to the server after the target terminal is started;

[0061] The receiving module 404 is used to receive the device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request;

[0062] A creation module 406 is used to create, for each target forwarding device, a connection channel between the target terminal and the target forwarding device based on the device connection information of the target forwarding device, and obtain a first connection channel corresponding to the target forwarding device;

[0063] The sending module 402 is also used to send a network request to the server through a second connection channel pre-created between the target terminal and the server; if the network request fails to be sent, then for each target forwarding device, the network request is sent to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the network request to the server through a third connection channel pre-created between the target forwarding device and the server.

[0064] In one embodiment, the receiving module 404 is further used to receive request response data forwarded by each target forwarding device; the request response data is generated by the server in response to the network request and sent to the target forwarding device.

[0065] In one embodiment, the receiving module 404 is also used to receive the encryption key and the decryption key corresponding to the encryption key fed back by the server in response to the device acquisition request; the sending module 402 is also used to encrypt the network request using the encryption key to obtain the request encrypted data if the network request fails to be sent; for each target forwarding device, the request encrypted data is sent to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the request encrypted data to the server through a third connection channel pre-created between the target forwarding device and the server; wherein, after receiving the request encrypted data, the server uses the decryption key to decrypt the request encrypted data to obtain the network request.

[0066] In one embodiment, the receiving module 404 is also used to receive the response encrypted data forwarded by the target forwarding device for each target forwarding device; the response encrypted data is obtained by encrypting the request response data using an encryption key after the server generates request response data in response to a network request; and the response encrypted data is decrypted using a decryption key to obtain the request response data.

[0067] In one embodiment, the server corresponds to multiple candidate forwarding devices; at least one target forwarding device is selected by the server from multiple candidate forwarding devices based on at least one of the distance between the candidate forwarding device and the target terminal, the connection type information of the candidate forwarding device, or the operator information of the candidate forwarding device; the connection type information is used to describe whether the candidate forwarding device can be directly connected to the target terminal.

[0068] In one embodiment, the receiving module 404 is further configured to receive request response data fed back by the server through the second connection channel if the network request is sent successfully; the request response data is generated by the server in response to the network request.

[0069] In one embodiment, a target application is running in the target terminal; at least one target forwarding device includes at least one of a third-party terminal or an edge device of the target terminal; and the third-party terminal is a terminal other than the target terminal that is running the target application.

[0070] The above-mentioned network request transmission device, after the target terminal is started, the target terminal sends a device acquisition request to the server; receives the device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request; for each target forwarding device, based on the device connection information of the target forwarding device, creates a connection channel between the target terminal and the target forwarding device, and obtains the first connection channel corresponding to the target forwarding device; sends a network request to the server through the pre-created second connection channel between the target terminal and the server; if the network request fails to be sent, for each target forwarding device, sends a network request to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the network request to the server through the pre-created third connection channel between the target forwarding device and the server. Compared with the traditional network request transmission scheme, the present application constructs a second transmission channel for the terminal to request the server by requesting the target forwarding device from the server after the target terminal is started. Once the target terminal fails to send a network request to the server, the network request success rate of the terminal can be improved by sending a network request to the target forwarding device and forwarding the network request to the server through the target forwarding device.

[0071] Each module in the above network request transmission 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 the processor in the target terminal in the form of hardware, or can be stored in the memory in the target terminal in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0072] In one embodiment, a target terminal is provided, whose internal structure diagram can be as follows: Figure 5As shown. The target terminal includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the target terminal is used to provide computing and control capabilities. The memory of the target terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. 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 target terminal is used to exchange information between the processor and an external device. The communication interface of the target terminal is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a network request transmission method is implemented. The display unit of the target terminal is used to form a visually visible picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the target terminal can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the target terminal shell, or an external keyboard, touchpad or mouse, etc.

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

[0074] In one embodiment, a target terminal is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0075] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0076] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

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

[0078] Those of ordinary skill 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 memory, storage, database or other media 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), tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. 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).

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

[0080] The above-mentioned 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 invention patent. 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 patent of the present application shall be subject to the attached claims.

Claims

1. A network request transmission method, characterized in that: Applied to a target terminal; the method comprises: After the target terminal is started, a device acquisition request is sent to the server; receiving device connection information of at least one target forwarding device fed back by the server in response to the device acquisition request; For each of the target forwarding devices, based on the device connection information of the target forwarding device, a connection channel between the target terminal and the target forwarding device is created to obtain a first connection channel corresponding to the target forwarding device; Sending a network request to the server through a pre-created second connection channel between the target terminal and the server; If the network request fails to be sent, the network request is sent to each target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the network request to the server through a third connection channel pre-created between the target forwarding device and the server.

2. The method according to claim 1, characterized in that The method further comprises: For each of the target forwarding devices, the request response data forwarded by the target forwarding device is received; the request response data is generated by the server in response to the network request and sent to the target forwarding device.

3. The method according to claim 2, characterized in that The method further comprises: Receiving an encryption key fed back by the server in response to the device acquisition request and a decryption key corresponding to the encryption key; If the network request fails to be sent, for each of the target forwarding devices, sending the network request to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the network request to the server through a third connection channel pre-created between the target forwarding device and the server, including: If the network request fails to be sent, encrypting the network request using the encryption key to obtain request encrypted data; For each of the target forwarding devices, the request encrypted data is sent to the target forwarding device through the first connection channel corresponding to the target forwarding device, so that the target forwarding device forwards the request encrypted data to the server through a third connection channel pre-created between the target forwarding device and the server; wherein, after receiving the request encrypted data, the server uses the decryption key to decrypt the request encrypted data to obtain the network request.

4. The method according to claim 3, characterized in that The step of receiving, for each of the target forwarding devices, request response data forwarded by the target forwarding device comprises: For each of the target forwarding devices, receiving the encrypted response data forwarded by the target forwarding device; the encrypted response data is obtained by encrypting the request response data using the encryption key after the server generates the request response data in response to the network request; The encrypted response data is decrypted using the decryption key to obtain the request response data.

5. The method according to claim 1, characterized in that The server corresponds to multiple candidate forwarding devices; the at least one target forwarding device is selected by the server from multiple candidate forwarding devices based on at least one of the distance between the candidate forwarding device and the target terminal, the connection type information of the candidate forwarding device, or the operator information of the candidate forwarding device; the connection type information is used to describe whether the candidate forwarding device can be directly connected to the target terminal.

6. The method according to claim 1, characterized in that The method further comprises: If the network request is sent successfully, then the request response data fed back by the server through the second connection channel is received; the request response data is generated by the server in response to the network request.

7. The method according to any one of claims 1 to 6, characterized in that The target terminal runs a target application; the at least one target forwarding device includes at least one of a third-party terminal or an edge device of the target terminal; the third-party terminal is a terminal other than the target terminal that runs the target application.

8. A target terminal, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

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

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

Citation Information

Patent Citations

  • Information processing method and device

    CN106332119A

  • Communication method, server, mobile device and computer readable storage medium

    CN111586888A

  • Client software network optimization method, system and device and storage medium

    CN111786809A

  • Edge service acquisition method and device, edge computing system, medium and equipment

    CN115297098A

  • Power station data sending method, device, terminal, system, server, power station, electronic equipment and medium

    CN117119560A