A data transmission method for cross-network communication

CN122824677APending Publication Date: 2026-09-25XINGTANG TELECOMM TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510348536.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0005]鉴于上述的分析,本发明实施例旨在提供一种用于跨网通信的数据传输方法,用以解决现有技术中跨网通信时网络延迟高、通信质量低的问题

Benefits of technology

[0042]与现有技术相比,本发明至少可实现如下有益效果之一:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122824677A_ABST
    Figure CN122824677A_ABST
Patent Text Reader

Abstract

The application relates to a data transmission method for cross-network communication, and belongs to the technical field of cross-network communication. The method solves the problems of high network delay and low communication quality in the prior art. The data transmission method comprises the following steps: S1, determining the allocated bandwidth of each device in a same session; S2, encoding the to-be-sent data of each device based on the coding rate of each device to obtain the to-be-sent data packet corresponding to each device; S3, transmitting the to-be-sent data packet corresponding to each device to a transmission port corresponding to each device through network isolation device configuration according to the allocated bandwidth of each device; and S4, judging whether the session is ended according to the number of all devices in the session in each sending period; if yes, terminating the execution; and if no, repeating the steps S2, S3 and S4. The network delay during cross-network communication is reduced, and the communication quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cross-network communication technology, and in particular to a data transmission method for cross-network communication. Background Technology

[0002] With the increasing demands for data security and network security, many important locations or organizations involving sensitive information typically adopt network isolation measures, such as dual one-way network isolation switching systems.

[0003] While ensuring data security, network isolation switching systems also pose a serious challenge to cross-network communication in communication systems. Traditional communication systems rely on a wide range of port negotiation options and unrestricted bandwidth transmission channels, but these conditions are often difficult to meet under network isolation, resulting in high network latency, degraded communication quality, and even functional limitations in communication systems.

[0004] Therefore, there is an urgent need for a new technical solution suitable for cross-network communication. Summary of the Invention

[0005] Based on the above analysis, the embodiments of the present invention aim to provide a data transmission method for cross-network communication, so as to solve the problems of high network latency and low communication quality in the prior art when cross-network communication.

[0006] This invention provides a data transmission method for cross-network communication, the data transmission method comprising:

[0007] Step S1: Determine the allocated bandwidth for each device based on the media stream priority of each device in the same session and the total bandwidth of the session;

[0008] Step S2: Based on the encoding bitrate of each device, the data to be sent by each device is encoded using the media stream identification information of each device to obtain the data packet to be sent for each device;

[0009] Step S3: Transmit the data packets to be sent for each device through the transmission port configured for each device in the network isolation device according to the allocated bandwidth of each device; wherein, the network isolation device configures the same transmission port for multiple devices;

[0010] Step S4: Within each transmission cycle, determine whether the session has ended based on the number of all devices in the session; if yes, terminate the execution; if no, repeat steps S2, S3 and S4.

[0011] Based on a further improvement to the above data transmission method, in step S1, the allocated bandwidth for each device is calculated using the following formula:

[0012]

[0013] Among them, B i P represents the allocated bandwidth for the i-th device. i This indicates the media stream priority of the i-th device, and M represents the total number of devices in this session. B represents the sum of media stream priorities for all devices in this session. total This indicates the total bandwidth of the session in this session.

[0014] Based on a further improvement to the above data transmission method, the step of encoding the data to be transmitted by each device using the media stream identifier information of each device includes:

[0015] Determine the stream type, timestamp, and checksum of the data to be sent for each device; the media stream identification information for each device includes its session ID, device ID, and media stream priority.

[0016] The media stream identifier information of each device, as well as the stream type, timestamp, and checksum of each data packet to be sent, are compressed using a variable-length character encoding method and added to the extension header of each data packet to be sent.

[0017] Based on further improvements to the above data transmission method, the data stream type includes one or more of the following:

[0018] Audio stream;

[0019] Video stream;

