Data transmission method, apparatus, device, storage medium, and program product
By negotiating with the front-end device through the national standard gateway platform to determine media parameters and transmission protocols, the problem of data transmission failure caused by the lack of public IP address of the front-end device was solved, a stable and reliable data transmission channel was achieved, and the transmission failure rate was reduced.
Patent Information
- Application Number
- CN202411095227.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-08-09
AI Technical Summary
In video surveillance systems based on national standard gateway platforms, the lack of public IP addresses for front-end devices prevents them from directly providing the public IP address of the media stream in the session initiation protocol. This causes the NAT server to intercept media stream data packets sent by the national standard platform, resulting in data transmission failure.
The national standard gateway platform proactively generates media parameter information and transmission protocol type information, and negotiates with the front-end device to determine the target media parameter information and transmission protocol type information, establishing a stable and reliable data transmission channel.
It effectively avoids data transmission failures caused by NAT restrictions, significantly reduces the data transmission failure rate, and ensures the reliability and efficiency of data transmission.
Smart Images

Figure CN119071370B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technology, and in particular relates to a data transmission method, device, equipment, storage medium and program product. Background Art
[0002] In a video surveillance system based on a national standard gateway platform, front-end devices (such as network cameras and network video recorders) are typically deployed in a private network and connected to the national standard gateway platform through a Network Address Translation (NAT) server. The national standard gateway platform is located on the Internet and has a public IP address. The national standard gateway platform provides signaling access addresses and media access addresses, which are used by front-end devices to communicate with the national standard platform. Therefore, front-end devices need to communicate with the external network through the national standard gateway platform.
[0003] When implementing voice broadcasting, because front-end devices lack public IP addresses, they cannot directly provide a public address for receiving media streams in Session Initiation Protocol (SIP) signaling (such as the INVITE message). NAT servers typically do not allow unsolicited external data packets to enter private networks. Therefore, when the national standard platform attempts to send media stream data packets to the private address of the front-end device, these packets may be rejected by the NAT device, causing data transmission failure. Summary of the Invention
[0004] The embodiments of the present invention provide a data transmission method, apparatus, device, storage medium and program product, which can effectively avoid the problem of data transmission failure caused by NAT restrictions, thereby significantly reducing the failure rate of data transmission.
[0005] In a first aspect, an embodiment of the present application provides a data transmission method, applied to a national standard gateway platform, the method comprising:
[0006] Receive a first request sent by the front-end device, where the first request is used by the front-end device to apply for establishing a data transmission channel with the national standard gateway platform;
[0007] In response to the first request, determining first media parameter information and transmission protocol type information based on the first request and a first resource state of the national standard gateway platform;
[0008] Sending first media parameter information and transmission protocol type information to the front-end device;
[0009] receiving target media parameter information and transmission protocol type information sent by the front-end device, where the target media parameter information is determined by the front-end device based on the first media parameter information and the second resource state of the front-end device;
[0010] The data to be transmitted is sent to the front-end device through a data transmission channel, where the data transmission channel is established based on target media parameter information and transmission protocol type information.
[0011] In a second aspect, an embodiment of the present application provides a data transmission method, applied to a front-end device, the method comprising:
[0012] Sending a first request to the national standard gateway platform, where the first request is used to apply for establishing a data transmission channel with the national standard gateway platform;
[0013] Receiving first media parameter information and transmission protocol type information sent by the national standard gateway platform, where the first media parameter information and transmission protocol type information are determined by the national standard gateway platform based on the first request and a first resource state of the national standard gateway platform;
[0014] Determining target media parameter information based on the first media parameter information and a second resource state of the front-end device;
[0015] Send target media parameter information and transmission protocol type information to the national standard gateway platform;
[0016] Establishing a data transmission channel based on target media parameter information and transmission protocol type information;
[0017] Receive the data to be transmitted sent by the national standard gateway platform through the data transmission channel.
[0018] In a third aspect, an embodiment of the present application provides a data transmission device, which is applied to a national standard gateway platform. The device includes:
[0019] A first receiving module is used to receive a first request sent by a front-end device, where the first request is used by the front-end device to apply for establishing a data transmission channel with the national standard gateway platform;
[0020] A first response module, configured to determine, in response to the first request, first media parameter information and transmission protocol type information based on the first request and a first resource state of the national standard gateway platform;
[0021] A first sending module, configured to send first media parameter information and transmission protocol type information to a front-end device;
[0022] A second receiving module is configured to receive target media parameter information and transmission protocol type information sent by the front-end device, where the target media parameter information is determined by the front-end device based on the first media parameter information and a second resource state of the front-end device;
[0023] The second sending module is used to send the data to be transmitted to the front-end device through the data transmission channel, where the data transmission channel is established based on the target media parameter information and the transmission protocol type information.
[0024] In a fourth aspect, an embodiment of the present application provides a data transmission device, applied to a front-end device, the device comprising:
[0025] A third sending module is used to send a first request to the national standard gateway platform, where the first request is used to apply for establishing a data transmission channel with the national standard gateway platform;
[0026] A third receiving module is configured to receive first media parameter information and transmission protocol type information sent by the national standard gateway platform, where the first media parameter information and transmission protocol type information are determined by the national standard gateway platform based on the first request and a first resource state of the national standard gateway platform;
[0027] A first determining module, configured to determine target media parameter information based on the first media parameter information and a second resource state of the front-end device;
[0028] The fourth sending module is used to send target media parameter information and transmission protocol type information to the national standard gateway platform;
[0029] An establishment module, configured to establish a data transmission channel based on target media parameter information and transmission protocol type information;
[0030] The fourth receiving module is used to receive the data to be transmitted sent by the national standard gateway platform through the data transmission channel.
[0031] In a fifth aspect, an embodiment of the present application provides an electronic device, applied to a national standard gateway platform, the electronic device comprising:
[0032] a processor and a memory storing computer program instructions;
[0033] When the processor executes the computer program instructions, the data transmission method as described in any one of the first aspects is implemented.
[0034] In a sixth aspect, an embodiment of the present application provides an electronic device, applied to a front-end device, the electronic device comprising:
[0035] a processor and a memory storing computer program instructions;
[0036] When the processor executes the computer program instructions, the data transmission method as described in any one of the second aspects is implemented.
[0037] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, a data transmission method as described in any one of the first and second aspects is implemented.
[0038] In an eighth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is processed and executed, it implements the data transmission method of any one of the first aspect and the second aspect.
[0039] The data transmission method, apparatus, device, storage medium and program product of the embodiment of the present application can actively generate the first media parameter information and transmission protocol type information by the national standard gateway platform and send it to the front-end device. Since the first media parameter information and transmission protocol type information are determined by the national standard gateway platform based on the first request and the first resource state, the feasibility of data transmission is ensured. After receiving the first media parameter information provided by the national standard gateway platform, the front-end device will determine the target media parameter information from the first media parameter information according to its own receiving conditions, that is, the second resource state, to ensure that the national standard gateway platform and the front-end device reach an agreement on the media parameters of data transmission, and at the same time enable the front-end device to establish a stable and reliable data transmission channel based on the target media parameter information that can be accepted by both the national standard gateway platform and the front-end device. The data transmission channel established by the target media parameter information determined by negotiation between the national standard gateway platform and the front-end device can effectively avoid the problem of data transmission failure caused by NAT restrictions, thereby significantly reducing the failure rate of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0041] Figure 1 A schematic diagram of the structure of a data transmission system provided by an embodiment of the present application is shown;
[0042] Figure 2 A schematic diagram showing a flow chart of a data transmission method provided by one embodiment of the present application applied to a data transmission system;
[0043] Figure 3 The schematic diagram shows the process of applying the data transmission method provided by one embodiment of the present application to the national standard gateway platform. Figure 1 ;
[0044] Figure 4 The schematic diagram shows the process of applying the data transmission method provided by one embodiment of the present application to the national standard gateway platform. Figure 2 ;
[0045] Figure 5 The schematic diagram shows the process of applying the data transmission method provided by one embodiment of the present application to the national standard gateway platform. Figure 3 ;
[0046] Figure 6 A schematic diagram of a process of applying a data transmission method provided by an embodiment of the present application to a front-end device is shown;
[0047] Figure 7 The second flowchart of the data transmission method provided by one embodiment of the present application is shown as follows:
[0048] Figure 8 The third flowchart of the data transmission method provided by one embodiment of the present application is shown as follows:
[0049] Figure 9 A schematic diagram showing the structure of a data transmission device provided by one embodiment of the present application applied to a national standard gateway platform is shown;
[0050] Figure 10 A schematic diagram showing the structure of a data transmission device provided by one embodiment of the present application applied to a front-end device is shown;
[0051] Figure 11 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0052] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0053] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0054] Before describing the technical solutions provided by the embodiments of the present application, in order to facilitate understanding of the embodiments of the present application, the present application first specifically describes the relevant technologies:
[0055] The national standard gateway platform refers to a video networking platform based on the GB / T28181 protocol. This platform can connect to various front-end devices that comply with the national standard GB / T28181 protocol. Front-end devices are typically installed at the surveillance site and are responsible for information collection, encoding / processing, storage, transmission, and security control. Common front-end devices include network cameras (IP cameras, IPCs), network video recorders (NVRs), voice output devices (such as speakers for audio playback), recorders, surveillance cameras, drones, etc. By connecting to the national standard gateway platform, video surveillance and other video resources distributed across different locations can be easily managed.
[0056] These front-end devices are typically deployed in private networks, such as home networks and corporate intranets, and use private Internet Protocol (IP) addresses. In video surveillance services based on national standard gateway platforms, front-end devices often need to access remote national standard gateway platforms through a Network Address Translation (NAT) server.
[0057] Since front-end devices lack Internet Protocol addresses (public IP addresses), they rely on the Internet signaling and media access addresses provided by the national standard gateway platform to achieve remote communication. However, this mechanism encounters significant obstacles when it comes to functions such as voice intercom and broadcasting. Because the front-end devices need to pass through the NAT server and lack public IP addresses, it is difficult for the front-end devices to provide valid Session Description Protocol (SDP) information during media negotiation with the national standard gateway platform. As a result, the voice media stream sent by the national standard gateway platform is intercepted by the NAT server, and smooth voice communication cannot be achieved.
[0058] Based on the above problems, the embodiments of the present application provide a data transmission method, apparatus, equipment, storage medium and program product. According to the embodiments of the present application, the national standard gateway platform actively generates first media parameter information and transmission protocol type information, and sends it to the front-end device. This first media parameter information and transmission protocol type information are determined by the national standard gateway platform based on the current resource status of the national standard gateway platform, ensuring the feasibility of data transmission. After receiving the first media parameter information provided by the national standard gateway platform, the front-end device will determine the target media parameter information from the first media parameter information according to its own receiving conditions, ensuring that both parties reach an agreement on the media parameter information of the data transmission, and at the same time enabling the front-end device to establish a stable and reliable data transmission channel based on the target media parameter information that can be accepted by both the national standard gateway platform and the front-end device. The data transmission channel established by the target media parameter information determined by negotiation between the two parties can effectively avoid the problem of data transmission failure caused by NAT server restrictions, thereby significantly reducing the failure rate of data transmission.
[0059] Before introducing the data transmission method provided by the embodiment of the present application, the data transmission system 100 for implementing the data transmission method is first introduced. Figure 1 As shown, the data transmission system 100 includes a national standard gateway platform 110 and front-end devices 120, which can establish a communication connection via a network 130. Network 130 can be any communication network that supports data transmission. As an example, the front-end devices here refer to all devices that directly participate in tasks such as video acquisition, processing, and transmission and establish a communication connection with the national standard gateway platform, including but not limited to network cameras and network video recorders.
[0060] Figure 2 The following is a flow chart showing the application of a data transmission method provided by an embodiment of the present application to a data transmission system. The execution subject of the data transmission method can be the above-mentioned Figure 1 The data transmission system 100 in Figure 2As shown, the data transmission method provided in the embodiment of the present application may include the following steps: S201 to S208.
[0061] S201: The front-end device sends a first request to the national standard gateway platform, where the first request is used to apply for establishing a data transmission channel with the national standard gateway platform.
[0062] S202: The national standard gateway platform responds to the first request and determines first media parameter information and transmission protocol type information based on the first request and a first resource state of the national standard gateway platform.
[0063] S203: The national standard gateway platform sends the first media parameter information and the transmission protocol type information to the front-end device.
[0064] S204: The front-end device determines target media parameter information based on the first media parameter information and the second resource state of the front-end device.
[0065] S205: The front-end device sends target media parameter information and transmission protocol type information to the national standard gateway platform.
[0066] S206: The front-end device establishes a data transmission channel based on the target media parameter information and the transmission protocol type information.
[0067] S207: The national standard gateway platform confirms receipt of the target media parameter information and transmission protocol type information sent by the front-end device, and confirms that the data transmission channel has been successfully established.
[0068] S208: The national standard gateway platform sends the data to be transmitted to the front-end device through the data transmission channel.
[0069] In some embodiments, in S201, the front-end device needs to establish a data transmission channel with the national standard gateway platform for real-time communication. Based on this, the front-end device will send a specific first request to the national standard gateway platform. The first request can be an INVITE message. The INVITE message is a key message type used to initiate a session in the SIP protocol. When the front-end device wants to establish a connection with the national standard gateway platform, it constructs an INVITE message and sends it to the national standard gateway platform through the network. Specifically, the INVITE message may include the intention to request the establishment of a data transmission channel and information about the media type to be exchanged between the front-end device and the national standard gateway platform.
[0070] In some embodiments, in S202, the first resource status includes information such as bandwidth, processing power, supported media formats, session load, and network conditions. The first media parameter information can be an SDP (Session Description Protocol) message body. SDP is a protocol for describing multimedia sessions, which is used to describe the media type, media parameters (such as video format, audio encoding, etc.) and other session-related information in the session. The information in the SDP message body is determined based on the first request of the front-end device and the resource status of the national standard gateway platform. The front-end device will put forward the requirements of the media type, format, etc. that it can receive and send in the INVITE message, and the national standard gateway platform will match and negotiate according to its own first resource status to determine the first media parameter information.
[0071] As a specific example, the above SDP message body may specifically include:
[0072] Media Type: Indicates the media type used in the session, such as audio and video.
[0073] Media address: includes network type, address type and address, and specifies the transmission destination of media data.
[0074] Session time information: describes the start and end time of the session.
[0075] Bandwidth information: may include maximum bandwidth, average bandwidth, etc., used for session bandwidth management.
[0076] The transport protocol type information refers to the underlying network protocol used to transmit media data. Common examples include the User Datagram Protocol (UDP) and the Transmission Control Protocol (TCP). UDP is a connectionless protocol with fast transmission speeds, but it can suffer from packet loss and out-of-order transmission, providing simple services. TCP is a connection-oriented, reliable transport layer communication protocol. Compared to UDP, it has slower transmission speeds but ensures reliable data transmission.
[0077] In actual applications, the national standard gateway platform will comprehensively determine the transmission protocol type based on the specific requirements in the first request, the real-time network conditions in the first resource status, and the application scenario of the front-end device. For example:
[0078] In a stable network environment, if the front-end device is establishing a data transmission channel for video conferencing, the national standard gateway platform may choose UDP to provide a smooth video communication experience.
[0079] In another network environment with poor network conditions, if the front-end device is a server for file transfer, the national standard gateway platform may choose TCP to ensure the integrity and reliable transmission of file data.
[0080] In one example, in S203, after the national standard gateway platform determines the first media parameter information and the transmission protocol type information, it typically sends a SIP response message (e.g., a 200OK response carrying an SDP message body) to the front-end device. The 200OK response message is typically used to confirm acceptance of the INVITE request.
[0081] The second resource status includes bandwidth, processing capability, supported media formats, session load, network conditions, and the like.
[0082] Next, in S204, after receiving the response message (e.g., a 200 OK response with an SDP message body) from the national standard gateway platform, the front-end device determines target media parameter information acceptable to both parties based on the front-end device's own second resource state. The above S201-S204 constitute a media negotiation process, the goal of which is to find the media parameter settings that best suit the current communication environment, i.e., the target media parameter information.
[0083] In S205, after determining the target media parameter information, the front-end device will send these target media parameter information and the previously confirmed transmission protocol type information (such as UDP or TCP) back to the national standard gateway platform to confirm the final selection of media parameters and transmission protocols by both parties.
[0084] In S206, the front-end device uses the determined target media parameter information and transmission protocol type information to establish a data transmission channel. This involves configuring network parameters, opening connection ports, setting codecs, etc. Once the data transmission channel is successfully established, the front-end device is ready to receive media data.
[0085] In some embodiments, in S207, after receiving the target media parameter information and transmission protocol type information from the front-end device, the national standard gateway platform will confirm to ensure that both parties have consistent selections of media parameters and transmission protocols. At the same time, the national standard gateway platform will also check whether the data transmission channel has been successfully established to achieve final confirmation of the communication status of the communicating parties.
[0086] In some embodiments, in S208, after confirming that the data transmission channel has been successfully established, the national standard gateway platform sends the data to be transmitted to the front-end device through this data transmission channel. This data can be audio, video, text, or other types of media data, depending on the communication application scenario. The data transmission process will be carried out according to the previously negotiated media parameters (target media parameter information) and transmission protocol (transmission protocol type information) to ensure data accuracy and reliability.
[0087] In an embodiment of the present application, dynamic negotiation of media parameters and transmission protocol types is achieved through multiple interactions between the front-end device and the national standard gateway platform, so that the front-end device and the national standard gateway platform can flexibly adjust the first media parameter information based on their respective resource states (such as the first resource state and the second resource state) to obtain the target media parameter information, thereby optimizing data transmission efficiency and quality. After confirming the target media parameter information and the transmission protocol type information, the front-end device can establish a data transmission channel based on this information. In the above manner, by conducting media parameter negotiation and establishing a reliable data transmission channel, the data transmission problem caused by the lack of a public network IP and NAT server restrictions on the national standard gateway platform can be effectively solved, thereby improving the reliability and efficiency of data transmission.
[0088] The data transmission method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios. It is worth noting that in the embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of the data transmission method in the context, and will not be repeated here.
[0089] Figure 3 A flow chart showing the application of a data transmission method provided by an embodiment of the present application to a national standard gateway platform is shown.
[0090] The data transmission method provided in the embodiment of the present application can be applied to the above Figure 1 The national standard gateway platform 110, such as Figure 3 As shown, the data transmission method provided in the embodiment of the present application may include the following steps: S301 to S305.
[0091] S301: Receive a first request sent by a front-end device, where the first request is used by the front-end device to apply for establishing a data transmission channel with a national standard gateway platform.
[0092] S302: In response to the first request, first media parameter information and transmission protocol type information are determined based on the first request and a first resource state of the national standard gateway platform.
[0093] S303: Send first media parameter information and transmission protocol type information to the front-end device.
[0094] S304: Receive target media parameter information and transmission protocol type information sent by the front-end device, where the target media parameter information is determined by the front-end device based on the first media parameter information and the second resource state of the front-end device.
[0095] S305: Send the data to be transmitted to the front-end device through the data transmission channel, where the data transmission channel is established based on the target media parameter information and the transmission protocol type information.
[0096] In an embodiment of the present application, the national standard gateway platform actively generates the first media parameter information and the transmission protocol type information, and sends it to the front-end device. Since the first media parameter information and the transmission protocol type information are determined by the national standard gateway platform based on the first request and the first resource state, the feasibility of data transmission is ensured. After receiving the first media parameter information provided by the national standard gateway platform, the front-end device will determine the target media parameter information from the first media parameter information according to its own receiving conditions, that is, the second resource state, to ensure that the national standard gateway platform and the front-end device reach an agreement on the media parameters of data transmission, and at the same time enable the front-end device to establish a stable and reliable data transmission channel based on the target media parameter information that can be accepted by both the national standard gateway platform and the front-end device. The data transmission channel established by the target media parameter information determined through negotiation between the national standard gateway platform and the front-end device can effectively avoid the problem of data transmission failure caused by NAT restrictions, thereby significantly reducing the failure rate of data transmission.
[0097] In some embodiments of the present application, in order to achieve effective communication between the national standard gateway platform and the front-end device and ensure smooth data transmission, before the aforementioned S301, as shown in FIG. Figure 4 As shown, the above-mentioned data transmission method may further include the following steps: S401 to S403.
[0098] S401: Sending second notification information to a front-end device, where the second notification information is used to notify the front-end device to participate in data transmission.
[0099] The second notification information is used to notify the front-end device that a communication session is about to begin and that the front-end device is ready to participate in data transmission, so that the front-end device can make preparations.
[0100] As an example, the national standard gateway platform can notify the front-end device to perform voice broadcast by sending a broadcast message to the front-end device.
[0101] S402: Receive first response information sent by the front-end device, where the first response information is generated by the front-end device based on the second notification information.
[0102] The first response information is usually a confirmation message, indicating that the front-end device is ready for or has understood the upcoming data transmission operation.
[0103] In one example, after receiving a broadcast message, the front-end device also sends a response message (e.g., a 200OK response) to the national standard gateway platform. Receiving this response message indicates that the front-end device has successfully received and understood the content of the broadcast message. 200OK is a universal success response indicator used to indicate the front-end device's response to the broadcast message.
[0104] S403: When it is determined according to the first response information that the front-end device confirms to participate in the data transmission, a third notification message is sent to the front-end device; the third notification message is used to notify the front-end device to send a first request to the national standard gateway platform.
[0105] The third notification information is a confirmation of the first response information of the front-end device, and further notifies the front-end device that it can now send a first request to formally request to establish a data transmission channel.
[0106] As an example, the third notification information can be a 200OK response. The national standard gateway platform sends a 200OK response to the front-end device, which can be used to indicate the national standard gateway platform's feedback on the first response information. After receiving the 200OK response, the front-end device sends an INVITE message to the national standard gateway platform to request the establishment of a data transmission channel.
[0107] In this embodiment of the present application, by sending a second notification message to the front-end device and receiving a corresponding first response message, the national standard gateway platform can confirm whether the front-end device is willing to participate in the data transmission, thereby avoiding unnecessary resource waste and potential conflicts. After the front-end device agrees to participate and confirms its readiness, a third notification message is sent to instruct it to send the first request, helping to ensure the smooth progress of the data transmission process and reducing transmission failures or delays caused by the front-end device being unready.
[0108] In some embodiments of the present application, the transmission protocol type information includes the transmission control protocol, before the aforementioned S305, such as Figure 5 As shown, the above-mentioned data transmission method may further include the following steps: S501 to S504.
[0109] S501: Receive a second request sent by a front-end device, where the second request is used by the front-end device to apply for establishing a data transmission channel through a transmission control protocol and target media parameter information.
[0110] After receiving confirmation from the national standard gateway platform regarding the target media parameter information and the transmission protocol type (TCP), the front-end device further makes a specific request to establish a data transmission channel. The front-end device sends a second request to apply for establishing a data transmission channel using the transmission control protocol and the target media parameter information.
[0111] S502: Generate second response information based on the second request, where the second response information is used to confirm whether to accept the establishment of a data transmission channel through the transmission control protocol and the target media parameter information.
[0112] The national standard gateway platform generates a second response message based on the second request, confirming whether to accept the establishment of a data transmission channel using TCP and the target media parameter information. This response message is a response to the second request of the front-end device, indicating whether the national standard gateway platform agrees to the second request.
[0113] S503: Send second response information to the front-end device.
[0114] The national standard gateway platform sends a second response message to the front-end device to notify the front-end device of the confirmation result.
[0115] S504: Receive the third response information sent by the front-end device. The third response information is sent by the front-end device when it confirms that the national standard gateway platform accepts the establishment of a data transmission channel through the transmission control protocol and target media parameter information based on the second response information. The third response information is used to establish the data transmission channel.
[0116] Among them, if the front-end device confirms that the national standard gateway platform accepts the second request according to the second response information, it sends a third response information to respond to the confirmation of the national standard gateway platform, and marks that the establishment of the data transmission channel enters the actual operation stage.
[0117] In this embodiment of the application, the national standard gateway platform confirms the front-end device's request, and the front-end device responds to the confirmation result, ensuring the reliability of the data transmission channel establishment process. Only after both parties confirm that it is correct will the actual operation phase begin, thus reducing data transmission problems caused by communication errors.
[0118] In a specific implementation scenario, after the national standard gateway platform and the front-end device negotiate the media parameters and transmission protocol type through the SIP protocol, they explicitly specify the use of TCP for data transmission. At this time, the front-end device initiates the TCP connection establishment process based on the parameters of the media negotiation (target media parameter information and TCP), and sends a TCP SYN packet to the national standard gateway platform to synchronize the sequence number. After receiving the TCP SYN packet, the national standard gateway platform will send a TCP response to the front-end device. The response carries both SYN and ACK flags so that the national standard gateway platform can also synchronize its sequence number and confirm the receipt of the SYN packet from the front-end device. Next, the front-end device sends a TCP ACK packet. At this point, the TCP channel between the front-end device and the national standard gateway platform is completely established, indicating that the TCP connection between the two parties has been successfully established and data transmission through the TCP channel can begin.
[0119] In some embodiments of the present application, in order to improve communication efficiency of data transmission, the transmission protocol type information includes the User Datagram Protocol. Before the aforementioned S305, the above-mentioned data transmission method may further include:
[0120] Receive a User Datagram Protocol detection packet sent by a front-end device to establish a data transmission channel. The User Datagram Protocol detection packet is generated by the front-end device based on target media parameter information.
[0121] Among them, the User Datagram Protocol (UDP) has lower latency and jitter, making it more suitable for application scenarios with high real-time requirements, such as live video streaming and online gaming. In these scenarios, even if some data packets are occasionally lost, it will not significantly affect the overall communication quality. In network communications, UDP is a connectionless protocol. Therefore, to ensure the validity of the UDP channel, the front-end device will actively send one or more UDP probe packets to the national standard gateway platform. By sending UDP probe packets, the front-end device can check whether the national standard gateway platform can receive the data packets and, based on this, determine whether the UDP receiving channel is unobstructed.
[0122] In the embodiments of this application, UDP is a connectionless protocol that does not require a connection establishment process like TCP. Sending UDP probe packets to establish a data transmission channel can significantly reduce the time it takes to establish the data transmission channel and significantly improve overall communication efficiency and response speed, providing support for application scenarios with high real-time requirements.
[0123] Figure 6 A flow chart showing the application of a data transmission method provided by an embodiment of the present application to a front-end device is shown.
[0124] The data transmission method provided in the embodiment of the present application can be applied to the above Figure 1 The front-end device 120 in Figure 6 As shown, the data transmission method provided in the embodiment of the present application may include the following steps: S601 to S606.
[0125] S601: Send a first request to the national standard gateway platform, where the first request is used to apply for establishing a data transmission channel with the national standard gateway platform.
[0126] S602: Receive first media parameter information and transmission protocol type information sent by the national standard gateway platform, where the first media parameter information and transmission protocol type information are determined by the national standard gateway platform based on the first request and a first resource state of the national standard gateway platform.
[0127] S603: Determine target media parameter information based on the first media parameter information and the second resource state of the front-end device.
[0128] S604: Send target media parameter information and transmission protocol type information to the national standard gateway platform.
[0129] S605: Establish a data transmission channel based on the target media parameter information and the transmission protocol type information.
[0130] S606: Receive the data to be transmitted sent by the national standard gateway platform through the data transmission channel.
[0131] In the embodiments of the present application, multiple negotiations between the front-end device and the national standard gateway platform ensure that both parties determine an optimal set of media parameters and transmission protocol types based on their respective first resource states and second resource states. Establishing a data transmission channel based on the target media parameter information and transmission protocol type information determined through negotiation between the front-end device and the national standard gateway platform can better adapt to the current network environment and device conditions, thereby improving the efficiency and stability of data transmission.
[0132] In some embodiments of the present application, before the aforementioned S601, as Figure 7 As shown, the above-mentioned data transmission method may further include the following steps: S701 to S703.
[0133] S701: Receive second notification information sent by the national standard gateway platform, where the second notification information is used to notify the front-end device to participate in data transmission.
[0134] S702: Generate first response information based on the second notification information.
[0135] The front-end device generates a corresponding first response message based on the received data transmission participation notification, i.e., the second notification message, and sends the first response message to the national standard gateway platform. This first response message indicates the front-end device's confirmation and preparation for participating in the data transmission task.
[0136] S703: Send a first response message to the national standard gateway platform.
[0137] S704: Receive third notification information sent by the national standard gateway platform. The third notification information is sent by the national standard gateway platform when it determines, based on the first response information, that the front-end device confirms to participate in the data transmission.
[0138] In an embodiment of the present application, based on the received second notification information, the front-end device generates and sends a first response information to the national standard gateway platform, thereby clearly confirming whether the front-end device participates in the data transmission. After receiving the third notification information from the national standard gateway platform confirming the front-end device's participation in the data transmission based on the first response information, the front-end device can more efficiently enter the data transmission preparation state, greatly shortening the time from the front-end device being on standby to actually participating in the data transmission, and improving the immediacy and efficiency of data transmission.
[0139] In some embodiments of the present application, the transmission protocol type information includes a transmission control protocol, such as Figure 8 As shown, the above S605 may specifically include the following steps: S6051 to S6053.
[0140] S6051: Send a second request to the national standard gateway platform, where the second request is used to apply to the national standard gateway platform to establish a data transmission channel through the transmission control protocol and target media parameter information.
[0141] The second request specifies that the front-end device wishes to use the transmission control protocol and target media parameter information to establish a data transmission channel to perform data transmission with the national standard gateway platform.
[0142] In one example, the second request can be completed through a message containing transmission control protocol and target media parameter information. Specifically, sending a TCP SYN packet to the national standard gateway platform is the first step in the TCP three-way handshake process, indicating that the front-end device hopes to establish a TCP connection with the national standard gateway platform.
[0143] S6052: Receive a second response message sent by the national standard gateway platform. The second response message is generated by the national standard gateway platform based on the second request and is used to confirm whether to accept the establishment of a data transmission channel through the transmission control protocol and the target media parameter information.
[0144] In one example, after receiving the TCP SYN packet, the national standard gateway platform will send a TCP response to the front-end device. The response carries both SYN and ACK flags so that the national standard gateway platform can also synchronize its sequence number and confirm receipt of the SYN packet from the front-end device, indicating willingness to establish a connection.
[0145] S6053: When confirming, based on the second response information, that the national standard gateway platform accepts the establishment of a data transmission channel through the transmission control protocol and the target media parameter information, a third response information is sent to the national standard gateway platform, where the third response information is used to establish the data transmission channel.
[0146] In one example, the front-end device sends a TCP ACK packet, and the TCP channel between the front-end device and the national standard gateway platform is completely established.
[0147] In the embodiment of the present application, the front-end device efficiently establishes a TCP channel with the national standard gateway platform by actively requesting, receiving confirmation and sending a response.
[0148] In some embodiments of the present application, the transmission protocol type information includes the User Datagram Protocol, and the above S605 may specifically include:
[0149] Generate a User Datagram Protocol probe packet based on target media parameter information;
[0150] Send a User Datagram Protocol probe packet to the national standard gateway platform to establish a data transmission channel.
[0151] Among them, a probe packet is a data packet used to test network connectivity, performance, or protocol compatibility. The User Datagram Protocol probe packet is used to test whether the UDP channel between the target national standard gateway platform can be successfully established and transmit data. A data transmission channel refers to a path in a network for transmitting data between two or more communicating entities. In the embodiments of the present application, a data transmission channel specifically refers to a path established via UDP for transmitting media data.
[0152] In one example, a UDP probe packet is first generated based on the target media parameter information. This probe packet can include some specific data for testing or verification. The generated UDP probe packet is then sent to the national standard gateway platform to test whether the UDP channel from the front-end device to the national standard gateway platform is unobstructed and whether the national standard gateway platform can correctly process data packets in this format. If the national standard gateway platform successfully receives and responds to the UDP probe packet, it can be considered that the UDP-based data transmission channel has been successfully established. Next, the national standard gateway platform can transmit the actual data to be transmitted through this data transmission channel.
[0153] In an embodiment of the present application, since UDP is connectionless, the front-end device can quickly send UDP probe packets to try to establish a data transmission channel without the need for a complex three-way handshake process like TCP, which helps to start data transmission faster in scenarios that require a quick response.
[0154] The data transmission method provided in the embodiment of the present application can be executed by a data transmission device. In the embodiment of the present application, the data transmission method performed by a data transmission device is taken as an example to illustrate the data transmission device provided in the embodiment of the present application.
[0155] Figure 9 The data transmission device 900 provided in one embodiment of the present application is applied to the national standard gateway platform. Figure 1 The national standard gateway platform 110.
[0156] like Figure 9 As shown, the data transmission device 900 may include:
[0157] The first receiving module 901 is configured to receive a first request sent by a front-end device, where the first request is used by the front-end device to apply for establishing a data transmission channel with the national standard gateway platform.
[0158] The first response module 902 is configured to respond to the first request and determine first media parameter information and transmission protocol type information based on the first request and the first resource status of the national standard gateway platform.
[0159] The first sending module 903 is configured to send first media parameter information and transmission protocol type information to a front-end device.
[0160] The second receiving module 904 is configured to receive target media parameter information and transmission protocol type information sent by the front-end device, where the target media parameter information is determined by the front-end device based on the first media parameter information and the second resource state of the front-end device.
[0161] The second sending module 905 is configured to send the data to be transmitted to the front-end device via a data transmission channel, where the data transmission channel is established based on target media parameter information and transmission protocol type information.
[0162] In an embodiment of the present application, the national standard gateway platform actively generates the first media parameter information and the transmission protocol type information through the first response module 902, and sends the first media parameter information and the transmission protocol type information to the front-end device through the first sending module 903. Since the first media parameter information and the transmission protocol type information are determined by the national standard gateway platform based on the first request and the first resource state, the feasibility of data transmission is ensured. After receiving the first media parameter information provided by the national standard gateway platform, the front-end device will determine the target media parameter information from the first media parameter information according to its own receiving conditions, that is, the second resource state, to ensure that the national standard gateway platform and the front-end device reach an agreement on the media parameters of the data transmission, and at the same time enable the front-end device to establish a stable and reliable data transmission channel based on the target media parameter information that can be accepted by both the national standard gateway platform and the front-end device. The data transmission channel established by the target media parameter information determined by negotiation between the national standard gateway platform and the front-end device can effectively avoid the problem of data transmission failure caused by NAT restrictions, thereby significantly reducing the failure rate of data transmission.
[0163] In some embodiments of the present application, the data transmission device may further include:
[0164] The fifth sending module is used to send second notification information to the front-end device, where the second notification information is used to notify the front-end device to participate in data transmission.
[0165] The fifth receiving module is used to receive first response information sent by the front-end device, where the first response information is generated by the front-end device based on the second notification information.
[0166] The sixth sending module is used to send third notification information to the front-end device when it is determined according to the first response information that the front-end device confirms to participate in the data transmission; the third notification information is used to notify the front-end device to send a first request to the national standard gateway platform.
[0167] In some embodiments of the present application, the transmission protocol type information includes a transmission control protocol. The above-mentioned data transmission device may also include:
[0168] The sixth receiving module is used to receive a second request sent by the front-end device before sending the data to be transmitted to the front-end device through the data transmission channel. The second request is used by the front-end device to apply for establishing a data transmission channel through the transmission control protocol and target media parameter information.
[0169] The first generating module is used to generate second response information based on the second request, and the second response information is used to confirm whether to accept the establishment of a data transmission channel through the transmission control protocol and the target media parameter information.
[0170] The seventh sending module is used to send second response information to the front-end device.
[0171] The seventh receiving module is used to receive the third response information sent by the front-end device. The third response information is sent by the front-end device when it confirms that the national standard gateway platform accepts the establishment of a data transmission channel through the transmission control protocol and target media parameter information based on the second response information. The third response information is used to establish the data transmission channel.
[0172] In some embodiments of the present application, the transmission protocol type information includes the User Datagram Protocol. The above-mentioned data transmission device may further include:
[0173] The eighth receiving module is used to receive the user datagram protocol detection packet sent by the front-end device before sending the data to be transmitted to the front-end device through the data transmission channel to establish a data transmission channel. The user datagram protocol detection packet is generated by the front-end device based on the target media parameter information.
[0174] Figure 10 The data transmission device 1000 provided in one embodiment of the present application is applied to a front-end device. Figure 1 The front-end device 120 in.
[0175] like Figure 10 As shown, the data transmission device 1000 may include:
[0176] The third sending module 1001 is used to send a first request to the national standard gateway platform, where the first request is used to apply for establishing a data transmission channel with the national standard gateway platform;
[0177] A third receiving module 1002 is configured to receive first media parameter information and transmission protocol type information sent by the national standard gateway platform, where the first media parameter information and transmission protocol type information are determined by the national standard gateway platform based on the first request and a first resource state of the national standard gateway platform;
[0178] A first determining module 1003 is configured to determine target media parameter information based on the first media parameter information and a second resource state of the front-end device;
[0179] The fourth sending module 1004 is used to send target media parameter information and transmission protocol type information to the national standard gateway platform;
[0180] Establishing module 1005, for establishing a data transmission channel based on target media parameter information and transmission protocol type information;
[0181] The fourth receiving module 1006 is configured to receive the data to be transmitted sent by the national standard gateway platform through the data transmission channel.
[0182] In the embodiment of the present application, multiple negotiations between the front-end device and the national standard gateway platform are achieved through the third sending module 1001, the third receiving module 1002, and the first determining module 1003, ensuring that both parties determine an optimal set of media parameters and transmission protocol types based on their respective first resource states and second resource states. Furthermore, the establishment module 1005 establishes a data transmission channel based on the target media parameter information and transmission protocol type information determined through negotiation between the front-end device and the national standard gateway platform, thereby better adapting to the current network environment and device conditions, thereby improving the efficiency and stability of data transmission.
[0183] In some embodiments of the present application, the data transmission device 1000 may further include:
[0184] The ninth receiving module is used to receive the second notification information sent by the national standard gateway platform, where the second notification information is used to notify the front-end device to participate in data transmission.
[0185] The second generating module is used to generate first response information based on the second notification information.
[0186] The eighth sending module is used to send the first response information to the national standard gateway platform.
[0187] The tenth receiving module is configured to receive third notification information sent by the national standard gateway platform, where the third notification information is sent by the national standard gateway platform when it determines, based on the first response information, that the front-end device confirms participating in the data transmission.
[0188] In some embodiments of the present application, the transmission protocol type information includes a transmission control protocol, and the establishment module 1005 may be specifically used to:
[0189] A second request is sent to the national standard gateway platform, where the second request is used to apply to the national standard gateway platform for establishing a data transmission channel through the transmission control protocol and target media parameter information.
[0190] Receive the second response information sent by the national standard gateway platform, where the second response information is generated by the national standard gateway platform based on the second request and is used to confirm whether to accept the establishment of a data transmission channel through the transmission control protocol and target media parameter information.
[0191] When it is confirmed according to the second response information that the national standard gateway platform accepts the establishment of the data transmission channel through the transmission control protocol and the target media parameter information, a third response information is sent to the national standard gateway platform, and the third response information is used to establish the data transmission channel.
[0192] In some embodiments of the present application, the transmission protocol type information includes the User Datagram Protocol, and the establishment module 1005 may be specifically used to:
[0193] Generate a User Datagram Protocol probe packet based on target media parameter information;
[0194] Send a User Datagram Protocol probe packet to the national standard gateway platform to establish a data transmission channel.
[0195] Figure 11 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0196] The electronic device 1100 is applied to the above Figure 1 The front-end device 120 may specifically include a processor 1101 and a memory 1102 storing computer program instructions.
[0197] Specifically, the processor 1101 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0198] Memory 1102 may include a large capacity memory for data or instructions. By way of example and not limitation, memory 1102 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 1102 may include removable or non-removable (or fixed) media. Where appropriate, memory 1102 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, memory 1102 is a non-volatile solid-state memory.
[0199] Among other things, the memory 1102 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, generally, the memory 1102 includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0200] The processor 1101 implements any one of the data transmission methods in the above embodiments by reading and executing computer program instructions stored in the memory 1102 .
[0201] In one example, the electronic device 1100 may further include a communication interface 1103 and a bus 1110. Figure 11 As shown, the processor 1101 , the memory 1102 , and the communication interface 1103 are connected via a bus 1110 and communicate with each other.
[0202] The communication interface 1103 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0203] Bus 1110 comprises hardware, software or both, couples the parts of electronic device 1100 to each other.For example, and not limitation, bus can comprise accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations.In suitable cases, bus 310 can comprise one or more buses.Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.
[0204] The electronic device 1100 can execute the data transmission method in the embodiment of the present application, thereby realizing the above-mentioned data transmission method and device.
[0205] The present application also provides an electronic device, which is used for Figure 1 The national standard gateway platform in the electronic device, the specific structure of the electronic device can refer to the above-mentioned electronic device 1100, and will not be repeated here.
[0206] In addition, in conjunction with the data transmission method in the above embodiments, the present application embodiment may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the data transmission methods in the above embodiments is implemented.
[0207] In addition, in combination with the data transmission method in the above embodiment, the embodiment of the present application can provide a computer program product for implementation. The computer program product includes a computer program, and when the computer program is processed and executed, it implements any of the above data transmission methods.
[0208] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.
[0209] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0210] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0211] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0212] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.
Claims
1. A data transmission method, characterized in that: Applied to the national standard gateway platform, the method includes: receiving a first request sent by a front-end device, where the first request is used by the front-end device to apply for establishing a data transmission channel with the national standard gateway platform; In response to the first request, determining first media parameter information and transmission protocol type information based on the first request and a first resource state of the national standard gateway platform; Sending the first media parameter information and transmission protocol type information to the front-end device; receiving target media parameter information and transmission protocol type information sent by the front-end device, where the target media parameter information is determined by the front-end device based on the first media parameter information and a second resource state of the front-end device; The data to be transmitted is sent to the front-end device through the data transmission channel, where the data transmission channel is established based on the target media parameter information and the transmission protocol type information.
2. The data transmission method according to claim 1, wherein: Before receiving the first request sent by the front-end device, the method further includes: Sending second notification information to the front-end device, where the second notification information is used to notify the front-end device to participate in data transmission; receiving first response information sent by the front-end device, where the first response information is generated by the front-end device based on the second notification information; When it is determined according to the first response information that the front-end device confirms to participate in the data transmission, a third notification message is sent to the front-end device; the third notification message is used to notify the front-end device to send the first request to the national standard gateway platform.
3. The data transmission method according to claim 1 or 2, characterized in that: The transmission protocol type information includes a transmission control protocol. Before sending the data to be transmitted to the front-end device through the data transmission channel, the method further includes: receiving a second request sent by the front-end device, where the second request is used by the front-end device to apply for establishing a data transmission channel through the transmission control protocol and the target media parameter information; generating second response information based on the second request, the second response information being used to confirm whether to accept establishing a data transmission channel through the transmission control protocol and the target media parameter information; Sending second response information to the front-end device; Receive the third response information sent by the front-end device, where the third response information is sent by the front-end device when the front-end device confirms, based on the second response information, that the national standard gateway platform accepts the establishment of a data transmission channel through the transmission control protocol and the target media parameter information, and the third response information is used to establish the data transmission channel.
4. The data transmission method according to claim 1 or 2, characterized in that: The transmission protocol type information includes a user datagram protocol. Before sending the data to be transmitted to the front-end device through the data transmission channel, the method further includes: A user datagram protocol detection packet sent by the front-end device is received to establish a data transmission channel, where the user datagram protocol detection packet is generated by the front-end device based on the target media parameter information.
5. A data transmission method, characterized in that: Applied to a front-end device, the method includes: Sending a first request to the national standard gateway platform, where the first request is used to apply for establishing a data transmission channel with the national standard gateway platform; Receiving first media parameter information and transmission protocol type information sent by the national standard gateway platform, where the first media parameter information and transmission protocol type information are determined by the national standard gateway platform based on the first request and a first resource state of the national standard gateway platform; Determining target media parameter information based on the first media parameter information and a second resource state of the front-end device; Sending target media parameter information and transmission protocol type information to the national standard gateway platform; Establishing a data transmission channel based on the target media parameter information and the transmission protocol type information; Receive the data to be transmitted sent by the national standard gateway platform through the data transmission channel.
6. The data transmission method according to claim 5, characterized in that: Before sending the first request to the national standard gateway platform, the method further includes: receiving a second notification message sent by the national standard gateway platform, where the second notification message is used to notify the front-end device to participate in data transmission; generating first response information based on the second notification information; Sending a first response message to the national standard gateway platform; Receive third notification information sent by the national standard gateway platform, where the third notification information is sent by the national standard gateway platform when it is determined, based on the first response information, that the front-end device confirms participating in data transmission.
7. The data transmission method according to claim 5 or 6, characterized in that: The transmission protocol type information includes a transmission control protocol, and establishing a data transmission channel based on the target media parameter information and the transmission protocol type information includes: Sending a second request to the national standard gateway platform, where the second request is used to apply to the national standard gateway platform to establish a data transmission channel using the transmission control protocol and the target media parameter information; receiving a second response message sent by the national standard gateway platform, where the second response message is generated by the national standard gateway platform based on the second request and is used to confirm whether to accept the establishment of a data transmission channel through the transmission control protocol and the target media parameter information; When it is confirmed according to the second response information that the national standard gateway platform accepts the establishment of the data transmission channel through the transmission control protocol and the target media parameter information, a third response information is sent to the national standard gateway platform, and the third response information is used to establish the data transmission channel.
8. The data transmission method according to claim 5 or 6, characterized in that: The transmission protocol type information includes a user datagram protocol, and establishing a data transmission channel based on the target media parameter information and the transmission protocol type information includes: generating a user datagram protocol probe packet based on the target media parameter information; Send a User Datagram Protocol detection packet to the national standard gateway platform to establish a data transmission channel.
9. A data transmission device, characterized in that: Applied to the national standard gateway platform, the device includes: A first receiving module is configured to receive a first request sent by a front-end device, where the first request is used by the front-end device to apply for establishing a data transmission channel with the national standard gateway platform; A first response module, configured to determine, in response to the first request, first media parameter information and transmission protocol type information based on the first request and a first resource state of the national standard gateway platform; A first sending module, configured to send the first media parameter information and transmission protocol type information to the front-end device; a second receiving module, configured to receive target media parameter information and transmission protocol type information sent by the front-end device, wherein the target media parameter information is determined by the front-end device based on the first media parameter information and a second resource state of the front-end device; The second sending module is used to send the data to be transmitted to the front-end device through the data transmission channel, where the data transmission channel is established based on the target media parameter information and the transmission protocol type information.
10. A data transmission device, characterized in that: Applied to front-end equipment, the device includes: A third sending module is used to send a first request to the national standard gateway platform, where the first request is used to apply for establishing a data transmission channel with the national standard gateway platform; A third receiving module is configured to receive first media parameter information and transmission protocol type information sent by the national standard gateway platform, where the first media parameter information and transmission protocol type information are determined by the national standard gateway platform based on the first request and a first resource state of the national standard gateway platform; A first determining module, configured to determine target media parameter information based on the first media parameter information and a second resource state of the front-end device; A fourth sending module, configured to send target media parameter information and transmission protocol type information to the national standard gateway platform; An establishing module, configured to establish a data transmission channel based on the target media parameter information and the transmission protocol type information; The fourth receiving module is used to receive the data to be transmitted sent by the national standard gateway platform through the data transmission channel.
11. An electronic device, applied to a national standard gateway platform, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the data transmission method according to any one of claims 1 to 4 is implemented.
12. An electronic device, used in front-end equipment, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the data transmission method according to any one of claims 5 to 8 is implemented.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the data transmission method according to any one of claims 1 to 8 is implemented.
14. A computer program product, characterized in that The invention comprises a computer program, which implements the data transmission method according to any one of claims 1 to 8 when the computer program is processed and executed.
Citation Information
Patent Citations
Monitoring video obtaining method and system
CN110086772A
Network access method, media gateway, electronic equipment and storage medium
CN113949695A