Data transmission method and device, sending equipment and storage medium
By choosing the point-to-point transmission method in the data transmission process and using the transit transmission method of the public network or edge server in case of failure, the problems of high traffic cost and low transmission efficiency in the screen projection process in the prior art are solved, and high efficiency is achieved. Stable data transmission.
Patent Information
- Application Number
- CN202310606340.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-25
- Publication Date
- 2024-11-26
AI Technical Summary
The existing public network screen projection method consumes a lot of traffic during data transmission, resulting in increased traffic costs for users to cast screens and poor transmission efficiency and experience.
Point-to-point transmission is used as the preferred method. If it fails, it will be transferred through the public network or edge server to ensure the continuity and efficiency of data transmission.
It reduces the delay and traffic consumption during data transmission, improves user experience and transmission success rate, and meets the transmission needs in different scenarios.
Smart Images

Figure CN119030925A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data transmission, and more specifically, to a method, apparatus, sending device and storage medium for data transmission in the field of data transmission. Background Art
[0002] At present, with the continuous development and reform of Internet technology, users' demands for terminal devices are becoming more and more diversified. For example, taking smartphones and smart TVs as terminal devices, users can cast the audio and video played on their smartphones to smart TVs in order to achieve a better viewing experience.
[0003] Common screen projection methods are LAN projection and public network projection, depending on the area where the sending device and the receiving device are located. Regardless of which of the above screen projection methods is used, as long as the sending device and the receiving device can be connected to the public network at the same time, it can be achieved through the public network projection method.
[0004] At present, public network screen projection usually requires the help of public network servers (audio and video servers) to forward screen projection data to achieve screen projection. The public network server consumes a lot of traffic during the forwarding process, resulting in an increase in the traffic cost of user screen projection.
[0005] In summary, how to save traffic costs during the screen projection process has become an urgent problem that needs to be solved. Summary of the invention
[0006] The present application provides a data transmission method, apparatus, sending device and storage medium. The method can improve the transmission efficiency and save the traffic cost in the data transmission process by giving priority to point-to-point transmission during data transmission between a receiving device and a sending device. In the case of point-to-point transmission failure, the transit transmission method is used to ensure that the transmission process is not interrupted, thereby improving the user's transmission experience.
[0007] In a first aspect, a method for data transmission is provided, the method comprising: sending a data transmission request to a receiving device, the data transmission request being used to request transmission of target data with the receiving device; transmitting the target data with the receiving device based on a point-to-point transmission mode in response to a data transmission response sent by the receiving device; in the event of a failure in transmission with the receiving device based on the point-to-point transmission mode, transmitting the target data with the receiving device via a target transit transmission mode, the target transit transmission mode comprising a public network transmission mode or an edge transmission mode.
[0008] In the above technical solution, when the receiving device needs to transmit target data with the sending device, the present application proposes a method for data transmission. Specifically, in the transmission process, the point-to-point transmission method is preferred. Since the point-to-point transmission method allows the receiving device and the sending device to directly transmit the target data without the need for transfer. Therefore, when the point-to-point transmission method is successful, the above process of transmitting the target data reduces the delay during the target data transmission process on the one hand, thereby achieving the effect of efficiently transmitting the target data. On the other hand, it can also avoid the traffic consumption that may be generated by the public network transmission method, thereby reducing the transmission cost during the target data transmission process.
[0009] In another scenario, if the point-to-point transmission method fails, the present application can also continue to transmit the target data by means of the target relay transmission method, thereby ensuring that the target data transmission process is not interrupted when the point-to-point transmission method fails, and improving the user experience during the target data transmission process.
[0010] In combination with the first aspect, in some possible implementations, in the event that the transmission with the receiving device based on the point-to-point transmission mode fails, transmitting the target data with the receiving device through a target relay transmission mode includes: in the event that the transmission with the receiving device based on the point-to-point transmission mode fails, determining a target relay server, which is a public network server or an edge server; and transmitting the target data with the receiving device through the target relay transmission mode corresponding to the target relay server.
[0011] In the above technical solution, it is proposed how the sending device transmits the target data to the receiving device through the target relay transmission mode when the point-to-point transmission mode fails. The relay transmission mode usually corresponds to a relay server. The target relay transmission mode of the present application can be a public network transmission mode or an edge transmission mode. Correspondingly, the target relay server can be a public network server or an edge server. Therefore, the present application can first determine the target relay server from the public network server and the edge server, and then transmit the target data to the receiving device through the target relay transmission mode corresponding to the target relay server.
[0012] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, determining the target relay server includes: determining whether the relay server includes the edge server; when the relay server does not include the edge server, determining the public network server as the target relay server; when the relay server includes the edge server, determining the target relay server based on the priority of the edge transmission mode and the priority of the public network transmission mode, or based on the transmission rate of the edge transmission mode and the transmission rate of the public network transmission mode.
[0013] In the above technical solution, a method for determining the target transit server is proposed. As an international Internet, the public network can be accessed by any device. Therefore, during the target data transmission process, the public network server must exist. However, the edge server is deployed according to the actual situation and does not necessarily exist. Therefore, this application can be divided into two determination scenarios based on whether the transit server includes the edge server:
[0014] In the first scenario, if the transit server does not include an edge server, that is, there is only a public network server. In this case, the public network server can be directly determined as the target transit server.
[0015] In another case, if the transit server includes an edge server. In this case, any one of the edge server and the public network server can be used as the target transit server. Specifically, the present application can determine the target transit server based on the priority of the edge transmission mode and the priority of the public network transmission mode, or the transmission rate of the edge transmission mode and the transmission rate of the public network transmission mode.
[0016] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the determining of the target transit server according to the priority of the edge transmission mode and the priority of the public network transmission mode, or according to the transmission rate of the edge transmission mode and the transmission rate of the public network transmission mode includes any of the following: when the priority of the public network transmission mode is higher than the priority of the edge transmission mode, the public network server is determined as the target transit server; when the transmission rate of the public network transmission mode is greater than the transmission rate of the edge transmission mode, the public network server is determined as the target transit server; when the priority of the public network transmission mode is lower than or equal to the priority of the edge transmission mode, the edge server is determined as the target transit server; when the transmission rate of the public network transmission mode is less than or equal to the transmission rate of the edge transmission mode, the edge server is determined as the target transit server.
[0017] In the above technical solution, according to the priority and transmission rate, it can be divided into four scenarios. If the priority of the public network transmission method is higher, or the transmission rate of the public network transmission method is faster, the public network server is used as the target relay server; on the contrary, if the priority of the public network transmission method is lower, or the transmission rate of the public network transmission method is slower, the edge server is used as the target relay server.
[0018] The above-mentioned method of using a high-priority or fast-transmission-rate transit server as a target transit server can ensure the high efficiency of transmitting target data through the transit transmission method and reduce the delay of the transit transmission method.
[0019] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the target data is transmitted to the receiving device through the target relay transmission mode corresponding to the target relay server, including: when the target relay server is the public network server, the target data is transmitted to the receiving device through the public network transmission mode; when the target relay server is the edge server, the target data is transmitted to the receiving device through the edge transmission mode.
[0020] In the above technical solution, different target relay servers correspond to different target relay transmission modes. When the target relay server is a public network server, the target relay transmission mode is a public network transmission mode; when the target relay transmission mode is an edge server, the target relay transmission mode is an edge transmission mode. The above process realizes that in the event of point-to-point transmission failure, different target relay transmission modes are flexibly selected to transmit target data according to different target relay servers. It avoids the problem of single transmission caused by using only one transmission mode, can meet the transmission requirements in different scenarios, and improves the user experience.
[0021] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, after transmitting the target data to the receiving device through the edge transmission method, the method also includes: in the case of receiving a transmission failure message sent by the edge server, transmitting the target data to the receiving device through the public network transmission method.
[0022] In the above technical solution, the public network server can access any device. Since the edge server is manually deployed, when the access of the receiving device is restricted, the edge transmission method may fail. In the case of failure of the edge transmission method, the present application can continue to use the public network server to transmit the target data. The above process can ensure that the transmission process of the target data is not interrupted when both the point-to-point transmission method and the edge transmission method fail, thereby improving the success rate of the target data transmission.
[0023] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: in response to the configuration operation on the login interface of the public network server, sending a first connection request to the public network server so that the public network server authenticates the sending device, and the first connection request includes a first login identifier of the sending device; when the public network server successfully authenticates the sending device, obtaining the priority of the public network transmission mode and the transmission rate of the public network transmission mode through the first hypertext transfer protocol interface; in response to the configuration operation on the login interface of the edge server, sending a second connection request to the edge server so that the edge server authenticates the sending device, and the second connection request includes a second login identifier of the sending device; when the edge server successfully authenticates the sending device, obtaining the priority of the edge transmission mode and the transmission rate of the edge transmission mode through the second hypertext transfer protocol interface.
[0024] In the above technical solution, a step for obtaining the priority and transmission rate of the transit transmission mode is proposed. Specifically, the user can determine the first login identifier of the sending device based on the configuration operation in the public network server login interface of the sending device. The sending device further sends the first login identifier to the public network server and requests the public network server to perform identity authentication. If the verification is successful, the priority and transmission rate of the public network transmission mode are obtained. Similarly, the sending device obtains the priority and transmission rate of the edge transmission mode in the same manner as described above. The above process of obtaining the priority and transmission rate of the two transit transmission modes provides a basis for the determination process of the target transit server, thereby ensuring efficient transmission of the target data.
[0025] In summary, when a receiving device needs to transmit target data with a sending device, the present application proposes a method for data transmission. Specifically, in the transmission process, a point-to-point transmission method is preferred. Since the point-to-point transmission method allows the receiving device and the sending device to directly transmit the target data without the need for transfer. Therefore, when the point-to-point transmission method is successful, the above-mentioned process of transmitting the target data reduces the delay during the target data transmission process on the one hand, thereby achieving the effect of efficiently transmitting the target data. On the other hand, it can also avoid the traffic consumption that may be generated by the public network transmission method, thereby reducing the transmission cost during the target data transmission process.
[0026] In another scenario, if the point-to-point transmission method fails, the present application can also continue to transmit the target data by means of the target relay transmission method, thereby ensuring that the target data transmission process is not interrupted when the point-to-point transmission method fails, and improving the user experience during the target data transmission process.
[0027] Furthermore, the present application proposes how the sending device transmits target data to the receiving device through a target relay transmission mode when the point-to-point transmission mode fails. The relay transmission mode usually corresponds to a relay server. The target relay transmission mode of the present application can be a public network transmission mode or an edge transmission mode. Correspondingly, the target relay server can be a public network server or an edge server. Therefore, the present application can first determine the target relay server from the public network server and the edge server, and then transmit the target data to the receiving device through the target relay transmission mode corresponding to the target relay server.
[0028] Specifically, when determining the target transit server, the public network is an international Internet, and any device can access the public network server. Therefore, during the target data transmission process, the public network server must exist. However, the edge server is deployed according to the actual situation and does not necessarily exist. Therefore, this application can be divided into two determination scenarios based on whether the transit server includes the edge server:
[0029] In the first scenario, if the transit server does not include an edge server, that is, there is only a public network server. In this case, the public network server can be directly determined as the target transit server.
[0030] In another case, if the transit server includes an edge server. In this case, any one of the edge server and the public network server can be used as the target transit server. Specifically, the present application can determine the target transit server based on the priority of the edge transmission mode and the priority of the public network transmission mode, or the transmission rate of the edge transmission mode and the transmission rate of the public network transmission mode.
[0031] In the process of determining the target relay server, four scenarios can be divided according to the priority and transmission rate. If the priority of the public network transmission method is higher, or the transmission rate of the public network transmission method is faster, the public network server will be used as the target relay server; on the contrary, if the priority of the public network transmission method is lower, or the transmission rate of the public network transmission method is slower, the edge server will be used as the target relay server.
[0032] The above-mentioned method of using a high-priority or fast-transmission-rate transit server as a target transit server can ensure the high efficiency of transmitting target data through the transit transmission method and reduce the delay of the transit transmission method.
[0033] Different target relay servers correspond to different target relay transmission modes. When the target relay server is a public network server, the target relay transmission mode is the public network transmission mode; when the target relay transmission mode is an edge server, the target relay transmission mode is the edge transmission mode. The above process realizes that in the event of point-to-point transmission failure, different target relay transmission modes can be flexibly selected to transmit target data according to different target relay servers. It avoids the problem of single transmission caused by using only one transmission mode, can meet the transmission requirements in different scenarios, and improves the user experience.
[0034] The public network server can access any device. Since the edge server is manually deployed, the edge transmission method may fail when the receiving device has limited access. In the event of a failure in the edge transmission method, the present application can continue to use the public network server to transmit the target data. The above process can ensure that the transmission process of the target data is not interrupted when both the point-to-point transmission method and the edge transmission method fail, thereby improving the success rate of the target data transmission.
[0035] Finally, a procedure for obtaining the priority and transmission rate of the transit transmission mode is proposed. Specifically, the user can determine the first login identifier of the sending device based on the configuration operation in the public network server login interface of the sending device. The sending device further sends the first login identifier to the public network server and requests the public network server to perform identity authentication. If the verification is successful, the priority and transmission rate of the public network transmission mode are obtained. Similarly, the sending device obtains the priority and transmission rate of the edge transmission mode in the same manner as described above. The above process of obtaining the priority and transmission rate of the two transit transmission modes provides a basis for the determination process of the target transit server, thereby ensuring efficient transmission of the target data.
[0036] In a second aspect, a data transmission device is provided, which includes: a sending module, used to send a data transmission request to a receiving device, the data transmission request is used to request to transmit target data with the receiving device; a first transmission module, used to respond to the data transmission response sent by the receiving device, and transmit the target data with the receiving device based on a point-to-point transmission mode; in the event of failure of transmission with the receiving device based on the point-to-point transmission mode, transmitting the target data with the receiving device through a target transit transmission mode, the target transit transmission mode including a public network transmission mode or an edge transmission mode.
[0037] In combination with the second aspect, in some possible implementations, the first transmission module is specifically used to: in case the transmission with the receiving device based on the point-to-point transmission mode fails, determine the target relay server, which is a public network server or an edge server; and transmit the target data to the receiving device through the target relay transmission mode corresponding to the target relay server.
[0038] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the first transmission module is also used to: determine whether the relay server includes the edge server; if the relay server does not include the edge server, determine the public network server as the target relay server; if the relay server includes the edge server, determine the target relay server according to the priority of the edge transmission mode and the priority of the public network transmission mode, or according to the transmission rate of the edge transmission mode and the transmission rate of the public network transmission mode.
[0039] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the first transmission module is also used to perform any of the following: when the priority of the public network transmission mode is higher than the priority of the edge transmission mode, the public network server is determined as the target transit server; when the transmission rate of the public network transmission mode is greater than the transmission rate of the edge transmission mode, the public network server is determined as the target transit server; when the priority of the public network transmission mode is lower than or equal to the priority of the edge transmission mode, the edge server is determined as the target transit server; when the transmission rate of the public network transmission mode is less than or equal to the transmission rate of the edge transmission mode, the edge server is determined as the target transit server.
[0040] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the first transmission module is also used to: when the target transit server is the public network server, transmit the target data to the receiving device through the public network transmission method; when the target transit server is the edge server, transmit the target data to the receiving device through the edge transmission method.
[0041] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, after transmitting the target data to the receiving device through the edge transmission method, the device also includes: a second transmission module, which is used to transmit the target data to the receiving device through the public network transmission method when a transmission failure message sent by the edge server is received.
[0042] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the device also includes: an acquisition module, which is used to send a first connection request to the public network server in response to the configuration operation on the public network server login interface, so that the public network server authenticates the sending device, and the first connection request includes the first login identifier of the sending device; when the public network server successfully authenticates the sending device, the priority of the public network transmission mode and the transmission rate of the public network transmission mode are obtained through the first hypertext transfer protocol interface; in response to the configuration operation on the edge server login interface, a second connection request is sent to the edge server, so that the edge server authenticates the sending device, and the second connection request includes the second login identifier of the sending device; when the edge server successfully authenticates the sending device, the priority of the edge transmission mode and the transmission rate of the edge transmission mode are obtained through the second hypertext transfer protocol interface.
[0043] In a third aspect, a sending device is provided, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the sending device executes the method in the first aspect or any possible implementation of the first aspect.
[0044] In a fourth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0045] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a schematic diagram of a data transmission scenario provided by an embodiment of the present application;
[0047] Figure 2 is a schematic flow chart of a data transmission method provided in an embodiment of the present application;
[0048] Figure 3 It is a structural schematic diagram of a data transmission device provided in an embodiment of the present application;
[0049] Figure 4 It is a structural diagram of a sending device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0051] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0052] Figure 1 It is a schematic diagram of a data transmission scenario provided in an embodiment of the present application.
[0053] For example, Figure 1 As shown, when the user uses the sending device 101, the user can send the target data in the sending device 101 to the receiving device 104 through the data transmission method to achieve the effect of data sharing.
[0054] In a possible implementation, the sending device 101 and the receiving device 104 may transmit the target data in the following ways:
[0055] The first type: peer-to-peer (P2P, also known as "hole punching or penetration") transmission mode. The P2P transmission mode relies on P2P technology (also known as peer-to-peer network). The P2P transmission mode is a transmission mode without a central server, relying on the Internet system of all user groups (sending device 101 and receiving device 104) to exchange data. In short, when the sending device 101 and the receiving device 104 transmit the target data through the P2P transmission mode, they do not need to rely on any transit server, and can realize the end-to-end direct connection target data transmission process.
[0056] The second method is transit transmission. Figure 1 As shown, the relay transmission mode in the embodiment of the present application includes a public network transmission mode and an edge transmission mode. The server corresponding to the relay transmission mode is called a "relay server", including a public network server 102 (or a cloud server 102) and an edge server 103.
[0057] The public network transmission mode specifically refers to forwarding the target data to the receiving device 104 through the public network server 102. The edge transmission mode specifically refers to forwarding the target data to the receiving device 104 through the edge server 103.
[0058] For the public network transmission mode, when the sending device 101 and the receiving device 104 are connected to the public network server 102 at the same time, the public network server 102 can access the sending device 101 and the receiving device 104. Thus, the sending device 101 and the receiving device 104 can transmit the target data through the public network transmission mode. The public network server 102, as a central server, provides a centralized processing mode.
[0059] For the edge transmission mode, the corresponding edge server 103 is a distributed open platform close to the end side or the network edge side, integrating network, computing, storage, and application core capabilities.
[0060] Similar to the process of the public network transmission mode, when the sending device 101 and the receiving device 104 are connected to the edge server 103 at the same time, the edge server 103 can access the sending device 101 and the receiving device 104. Thus, the sending device 101 and the receiving device 104 can transmit the target data through the edge transmission mode.
[0061] Compared with the public network server 102, the edge server 103 tends to provide a decentralized (distributed) processing method, and the data no longer needs to be sent to the public network server 102 for transfer.
[0062] Optionally, the data transmission scenario of the embodiment of the present application may specifically be a screen projection scenario or a file sharing scenario, which is not limited by the embodiment of the present application.
[0063] Optionally, when the data transmission scenario is a screen projection scenario, the target data is media data (such as audio data and video data), and media data is usually streamed during transmission; when the data transmission scenario is a file sharing scenario, the target data is file data.
[0064] As for the difference between the screen projection scenario and the file sharing scenario, in the screen projection scenario, the sending device 101 needs to open the audio or video to be projected before it can realize the media data sharing between the receiving device 104. In other words, the screen projection scenario requires the sending device 101 and the receiving device 104 to play the audio or video at the same time. For the file sharing scenario, the sending device 101 can directly send the file data to the receiving device 104 without opening it, so that the receiving device 104 can display the file content corresponding to the file data in the display area.
[0065] Optionally, the types of the sending device 101 and the receiving device 104 include smart phones, smart TVs, laptops, tablets, etc., which are not limited to the embodiments of the present application.
[0066] Optionally, the sending device 101 and the receiving device 104 may be devices of the same type, for example, both the sending device 101 and the receiving device 104 are smart phones; or, the sending device 101 and the receiving device 104 may be devices of different types, for example, the sending device 101 is a smart phone, and the receiving device 104 may be a tablet, a laptop computer, etc.
[0067] In the following, the screen projection scenario is taken as an example in an embodiment of the present application to introduce in detail a method for data transmission provided in an embodiment of the present application.
[0068] Optionally, each application installed in the sending device 101 may have an independently developed wireless screen projection function. The screen projection scene can be enabled by the user using the application on the sending device 101, by starting the wireless screen projection function of the application through the screen projection shortcut control (or switch, etc.) in the sending device 101 or the screen projection shortcut control (or switch) configured in the application, triggering the sending device 101 to search for other connectable receiving devices 104; wireless screen projection can also be triggered by the screen projection software in the sending device 101, triggering the sending device 101 to search for other connectable receiving devices 104. Any method of enabling screen projection is within the scope of protection of this application.
[0069] Figure 2 is a schematic flow chart of a data transmission method provided in an embodiment of the present application. It should be understood that the method can be applied to Figure 1 The data transmission scenario shown can be applied to Figure 1 The sending device 101 in.
[0070] For example, Figure 2 As shown, the method 200 includes:
[0071] 201. Send a data transmission request to a receiving device, where the data transmission request is used to request to transmit target data to the receiving device.
[0072] It should be understood that the data transmission methods provided in the embodiments of the present application include P2P transmission methods and transit transmission methods. When a user needs to cast a screen during the use of a sending device, the target data can be transmitted to the receiving device through any of the above transmission methods. When the sending device and the receiving device transmit the target data, the two parties first need to exchange the device identifiers.
[0073] Therefore, the sending device may first send a data transmission request to the receiving device to request transmission of target data with the receiving device (which may also be understood as obtaining an identification of the receiving device), wherein the data transmission request includes the identification of the sending device.
[0074] In a possible implementation, when the sending device and the receiving device exchange identifiers, the steps specifically include:
[0075] The sending device sends a data transmission request to the receiving device based on the signaling channel. The data transmission request is used to request the transmission of target data with the receiving device. The data transmission request includes an identifier of the sending device.
[0076] Optionally, the types of signaling channels include a signaling channel connected via Bluetooth, a signaling channel connected via a QR code, a signaling channel connected via a signaling server, and a signaling channel connected via Near Field Communication (NFC).
[0077] The signaling channel refers to the interaction channel between the sending device and the receiving device in the process of sending control instructions through the signaling server.
[0078] As the name implies, a signaling server is a server that can receive and forward control instructions between a sending device and a receiving device, thereby realizing the exchange of identifiers. That is to say, before transmitting data through the transit server, the receiving device and the sending device first need to exchange identifiers through the signaling server.
[0079] Optionally, the signaling server includes an edge signaling server corresponding to the edge server and a public network signaling server corresponding to the public network server.
[0080] Exemplarily, the sending device can establish a Bluetooth connection with the receiving device through the personal identification number (PIN) of the receiving device. After the Bluetooth connection is established, a signaling channel connected via the Bluetooth can be obtained.
[0081] As another example, the sending device may scan the QR code of the receiving device to connect with the receiving device through the QR code, that is, obtain a signaling channel connected through the QR code.
[0082] As another example, for a receiving device equipped with an NFC function, the sending device can establish an NFC connection with the receiving device by bringing the sending device close to the receiving device, thereby obtaining a signaling channel connected through the NFC.
[0083] In another exemplary embodiment, the signaling server exists simultaneously with the public network server or the edge server. In other words, as long as the receiving device and the sending device are connected to the public network server or the edge server at the same time, they can be connected to the signaling server.
[0084] For a public network server or edge server, the server administrator can first register the public network server or edge server in the Structured Query Language Server Management Studio (SSMS), so that the receiving device and the sending device can query and connect to the public network server and edge server, and obtain the signaling channel connected through the signaling server.
[0085] Furthermore, the sending device may send a data transmission request to the receiving device through any of the above signaling channels, and the data transmission request includes an identifier of the sending device.
[0086] Optionally, the identifier of the sending device includes the port number of the sending device, Internet Protocol (IP) addresses of all intranets, and / or public IP addresses corresponding to all intranet IP addresses of the sending device.
[0087] It should be understood that when the sending device is connected to the receiving device via Bluetooth, QR code or NFC, since there is no connection with the public network server, the identifier of the sending device is the port number and all the intranet IP addresses of the sending device.
[0088] When the sending device and the receiving device are connected through the signaling server, the corresponding public network server or edge server stores a mapping table of the public network IP and the intranet IP of the sending device, as well as a mapping table of the public network IP and the intranet IP of the receiving device.
[0089] Therefore, the sending device can obtain the public IP addresses corresponding to all the intranet IP addresses of the sending device through this connection method. Similarly, the receiving device can obtain the public IP addresses corresponding to all the intranet IP addresses of the receiving device through this connection method. In this connection scenario, the identifier of the sending device can be the port number of the sending device, all the intranet IP addresses, and the public IP addresses corresponding to all the intranet IP addresses.
[0090] 202 , in response to a data transmission response sent by the receiving device, transmitting target data with the receiving device based on a point-to-point transmission manner.
[0091] After receiving the data transmission request through any of the above signaling channels, the receiving device obtains the identification of the sending device. Based on this, the receiving device can feed back a data transmission response to the sending device to exchange each other's identifications. The data transmission response includes the identification of the receiving device.
[0092] Optionally, the identification of the receiving device specifically corresponds to the type of the identification of the sending device one-to-one, including the port number of the receiving device, all intranet IP addresses, and / or the public IP addresses corresponding to all intranet IP addresses of the receiving device.
[0093] After the receiving device and the sending device have exchanged device identifications, the sending device may further transmit target data to the receiving device.
[0094] It should be understood that since the P2P transmission mode is a mode of directly transmitting target data between a receiving device and a sending device, the priority of the P2P transmission mode is set to the highest by default in the embodiment of the present application. After exchanging the identifier, the sending device first attempts to transmit the target data with the receiving device via the P2P transmission mode.
[0095] The key to P2P transmission lies in whether a hole can be successfully made between the sending device and the receiving device. For connection methods such as connection via QR code, connection via Bluetooth and connection via NFC, the sending device can directly send the target data to the receiving device and determine whether the target data can be successfully transmitted with the receiving device based on the received feedback information.
[0096] For the connection method connected through a signaling server (or a relay server), hole punching can be implemented with the help of the relay server.
[0097] Optionally, common hole punching methods include User Datagram Protocol (UDP) hole punching and Transmission Control Protocol (TCP) hole punching.
[0098] The following embodiment of the present application takes UDP hole punching as an example to illustrate the hole punching process between a sending device and a receiving device.
[0099] For example, the biggest obstacle to P2P hole punching is Network Address Translation (NAT). Assume that the NAT connected to the sending device is NAT1, and the NAT connected to the receiving device is NAT2. The sending device and the receiving device are connected to the relay server respectively. The relay server obtains the public IP addresses and port numbers of the two devices. The public IP address and port number of the sending device are recorded as "IP1:Port1", and the public IP address and port number of the receiving device are recorded as "IP2:Port2". The relay server sends IP1:Port1 to the receiving device and tells it to connect to the sending device; the receiving device sends a request for IP1:Port1, and NAT1 receives the data packet. Since there is no corresponding mapping table entry, NAT1 discards the data packet, but leaves the IP1:Port1 mapping table entry on NAT2; the receiving device sends a message to the relay server: requesting the relay server to tell the sending device to connect to the receiving device, the relay server sends IP2:Port2 to the sending device and tells it to connect to IP2:Port2; the sending device connects to IP2:Port2; the receiving device receives the connection of the sending device, and the penetration is successful; if it cannot be received, the penetration fails.
[0100] Optionally, common NAT types include Full Clone NAT, Restricted Clone NAT, Port Restricted Clone NAT and Symmetric NAT, which are not limited in the embodiments of the present application.
[0101] 203. When the point-to-point transmission method fails to transmit the target data to the receiving device, the target data is transmitted to the receiving device through a target relay transmission method, where the target relay transmission method includes a public network transmission method or an edge transmission method.
[0102] It should be understood that due to different NAT types and restrictions on the access rights of the receiving device, the P2P hole punching process may not be successful. In the case of a P2P hole punching failure, the sending device will display a prompt message indicating that the data transmission failed. For example, a pop-up window of "Data transmission failed" is displayed in the display area of the sending device, or the sending device broadcasts a voice message of "Data transmission failed".
[0103] In the event that P2P hole punching fails, the embodiment of the present application can further transmit the target data through a relay transmission method.
[0104] It should also be understood that the transit transmission mode of the embodiment of the present application includes a public network transmission mode and an edge transmission mode. In the process of transmitting data using the transit transmission mode, it is first necessary to determine the target transit transmission mode from the public network transmission mode and the edge transmission mode.
[0105] In a possible implementation, when the point-to-point transmission mode fails, transmitting the target data to the receiving device through the target relay transmission mode specifically includes:
[0106] In the case of a transmission failure with a receiving device based on a point-to-point transmission mode, a target relay server is determined, and the target relay server is a public network server or an edge server;
[0107] The target data is transmitted to the receiving device through the target relay transmission method corresponding to the target relay server.
[0108] Among them, for the determination of the target relay server, the public network server, as a server that can access any device, is the most guaranteed relay transmission method. Therefore, the relay server must include the public network server. However, for the edge server, it is set according to the needs of the user scenario, and the relay server does not necessarily include the edge server.
[0109] In a possible implementation, determining the target transit server includes:
[0110] Determining whether the transit server includes an edge server;
[0111] In the case where the relay server does not include the edge server, the public network server is determined as the target relay server;
[0112] In the case where the relay server includes an edge server, the target relay server is determined according to the priority of the edge transmission mode and the priority of the public network transmission mode, or the transmission rate of the edge transmission mode and the transmission rate of the public network transmission mode.
[0113] For example, if the sending device cannot search for the edge server, it can be considered that the relay server does not include the edge server, but only the public network server. In this case, the sending device can directly determine the public network server as the target relay server.
[0114] In another exemplary embodiment, if the sending device can search for the edge server and the public network server at the same time, in order to ensure the high efficiency of transmission and reduce the transmission delay, the embodiment of the present application can determine the target transit server from the edge server and the public network server according to the priority of the edge transmission mode and the priority of the public network server, or the transmission rate of the edge transmission mode and the transmission rate of the public network transmission mode.
[0115] In a possible implementation, the sending device can obtain the priority and transmission rate of the public network transmission mode when connected to the public network server. Also, the sending device can obtain the priority and transmission rate of the edge transmission mode when connected to the edge server. Specifically, it includes:
[0116] In response to a configuration operation on a public network server login interface, sending a first connection request to the public network server so that the public network server authenticates the sending device, the first connection request including a first login identifier of the sending device;
[0117] When the public network server passes the identity authentication of the sending device, obtaining the priority of the public network transmission mode and the transmission rate of the public network transmission mode through the first hypertext transfer protocol interface;
[0118] In response to a configuration operation on the edge server login interface, sending a second connection request to the edge server so that the edge server authenticates the sending device, the second connection request including a second login identifier of the sending device;
[0119] When the edge server passes the identity authentication of the sending device, the priority and transmission rate of the edge transmission mode are obtained through the second hypertext transfer protocol interface.
[0120] Exemplarily, the user can determine the public network server and the edge server based on the identifier of the public network server and the identifier of the edge server. During the connection process, the display area of the sending device will display the login interface of the public network server and the login interface of the edge server.
[0121] On the login interface of the public network server, the user can configure the first login identifier. In response to the configuration operation of the user, the sending device sends a first connection request to the public network server so that the public network server performs identity authentication.
[0122] When the identity authentication is passed, the sending device establishes a communication connection with the public network server. The priority of the public network transmission mode is obtained through the first Hyper Text Transfer Protocol (HTTP) interface, and the transmission rate of the public network server is obtained at the same time. In addition, the sending device can also obtain the IP address and port number of the public network server.
[0123] Similarly, in the login interface of the edge server, the user can configure the second login identifier. In response to the configuration operation of the user, the sending device sends a first connection request to the edge server so that the edge server performs identity authentication.
[0124] If the identity authentication is passed, the sending device establishes a communication connection with the edge server. The priority of the edge transmission mode is obtained through the second HTTP interface, and the transmission rate of the edge server is obtained at the same time. The sending device can also obtain the IP address and port number of the edge server.
[0125] It should be understood that the priority of the edge transmission mode and the priority of the public network transmission mode can be predetermined at the factory, or can be manually configured by the user according to needs, and the embodiments of the present application do not limit this.
[0126] In the above technical solution, a step for obtaining the priority and transmission rate of the transit transmission mode is proposed. Specifically, the user can determine the first login identifier of the sending device based on the configuration operation in the public network server login interface of the sending device. The sending device further sends the first login identifier to the public network server and requests the public network server to perform identity authentication. If the verification is successful, the priority and transmission rate of the public network transmission mode are obtained. Similarly, the sending device obtains the priority and transmission rate of the edge transmission mode in the same manner as described above. The above process of obtaining the priority and transmission rate of the two transit transmission modes provides a basis for the determination process of the target transit server, thereby ensuring efficient transmission of the target data.
[0127] Further, when determining the target relay server according to the priority and the transmission rate, it specifically includes any of the following:
[0128] When the priority of the public network transmission mode is higher than the priority of the edge transmission mode, the public network server is determined as the target transfer server;
[0129] When the transmission rate of the public network transmission mode is greater than the transmission rate of the edge transmission mode, the public network server is determined as the target transfer server;
[0130] When the priority of the public network transmission mode is lower than or equal to the priority of the edge transmission mode, the edge server is determined as the target transit server;
[0131] When the transmission rate of the public network transmission mode is less than or equal to the transmission rate of the edge transmission mode, the edge server is determined as the target relay server.
[0132] For example, assuming that the priority of the P2P transmission mode is 10, which is the highest priority, in the case of P2P failure, if the priority of the public network transmission mode obtained by the sending device is 8, the priority of the edge transmission mode is 2. In this case, the sending device can use the public network server as the target relay server.
[0133] In another example, if the transmission rate of the public network transmission mode is 500 Mbps and the transmission rate of the edge transmission mode is 200 Mbps, the sending device uses the public network server as the target transfer server.
[0134] In another exemplary embodiment, if the priority of the edge transmission mode is 8 and the priority of the edge transmission mode is 2, the sending device uses the edge server as the target relay server.
[0135] In another example, if the transmission rate of the edge transmission mode is 500 Mbps and the transmission rate of the public network transmission mode is 200 Mbps, the sending device uses the edge server as the target transit server.
[0136] In addition, the above-mentioned priority and transmission rate determination methods may be combined to determine the target relay server.
[0137] For example, if the priority of the public network transmission mode obtained by the sending device is 8, and the priority of the edge transmission mode is 2. The transmission rate of the public network transmission mode is 500Mbps, and the transmission rate of the edge transmission mode is 200Mbps, the sending device can use the public network server as the target transfer server.
[0138] In another example, if the priority of the public network transmission mode obtained by the sending device is 8, and the priority of the edge transmission mode is 2. The transmission rate of the public network transmission mode is 200Mbps, and the transmission rate of the edge transmission mode is 500Mbps. In this case, even if the priority of the public network transmission mode is higher than the edge transmission mode, considering the transmission speed of the target data transmission. The sending device can use the edge server with a higher transmission rate as the target transit server.
[0139] In the above technical solution, according to the priority and transmission rate, it can be divided into four scenarios. If the priority of the public network transmission method is higher, or the transmission rate of the public network transmission method is faster, the public network server is used as the target relay server; on the contrary, if the priority of the public network transmission method is lower, or the transmission rate of the public network transmission method is slower, the edge server is used as the target relay server.
[0140] The above-mentioned method of using a high-priority or fast-transmission-rate transit server as a target transit server can ensure the high efficiency of transmitting target data through the transit transmission method and reduce the delay of the transit transmission method.
[0141] After the target transfer server is determined, the process of transmitting the target data specifically includes:
[0142] When the target transfer server is a public network server, the target data is transmitted to the receiving device through the public network transmission method;
[0143] When the target transfer server is an edge server, the target data is transmitted to the receiving device through edge transmission.
[0144] Exemplarily, when the target relay server is a public network server, the sending device can send the target data to the public network server via the IP address and port number of the public network server, so that the public network server forwards the target data to the receiving device.
[0145] As another example, when the target transit server is an edge server, the sending device may send the target data to the edge server via the IP address and port number of the edge server, so that the edge server forwards the target data to the receiving device.
[0146] In the above technical solution, different target relay servers correspond to different target relay transmission modes. When the target relay server is a public network server, the target relay transmission mode is a public network transmission mode; when the target relay transmission mode is an edge server, the target relay transmission mode is an edge transmission mode. The above process realizes that in the event of point-to-point transmission failure, different target relay transmission modes are flexibly selected to transmit target data according to different target relay servers. It avoids the problem of single transmission caused by using only one transmission mode, can meet the transmission requirements in different scenarios, and improves the user experience.
[0147] It should be understood that, similar to the case where the P2P transmission method fails, if the receiving device has limited access, the edge transmission method may also fail. In this case, in order not to affect the transmission of the target data, the embodiment of the present application also proposes a further data transmission strategy:
[0148] When receiving a transmission failure message sent by the edge server, the target data is transmitted to the receiving device via the public network transmission mode.
[0149] Exemplarily, the sending device may receive the transmission failure message sent from the edge server based on a pop-up reminder or a voice reminder.
[0150] Furthermore, the sending device may send the target data to a public network server, so that when the edge server fails to forward the data, the target data can be successfully transmitted to the receiving device through the public network server.
[0151] In the above technical solution, the public network server can access any device. Since the edge server is manually deployed, when the access of the receiving device is restricted, the edge transmission method may fail. In the case of failure of the edge transmission method, the present application can continue to use the public network server to transmit the target data. The above process can ensure that the transmission process of the target data is not interrupted when both the point-to-point transmission method and the edge transmission method fail, thereby improving the success rate of the target data transmission.
[0152] In summary, when a receiving device needs to transmit target data with a sending device, the present application proposes a method for data transmission. Specifically, in the transmission process, a point-to-point transmission method is preferred. Since the point-to-point transmission method allows the receiving device and the sending device to directly transmit the target data without the need for transfer. Therefore, when the point-to-point transmission method is successful, the above-mentioned process of transmitting the target data reduces the delay during the target data transmission process on the one hand, thereby achieving the effect of efficiently transmitting the target data. On the other hand, it can also avoid the traffic consumption that may be generated by the public network transmission method, thereby reducing the transmission cost during the target data transmission process.
[0153] In another scenario, if the point-to-point transmission method fails, the present application can also continue to transmit the target data by means of the target relay transmission method, thereby ensuring that the target data transmission process is not interrupted when the point-to-point transmission method fails, and improving the user experience during the target data transmission process.
[0154] Furthermore, the present application proposes how the sending device transmits target data to the receiving device through a target relay transmission mode when the point-to-point transmission mode fails. The relay transmission mode usually corresponds to a relay server. The target relay transmission mode of the present application can be a public network transmission mode or an edge transmission mode. Correspondingly, the target relay server can be a public network server or an edge server. Therefore, the present application can first determine the target relay server from the public network server and the edge server, and then transmit the target data to the receiving device through the target relay transmission mode corresponding to the target relay server.
[0155] Specifically, when determining the target transit server, the public network is an international Internet, and any device can access the public network server. Therefore, during the target data transmission process, the public network server must exist. However, the edge server is deployed according to the actual situation and does not necessarily exist. Therefore, this application can be divided into two determination scenarios based on whether the transit server includes the edge server:
[0156] In the first scenario, if the transit server does not include an edge server, that is, there is only a public network server. In this case, the public network server can be directly determined as the target transit server.
[0157] In another case, if the transit server includes an edge server. In this case, any one of the edge server and the public network server can be used as the target transit server. Specifically, the present application can determine the target transit server based on the priority of the edge transmission mode and the priority of the public network transmission mode, or the transmission rate of the edge transmission mode and the transmission rate of the public network transmission mode.
[0158] In the process of determining the target relay server, four scenarios can be divided according to the priority and transmission rate. If the priority of the public network transmission method is higher, or the transmission rate of the public network transmission method is faster, the public network server will be used as the target relay server; on the contrary, if the priority of the public network transmission method is lower, or the transmission rate of the public network transmission method is slower, the edge server will be used as the target relay server.
[0159] The above-mentioned method of using a high-priority or fast-transmission-rate transit server as a target transit server can ensure the high efficiency of transmitting target data through the transit transmission method and reduce the delay of the transit transmission method.
[0160] Different target relay servers correspond to different target relay transmission modes. When the target relay server is a public network server, the target relay transmission mode is the public network transmission mode; when the target relay transmission mode is an edge server, the target relay transmission mode is the edge transmission mode. The above process realizes that in the event of point-to-point transmission failure, different target relay transmission modes can be flexibly selected to transmit target data according to different target relay servers. It avoids the problem of single transmission caused by using only one transmission mode, can meet the transmission requirements in different scenarios, and improves the user experience.
[0161] The public network server can access any device. Since the edge server is manually deployed, the edge transmission method may fail when the receiving device has limited access. In the event of a failure in the edge transmission method, the present application can continue to use the public network server to transmit the target data. The above process can ensure that the transmission process of the target data is not interrupted when both the point-to-point transmission method and the edge transmission method fail, thereby improving the success rate of the target data transmission.
[0162] Finally, a procedure for obtaining the priority and transmission rate of the transit transmission mode is proposed. Specifically, the user can determine the first login identifier of the sending device based on the configuration operation in the public network server login interface of the sending device. The sending device further sends the first login identifier to the public network server and requests the public network server to perform identity authentication. If the verification is successful, the priority and transmission rate of the public network transmission mode are obtained. Similarly, the sending device obtains the priority and transmission rate of the edge transmission mode in the same manner as described above. The above process of obtaining the priority and transmission rate of the two transit transmission modes provides a basis for the determination process of the target transit server, thereby ensuring efficient transmission of the target data.
[0163] Figure 3 It is a structural diagram of a data transmission device provided in an embodiment of the present application.
[0164] For example, Figure 3As shown, the device 300 includes:
[0165] A sending module 301 is used to send a data transmission request to a receiving device, where the data transmission request is used to request to transmit target data with the receiving device;
[0166] The first transmission module 302 is used to transmit the target data to the receiving device based on a point-to-point transmission method in response to the data transmission response sent by the receiving device; in the event that the transmission to the receiving device based on the point-to-point transmission method fails, the target data is transmitted to the receiving device through a target transit transmission method, and the target transit transmission method includes a public network transmission method or an edge transmission method.
[0167] In one possible implementation, the first transmission module 302 is specifically used to: in case the transmission with the receiving device based on the point-to-point transmission mode fails, determine the target relay server, which is a public network server or an edge server; and transmit the target data to the receiving device through the target relay transmission mode corresponding to the target relay server.
[0168] In one possible implementation, the first transmission module 302 is also used to: determine whether the relay server includes the edge server; if the relay server does not include the edge server, determine the public network server as the target relay server; if the relay server includes the edge server, determine the target relay server based on the priority of the edge transmission mode and the priority of the public network transmission mode, or based on the transmission rate of the edge transmission mode and the transmission rate of the public network transmission mode.
[0169] In a possible implementation, the first transmission module 302 is also used to perform any of the following: when the priority of the public network transmission mode is higher than the priority of the edge transmission mode, the public network server is determined as the target transit server; when the transmission rate of the public network transmission mode is greater than the transmission rate of the edge transmission mode, the public network server is determined as the target transit server; when the priority of the public network transmission mode is lower than or equal to the priority of the edge transmission mode, the edge server is determined as the target transit server; when the transmission rate of the public network transmission mode is less than or equal to the transmission rate of the edge transmission mode, the edge server is determined as the target transit server.
[0170] In one possible implementation, the first transmission module 302 is also used to: when the target transit server is the public network server, transmit the target data to the receiving device via the public network transmission method; when the target transit server is the edge server, transmit the target data to the receiving device via the edge transmission method.
[0171] Optionally, after transmitting the target data to the receiving device via the edge transmission mode, the device further includes: a second transmission module, configured to transmit the target data to the receiving device via the public network transmission mode upon receiving a transmission failure message sent by the edge server.
[0172] Optionally, the device also includes: an acquisition module, which is used to send a first connection request to the public network server in response to the configuration operation on the public network server login interface, so that the public network server authenticates the sending device, and the first connection request includes a first login identifier of the sending device; when the public network server successfully authenticates the sending device, the priority of the public network transmission mode and the transmission rate of the public network transmission mode are obtained through the first hypertext transfer protocol interface; in response to the configuration operation on the edge server login interface, send a second connection request to the edge server, so that the edge server authenticates the sending device, and the second connection request includes a second login identifier of the sending device; when the edge server successfully authenticates the sending device, the priority of the edge transmission mode and the transmission rate of the edge transmission mode are obtained through the second hypertext transfer protocol interface.
[0173] Figure 4 It is a structural diagram of a sending device provided in an embodiment of the present application.
[0174] For example, Figure 4 As shown, the sending device 101 includes: a memory 401 and a processor 402, wherein the memory 401 stores an executable program code 4011, and the processor 402 is used to call and execute the executable program code 4011 to perform a data transmission method.
[0175] In this embodiment, the function modules of the sending device can be divided according to the above method example. For example, each function module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0176] In the case of dividing each functional module according to each function, the sending device may include: a separate sending module, a first transmission module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
[0177] The sending device provided in this embodiment is used to execute the above-mentioned data transmission method, and thus can achieve the same effect as the above-mentioned implementation method.
[0178] In the case of an integrated unit, the sending device may include a processing module and a storage module. The processing module may be used to control and manage the actions of the sending device. The storage module may be used to support the sending device to execute mutual program codes and data.
[0179] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits disclosed in the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0180] This embodiment further provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a data transmission method in the above-mentioned embodiment.
[0181] This embodiment further provides a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the above-mentioned related steps to implement a data transmission method in the above-mentioned embodiment.
[0182] In addition, the sending device provided in the embodiments of the present application may specifically be a chip, a component or a module, and the sending device may include a connected processor and a memory; wherein the memory is used to store instructions, and when the sending device is running, the processor may call and execute instructions so that the chip executes a data transmission method in the above-mentioned embodiments.
[0183] Among them, the sending device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0184] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0185] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0186] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for data transmission, characterized in that: The method comprises: Sending a data transmission request to a receiving device, wherein the data transmission request is used to request transmission of target data with the receiving device; In response to the data transmission response sent by the receiving device, transmitting the target data with the receiving device based on a point-to-point transmission mode; In the event that transmission with the receiving device based on the point-to-point transmission method fails, the target data is transmitted with the receiving device via a target relay transmission method, wherein the target relay transmission method includes a public network transmission method or an edge transmission method.
2. The method according to claim 1, characterized in that In the case where the transmission with the receiving device based on the point-to-point transmission mode fails, transmitting the target data with the receiving device through a target relay transmission mode includes: In the case where the transmission with the receiving device based on the point-to-point transmission mode fails, determining a target transfer server, wherein the target transfer server is a public network server or an edge server; The target data is transmitted to the receiving device via the target relay transmission mode corresponding to the target relay server.
3. The method according to claim 2, characterized in that Determining the target transfer server includes: Determining whether the transit server includes the edge server; In the case where the relay server does not include the edge server, determining the public network server as the target relay server; In the case where the relay server includes the edge server, the target relay server is determined according to the priority of the edge transmission mode and the priority of the public network transmission mode, or the transmission rate of the edge transmission mode and the transmission rate of the public network transmission mode.
4. The method according to claim 3, characterized in that Determining the target transit server according to the priority of the edge transmission mode and the priority of the public network transmission mode, or the transmission rate of the edge transmission mode and the transmission rate of the public network transmission mode, includes any of the following: In a case where the priority of the public network transmission mode is higher than the priority of the edge transmission mode, determining the public network server as the target transfer server; In a case where the transmission rate of the public network transmission mode is greater than the transmission rate of the edge transmission mode, determining the public network server as the target transfer server; When the priority of the public network transmission mode is lower than or equal to the priority of the edge transmission mode, determining the edge server as the target transit server; When the transmission rate of the public network transmission mode is less than or equal to the transmission rate of the edge transmission mode, the edge server is determined as the target transit server.
5. The method according to claim 4, characterized in that The transmitting the target data to the receiving device through the target transfer transmission mode corresponding to the target transfer server includes: When the target transfer server is the public network server, transmitting the target data to the receiving device through the public network transmission mode; In the case where the target transit server is the edge server, the target data is transmitted to the receiving device via the edge transmission mode.
6. The method according to claim 5, characterized in that After transmitting the target data to the receiving device by the edge transmission mode, the method further includes: When receiving the transmission failure message sent by the edge server, the target data is transmitted to the receiving device through the public network transmission mode.
7. The method according to any one of claims 3 to 6, characterized in that: The method further comprises: In response to a configuration operation on the public network server login interface, sending a first connection request to the public network server so that the public network server authenticates the sending device, wherein the first connection request includes a first login identifier of the sending device; When the public network server passes the identity authentication of the sending device, obtaining the priority of the public network transmission mode and the transmission rate of the public network transmission mode through the first hypertext transfer protocol interface; In response to a configuration operation on the edge server login interface, sending a second connection request to the edge server so that the edge server authenticates the sending device, wherein the second connection request includes a second login identifier of the sending device; When the edge server passes the identity authentication of the sending device, the priority of the edge transmission mode and the transmission rate of the edge transmission mode are obtained through a second hypertext transfer protocol interface.
8. A data transmission device, characterized in that: The device comprises: A sending module, used for sending a data transmission request to a receiving device, wherein the data transmission request is used for requesting to transmit target data with the receiving device; The first transmission module is used to transmit the target data to the receiving device based on a point-to-point transmission mode in response to the data transmission response sent by the receiving device; in the event that the transmission to the receiving device based on the point-to-point transmission mode fails, the target data is transmitted to the receiving device through a target transit transmission mode, and the target transit transmission mode includes a public network transmission mode or an edge transmission mode.
9. A sending device, characterized in that: The sending device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the sending device executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 7 is implemented.