[0020] Data flow.

[0021] Based on a further improvement to the above data transmission method, the step of transmitting the data packets to be sent corresponding to each device through the transmission port corresponding to each device configured in the network isolation device, according to the allocated bandwidth of each device, includes:

[0022] Tokens generated are placed into a token bucket according to the token generation rate. If the token bucket is full, excess tokens are discarded. The number of tokens in the token bucket during the current sending cycle is counted. Each device has one token bucket.

[0023] Determine whether the number of tokens in the token bucket during the current sending period is greater than or equal to the number of data packets to be sent; if so, transmit all the data packets to be sent through the transmission port corresponding to each device configured in the network isolation device, and at the same time, retrieve the corresponding number of tokens from the token bucket.

[0024] Based on the further improvement of the above data transmission method, if the number of tokens in the token bucket in the current transmission cycle is less than the data packet to be sent, the data packet to be sent will be discarded and the data transmission in the current transmission cycle will be paused.

[0025] At the same time, the coding rate of the corresponding device in the next transmission cycle is reduced.

[0026] Based on a further improvement to the above data transmission method, before determining whether the session has ended based on the total number of devices in the session, the method further includes:

[0027] Determine whether the devices in the current sending cycle and the devices in the next sending cycle have changed in the session;

[0028] If yes, then the allocated bandwidth for each device is updated based on the media stream priority of each device and the total bandwidth of the session in the next transmission cycle of the session.

[0029] Based on the further improvement of the above data transmission method, if the devices in the session have not changed, the actual transmission bandwidth of each device in the current transmission cycle is collected to determine the minimum bandwidth required by each device.

[0030] Based on the media stream priority of each device, the total session bandwidth, the actual transmission bandwidth of each device, and the minimum bandwidth requirement of each device, the allocated bandwidth of each device in the next transmission cycle is updated using a linear programming method, thereby improving the utilization rate of the total session bandwidth.

[0031] Based on a further improvement to the above data transmission method, the step of updating the allocated bandwidth of each device in the next transmission cycle using a linear programming method, based on the media stream priority of each device, the total session bandwidth, the actual transmission bandwidth of each device, and the minimum bandwidth requirement of each device, includes:

[0032] The constraint equations are determined based on the media stream priority of each device, the total session bandwidth, the actual transmission bandwidth of each device, and the minimum required bandwidth of each device.

[0033] The objective function equation is to maximize the allocated bandwidth of all devices.

[0034] Based on the constraint equations, the objective function equation is calculated using linear programming to obtain the allocated bandwidth for each device in the next transmission cycle.

[0035] Based on a further improvement of the above data transmission method, the constraint equation is as follows:

[0036]

[0037]

[0038] in, d represents the allocated bandwidth for the i-th device in the next transmission cycle.i W represents the minimum bandwidth requirement for the i-th device. i This represents the bandwidth allocation weight for the i-th device. Δ represents the actual transmission bandwidth of the i-th device in the current transmission cycle. max Indicates the bandwidth adjustment threshold;

[0039] The objective function equation is:

[0040]

[0041] Here, maximize means taking the maximum value.

[0042] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:

[0043] 1. Configuring multiple devices in the same network environment onto the same transmission port on a network isolation device reduces the use of transmission ports, improves the configuration efficiency of transmission ports, and enhances the efficiency of cross-network communication.

[0044] 2. Determine the media stream priority for each device, and use the media stream priority to determine the allocated bandwidth and encoding of the data to be sent for each device, so that smooth communication can still be guaranteed when network bandwidth is limited;

[0045] 3. During data transmission, the token bucket algorithm ensures that bursts of traffic transmitted by each device can be transmitted smoothly, minimizing data packet loss and improving the smoothness of cross-network communication.

[0046] 4. During data transmission, based on the media stream priority of each device, the total session bandwidth, the actual transmission bandwidth of each device, and the minimum bandwidth requirement of each device, the allocated bandwidth of each device in the next transmission cycle is determined by linear programming, thereby improving the utilization rate of the total session bandwidth.

[0047] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description

[0048] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0049] Figure 1 This is a flowchart illustrating a data transmission method for cross-network communication provided in an embodiment of the present invention.

[0050] Figure 2 This is a schematic diagram of the cross-network communication structure provided in an embodiment of the present invention. Detailed Implementation

[0051] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0052] A specific embodiment of the present invention discloses a data transmission method for cross-network communication, such as... Figure 1 As shown, the data transmission method includes:

[0053] Step S1: Determine the allocated bandwidth for each device based on the media stream priority of each device in the same session and the total bandwidth of the session;

[0054] Step S2: Based on the encoding bitrate of each device, the data to be sent by each device is encoded using the media stream identification information of each device to obtain the data packet to be sent for each device;

[0055] Step S3: Transmit the data packets to be sent for each device through the transmission port configured for each device in the network isolation device according to the allocated bandwidth of each device; wherein, the network isolation device configures the same transmission port for multiple devices;

[0056] Step S4: Within each transmission cycle, determine whether the session has ended based on the number of all devices in the session; if yes, terminate the execution; if no, repeat steps S2, S3 and S4.

[0057] Specifically, such as Figure 2 As shown, network A and network B need to communicate through a network isolation device. It's worth noting that network A can be an internal network, while network B is a network other than network A. Data from network A needs to be smoothly transmitted to network B, and the network isolation device is used to configure transmission ports for each device.

[0058] For example, in network A, there are 5 devices, namely device A1, device A2, ..., device A5, which need to transmit data to network B. In this scenario, the data transmission method for cross-network communication provided in this embodiment of the invention is applied to the cross-network communication backend server A.

[0059] Specifically, after connecting five devices (A1, A2, ..., A5) to the cross-network communication backend server A, server A configures a session ID, device ID, and media stream priority for each device. Each device's session ID represents the session it participates in, identifying an independent communication session. This session ID is globally unique and can be represented using a UUID (Universally Unique Identifier) ​​format, used to manage all data from the same session ID. Each device's device ID identifies the device participating in the communication. Each device has a unique device ID, which can be represented by a 16-bit integer, supporting up to 65,536 devices to meet large-scale communication needs. Each device's media stream priority represents the priority of the data transmitted by that device. Priorities are represented by integers, ranging from 1 to 15, with a minimum priority of 1 and a maximum of 15. Data from higher-priority devices is transmitted first in case of network congestion to ensure communication quality.

[0060] Specifically, the cross-network communication backend server allocates a total session bandwidth to each session. All devices participating in a session use this total session bandwidth simultaneously. For example, if device A1 and device A2 both participate in a session, they will be allocated a total session bandwidth, allowing device A1 and device A2 to transmit data with other devices in the same session on network B.

[0061] Specifically, when transmitting data from various devices on network A to network B, a data transmission method for cross-network communication provided in this embodiment of the invention is executed.

[0062] like Figure 1 As shown, in step S1, the devices belonging to the same session are identified, the media stream priority of each device is obtained, and the total session bandwidth of the session is determined. For example, devices A1 and A2 participate in the same session with session ID XXX1; devices A3, A4, and A5 participate in the same session with session ID XXX2. Then, when transmitting data, the data of devices A1 and A2 to network B, and the data of devices A3, A4, and A5 to network B, need to be executed independently and without interference. That is, the data transmission of devices with different session IDs is independent and does not interfere with each other.

[0063] It is worth noting that when multiple devices in different sessions are configured to use the same transmission port, the multiple devices configured to use the same transmission port will share the same transmission port for data transmission.

[0064] Specifically, in step S1, the allocated bandwidth for each device represents the bandwidth resources that each device can use when transmitting data.

[0065] Preferably, in step S1, the allocated bandwidth for each device is calculated using the following formula:

[0066]

[0067] Among them, B i P represents the allocated bandwidth for the i-th device. i This indicates the media stream priority of the i-th device, and M represents the total number of devices in this session. B represents the sum of media stream priorities for all devices in this session. total This indicates the total bandwidth of the session in this session.

[0068] Specifically, such as Figure 1 As shown, in step S2, each device has a corresponding encoding rate in each transmission cycle. The encoding rate can be adjusted according to the network conditions. When the network is congested, the encoding rate of each device is reduced to reduce the amount of data that needs to be transmitted, thereby improving the smoothness of communication.

[0069] Specifically, in step S2, the data to be sent by each device is encoded by combining the media stream identification information of each device, and the media stream identification information of each device is incorporated into the data packet to be sent corresponding to each device. For example, if RTP (Real-time Transport Protocol) is used, the media stream identification information of each device is encoded into the extension header of the RTP data packet, that is, the media stream identification information of each device is filled into the extension header.

[0070] Preferably, the step of encoding the data to be sent by each device using the media stream identifier information of each device includes:

[0071] Determine the stream type, timestamp, and checksum of the data to be sent for each device; the media stream identification information for each device includes its session ID, device ID, and media stream priority.

[0072] The media stream identifier information of each device, as well as the stream type, timestamp, and checksum of each data packet to be sent, are compressed using a variable-length character encoding method and added to the extension header of each data packet to be sent.

[0073] Specifically, the session ID, device ID, and media stream priority of each device can be determined after connecting to the cross-network communication server, while the stream type, timestamp, and checksum of the data to be sent by each device need to be determined based on the data to be sent.

[0074] Specifically, stream type is used to distinguish the type of data to be sent, such as audio streams, video streams, data streams, and other data, which are encoded using different numbers.

[0075] Specifically, the timestamp refers to the time information when the data to be sent was transmitted. It can be represented by a 32-bit integer in milliseconds, supporting the high-precision clock requirements for long-term operation.

[0076] Specifically, the checksum represents the value generated by verifying the session ID, device ID, media stream priority, stream type, and timestamp of each device. It is used to verify the integrity and correctness of the data. An 8-bit CRC (Cyclic Redundancy Check) checksum can be used to detect data errors during transmission through an efficient verification algorithm, ensuring that the media stream identifier has not been tampered with or damaged, thereby improving the stability and reliability of communication.

[0077] Specifically, during encoding, a variable-length character encoding method is used to compress the media stream identification information of each device, as well as the stream type, timestamp, and checksum of each data to be sent. The compressed data is then added to the extended header of the data packet to be sent.

[0078] It is worth noting that in the existing technology, the extension header of RTP packets is empty. Media stream identification information is added to the extension header, and a variable-length character encoding method is used to minimize the increased transmission cost and avoid the additional transmission overhead brought by the extension header.

[0079] For example, variable-length character encoding optimizes the valid value range of a field, reducing the number of bytes that need to be transmitted. The highest bit of each byte is used as a flag: 0 indicates the current byte is the last byte, and 1 indicates there is more data following the current byte. The lower 7 bits are used to store the actual data. Taking a 32-bit session ID as an example, if the session ID is 0x00000001 (4 bytes), the data compression process is as follows: steps 1, 2, 3, 4, and 5.

[0080] 1. Raw data:

[0081] The hexadecimal representation of the session ID: 0x00000001 (4 bytes) converted to binary: 00000000 00000000 00000000 00000001

[0083] Its value is 1 in decimal.

[0084] 2. Divide into 7-digit segments:

[0085] The data is divided into 7 bits from the least significant bit to the most significant bit, resulting in the binary value: 0000001 (no further division is needed because the data is less than 128).

[0086] 3. Add a marker bit (high bit):

[0087] Flag rules:

[0088] If this is the last set of data, the flag is 0. If there is only one set of data, the flag is 0. Add a flag:

[0089] 0000001→00000001 (no follow-up, the flag bit is 0).

[0090] 4. Compressed binary data:

[0091] The compression result is: 00000001

[0092] 5. Compressed hexadecimal representation:

[0093] Binary: 00000001 converted to hexadecimal 0x01 (1 byte)

[0094] That is, the original representation requires 4 bytes (fixed-length encoding), while after compression using variable-length character encoding, it only requires 1 byte, achieving a compression ratio of 25%. The RTP protocol supports flexible expansion of the extension header field, making the embedding of multidimensional stream identifiers fully compatible with existing protocols. The generated multidimensional stream identifier is embedded in the extension header field of the RTP packet to realize the transmission of media stream identification information in the network.

[0095] It is worth noting that by encoding the session ID, device ID, and media stream priority of each device, as well as the stream type, timestamp, and checksum of the data to be sent by each device, into the data packets to be sent by each device, the uniqueness and classification management of media streams are supported. This simplifies the identification and scheduling of each device during cross-network communication. At the same time, the variable-length encoding method reduces the overhead of the extended header and reduces the complexity of port usage and network configuration. The built-in timestamp and checksum ensure the integrity and synchronization of data transmission.

[0096] Specifically, such as Figure 1 As shown, in step S3, each device is configured with a corresponding transmission port through the network isolation device. In each transmission cycle, the data packets to be sent generated by each device in this transmission cycle are transmitted out through the corresponding transmission port. For example, as... Figure 2 As shown, the data packets to be sent generated by device A1 in this transmission cycle are transmitted to network B through the configured transmission port.

[0097] It is worth noting that in existing technologies for cross-network communication scenarios, when manually configuring transmission ports for each device, each device occupies one transmission port. This results in an excessively large range of transmission ports that need to be opened, consuming too much port and bandwidth resources and crowding out other business systems using network isolation devices. This invention configures multiple devices onto the same transmission port using network isolation devices, achieving port configuration convergence and reducing the impact on other business systems.

[0098] Preferably, the step of transmitting the data packets to be sent corresponding to each device through the transmission port corresponding to each device configured in the network isolation device according to the allocated bandwidth of each device includes:

[0099] Tokens generated are placed into a token bucket according to the token generation rate. If the token bucket is full, excess tokens are discarded. The number of tokens in the token bucket during the current sending cycle is counted. Each device has one token bucket.

[0100] Determine whether the number of tokens in the token bucket during the current sending period is greater than or equal to the number of data packets to be sent; if so, transmit all the data packets to be sent through the transmission port corresponding to each device configured in the network isolation device, and at the same time, retrieve the corresponding number of tokens from the token bucket.

[0101] Preferably, if the number of tokens in the token bucket in the current sending cycle is less than the number of data packets to be sent, the data packets to be sent are discarded, and data transmission in the current sending cycle is paused;

[0102] At the same time, the coding rate of the corresponding device in the next transmission cycle is reduced.

[0103] Specifically, during cross-network communication, sudden traffic surges often occur. For example, when the content that a device needs to send changes drastically, it is usually accompanied by an increase in the encoding bitrate. The goal of the token bucket algorithm is to limit sudden changes in the transmission of data packets to be sent in each device, so that the data transmission of each device conforms to the corresponding allocated bandwidth and avoids network congestion.

[0104] Each device corresponds to one media stream, and each media stream corresponds to one token bucket. The token generation rate per second is determined by the allocated bandwidth. Each device needs to consume tokens when sending data packets. If there are not enough tokens, the data packets will be dropped.

[0105] Specifically, define the following variables:

[0106] C: Maximum capacity of the token bucket, in the number of tokens.

[0107] R: Token generation rate, measured in tokens per sending cycle.

[0108] T: Time interval, in units of transmission cycles.

[0109] b: Size of the data group, in bytes.

[0110] T s The maximum time that data can be continuously sent during a traffic surge, measured in sending cycles.

[0111] N(t): The number of tokens in the bucket at time t.

[0112] D(t): Data arrival rate at time t, in bytes per transmission cycle.

[0113] r(t): Data transmission rate at time t, in bytes per transmission cycle.

[0114] Assuming the media stream starts sending at time t0, the number of tokens at time t is:

[0115] N(t)=min(C,N(t0)+R·(t-t0));

[0116] If the token bucket is full (the number of tokens reaches C), newly generated tokens will be discarded. Each time the device sends a data packet of number b, it needs to consume the same number of tokens. If the number of tokens in the bucket satisfies N(t) ≥ b, then the data packet can be sent, and the number of tokens consumed is b.

[0117] When there is a burst of traffic B, the burst traffic is limited by the bucket capacity C and the data arrival rate D(t):

[0118]

[0119] Where T s It is the maximum duration that burst traffic can last. When D(t) > R, the system uses the tokens accumulated in the bucket to support short burst traffic.

[0120] Understandably, the size of the token bucket determines the time it can handle bursts of traffic; the larger the token bucket capacity, the longer the time it can handle.

[0121] The data transmission rate r(t) depends on the current data arrival rate D(t) and the number of tokens N(t) in the bucket:

[0122]

[0123] Each time a data packet is sent, the number of tokens in the token bucket decreases:

[0124] N(t after )=N(t before )-b

[0125] Meanwhile, tokens will continue to be generated in the next sending cycle until the token bucket capacity C is reached.

[0126] It is worth noting that by combining the token bucket algorithm to limit the transmission rate of each device, network congestion caused by sudden traffic surges can be prevented, adapting to real-time network changes and prioritizing the data transmission of devices with high media stream priority.

[0127] Specifically, such as Figure 1 As shown, in step S4, it is determined whether the session has ended in each sending cycle. For example, in a session ID, if devices A1 and A2 participating in the session in network A are both offline and no longer participate in the session, the session ends and execution is terminated.

[0128] If the session continues, steps S2, S3 and S4 are repeated, and the data packets to be sent are continuously sent out in each sending cycle.

[0129] Preferably, before determining whether the session has ended based on the total number of devices in the session, the method further includes:

[0130] Determine whether the devices in the current sending cycle and the devices in the next sending cycle have changed in the session;

[0131] If yes, then the allocated bandwidth for each device is updated based on the media stream priority of each device and the total bandwidth of the session in the next transmission cycle of the session.

[0132] Specifically, the device IDs of devices in the current sending cycle and devices in the next sending cycle are compared. If either is different, it is determined that the device has changed.

[0133] For example, if a session includes device A1 and device A2 in the current sending cycle, and device A2 exits the session in the next sending cycle, then the session will only include device A1 in the next sending cycle, and the devices will change. If a device A3 is added in the next sending cycle, then the session will include device A1, device A2, and device A3 in the next sending cycle, and the devices will change. If device A2 exits the session in the next sending cycle and device A3 is added, then the session will include device A1 and device A3 in the next sending cycle, and the devices will change.

[0134] When a device changes, the allocated bandwidth of each device is updated according to the media stream priority of each device in the next transmission cycle of the session and the total bandwidth of the session, that is, the allocated bandwidth of each device in the session is re-determined.

[0135] It is worth noting that when any device in a session changes, bandwidth resources can be automatically reallocated, ensuring the flexibility and stability of communication.

[0136] Preferably, if the devices in the session have not changed, the actual transmission bandwidth of each device in the current transmission cycle is collected to determine the minimum bandwidth required by each device.

[0137] Based on the media stream priority of each device, the total session bandwidth, the actual transmission bandwidth of each device, and the minimum bandwidth requirement of each device, the allocated bandwidth of each device in the next transmission cycle is updated using a linear programming method, thereby improving the utilization rate of the total session bandwidth.

[0138] For example, a session may include device A1 and device A2 in the current sending cycle, and the session may also include device A1 and device A2 in the next sending cycle, at which point the devices remain unchanged.

[0139] It is worth noting that if the media stream priority of each device participating in the session changes, this is also considered a change in the device. In this case, the allocated bandwidth of each device needs to be updated according to the media stream priority of each device in the next transmission cycle of the session and the total bandwidth of the session.

[0140] Specifically, if the devices in the session remain unchanged, the actual transmission bandwidth of each device in the current transmission cycle is collected, and the minimum bandwidth requirement for each device is determined. It can be understood that the minimum bandwidth requirement for each device is used to ensure that each device can meet its basic communication needs, and the minimum bandwidth requirement for each device can be customized and adjusted.

[0141] Preferably, the step of updating the allocated bandwidth for each device in the next transmission cycle using a linear programming method based on the media stream priority of each device, the total session bandwidth, the actual transmission bandwidth of each device, and the minimum bandwidth requirement of each device includes:

[0142] The constraint equations are determined based on the media stream priority of each device, the total session bandwidth, the actual transmission bandwidth of each device, and the minimum required bandwidth of each device.

[0143] The objective function equation is to maximize the allocated bandwidth of all devices.

[0144] Based on the constraint equations, the objective function equation is calculated using linear programming to obtain the allocated bandwidth for each device in the next transmission cycle.

[0145] Specifically, the constraint equations determined based on the media stream priority of each device, the total session bandwidth, the actual transmission bandwidth of each device, and the minimum bandwidth requirement of each device are as follows:

[0146]

[0147] in, d represents the allocated bandwidth for the i-th device in the next transmission cycle. i w represents the minimum bandwidth requirement for the i-th device. i This represents the bandwidth allocation weight for the i-th device. Δ represents the actual transmission bandwidth of the i-th device in the current transmission cycle. max This indicates the bandwidth adjustment threshold.

[0148] The objective function equation for maximizing the allocated bandwidth of all devices is:

[0149]

[0150] Here, maximize means taking the maximum value.

[0151] Specifically, the allocated bandwidth for each device in the next transmission cycle of the session is obtained by solving the above objective function equation.

[0152] It is worth noting that bandwidth resources are limited when conducting cross-network communication. During data transmission, the bandwidth allocation of each device is constantly adjusted to maximize the utilization of bandwidth resources and reduce costs.

[0153] Compared with existing technologies, the data transmission method for cross-network communication provided by this invention configures multiple devices in the same network environment onto the same transmission port on a network isolation device, reducing the use of transmission ports, improving the configuration efficiency of transmission ports, and enhancing the efficiency of cross-network communication. Simultaneously, it determines the media stream priority of each device, uses this priority to determine the allocated bandwidth and encoding of the data to be transmitted for each device, ensuring smooth communication even when network bandwidth is limited. Furthermore, during data transmission, a token bucket algorithm ensures that burst traffic transmitted by each device can be transmitted smoothly, minimizing data loss and improving the smoothness of cross-network communication. Finally, during data transmission, based on the media stream priority of each device, the total session bandwidth, the actual transmission bandwidth of each device, and the minimum bandwidth requirement of each device, a linear programming method is used to determine the allocated bandwidth of each device in the next transmission cycle, improving the utilization rate of the total session bandwidth.

[0154] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0155] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A data transmission method for cross-network communication, characterized in that, The data transmission method includes: Step S1: Determine the allocated bandwidth for each device based on the media stream priority of each device in the same session and the total bandwidth of the session; Step S2: Based on the encoding bitrate of each device, the data to be sent by each device is encoded using the media stream identification information of each device to obtain the data packet to be sent for each device; Step S3: Transmit the data packets to be sent for each device through the transmission port configured for each device in the network isolation device according to the allocated bandwidth of each device; wherein, the network isolation device configures the same transmission port for multiple devices; Step S4: Within each transmission cycle, determine whether the session has ended based on the number of all devices in the session; if yes, terminate the execution; if no, repeat steps S2, S3 and S4.

2. The data transmission method according to claim 1, characterized in that, In step S1, the allocated bandwidth for each device is calculated using the following formula: Among them, B i P represents the allocated bandwidth for the i-th device. i This indicates the media stream priority of the i-th device, and M represents the total number of devices in this session. B represents the sum of media stream priorities for all devices in this session. total This indicates the total bandwidth of the session in this session.

3. The data transmission method according to claim 1, characterized in that, The process of encoding the data to be sent by each device using the media stream identifier information of each device includes: Determine the stream type, timestamp, and checksum of the data to be sent for each device; the media stream identification information for each device includes its session ID, device ID, and media stream priority. The media stream identifier information of each device, as well as the stream type, timestamp, and checksum of each data packet to be sent, are compressed using a variable-length character encoding method and added to the extension header of each data packet to be sent.

4. The data transmission method according to claim 3, characterized in that, The data stream type includes one or more of the following: Audio stream; Video stream; Data flow.

5. The data transmission method according to claim 1, characterized in that, The step of transmitting the data packets to be sent for each device according to the allocated bandwidth of each device through the transmission port corresponding to each device configured in the network isolation device includes: Tokens generated are placed into a token bucket according to the token generation rate. If the token bucket is full, excess tokens are discarded. The number of tokens in the token bucket during the current sending cycle is counted. Each device has one token bucket. Determine whether the number of tokens in the token bucket during the current sending period is greater than or equal to the number of data packets to be sent; if so, transmit all the data packets to be sent through the transmission port corresponding to each device configured in the network isolation device, and at the same time, retrieve the corresponding number of tokens from the token bucket.

6. The data transmission method according to claim 5, characterized in that, If the number of tokens in the token bucket in the current sending cycle is less than the number of data packets to be sent, the data packets to be sent will be discarded, and data transmission in the current sending cycle will be paused. At the same time, the coding rate of the corresponding device in the next transmission cycle is reduced.

7. The data transmission method according to claim 1, characterized in that, Before determining whether the session has ended based on the total number of devices in the session, the method further includes: Determine whether the devices in the current sending cycle and the devices in the next sending cycle have changed in the session; If yes, then the allocated bandwidth for each device is updated based on the media stream priority of each device and the total bandwidth of the session in the next transmission cycle of the session.

8. The data transmission method according to claim 7, characterized in that, If the devices in the session have not changed, the actual transmission bandwidth of each device in the current transmission cycle is collected to determine the minimum bandwidth required by each device. Based on the media stream priority of each device, the total session bandwidth, the actual transmission bandwidth of each device, and the minimum bandwidth requirement of each device, the allocated bandwidth of each device in the next transmission cycle is updated using a linear programming method, thereby improving the utilization rate of the total session bandwidth.

9. The data transmission method according to claim 8, characterized in that, The method of updating the allocated bandwidth for each device in the next transmission cycle using linear programming, based on the media stream priority of each device, the total session bandwidth, the actual transmission bandwidth of each device, and the minimum bandwidth requirement of each device, includes: The constraint equations are determined based on the media stream priority of each device, the total session bandwidth, the actual transmission bandwidth of each device, and the minimum required bandwidth of each device. The objective function equation is to maximize the allocated bandwidth of all devices. Based on the constraint equations, the objective function equation is calculated using linear programming to obtain the allocated bandwidth for each device in the next transmission cycle.

10. The data transmission method according to claim 9, characterized in that, The constraint equation is as follows: in, d represents the allocated bandwidth for the i-th device in the next transmission cycle. i w represents the minimum bandwidth requirement for the i-th device. i This represents the bandwidth allocation weight for the i-th device. Δ represents the actual transmission bandwidth of the i-th device in the current transmission cycle. max Indicates the bandwidth adjustment threshold; The objective function equation is: Here, maximize means taking the maximum value.