A data transmission method, apparatus, device, and storage medium
By sensing service information and transmission quality information in real time at the transport layer and dynamically matching encoding and decoding algorithms, the problem that transport layer coding schemes cannot adapt to network changes and service diversification is solved, thereby improving the reliability and efficiency of wireless transmission.
Patent Information
- Application Number
- CN202611286849.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-11-03
AI Technical Summary
Transport layer forward error correction coding schemes lack environmental awareness and service adaptability, and cannot meet the dynamically changing network transmission quality and diverse upper-layer service requirements.
The application layer sends business information and transmission quality information to the transport layer, uses a preset mapping relationship to determine the target encoding and decoding algorithm, and negotiates encoding and decoding parameters with the data receiving end to dynamically match the encoding and decoding algorithms.
It achieves dynamic adaptation of forward error correction coding algorithm to network environment and business requirements, improves the reliability and efficiency of wireless transmission, and reduces retransmission delay and jitter.
Smart Images

Figure CN123034922A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication technology, and in particular to a data transmission method, apparatus, device, and storage medium. Background Technology
[0002] In modern network communication systems, especially in high-reliability, low-latency service scenarios for 5G / 6G, the reliability assurance mechanism of transport layer protocols faces core challenges. Integrating Forward Error Correction (FEC) coding technology into the transport layer allows FEC to proactively add redundant data packets at the sending end, enabling the receiving end to directly recover data loss within a certain threshold without relying on feedback retransmissions, thereby improving the smoothness of the user experience.
[0003] However, current FEC coding schemes at the transport layer typically employ static and fixed FEC coding strategies. Their coding decision-making mechanisms are preset, lacking environmental awareness and service adaptability, and thus failing to meet the dynamically changing network transmission quality and diverse upper-layer service requirements. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a data transmission method, apparatus, device, and storage medium to solve the problem that the forward error correction coding scheme at the transport layer is disconnected from dynamically changing network transmission quality and diverse upper-layer service requirements, making it impossible to select a suitable forward error correction encoding / decoding algorithm based on real-time service needs and network transmission quality. The specific solution is as follows: Firstly, this application provides a data transmission method applied at a data sending end, comprising: The target data is sent from the application layer to the transport layer of the data sending end via a preset interface; the target data includes service information and transmission quality information. The target data is received using a forward error correction encoder in the transport layer, and a target encoding / decoding algorithm corresponding to the service information and the transmission quality information is determined based on a preset mapping relationship; the preset mapping relationship includes the correspondence between the service information, the transmission quality information and each forward error correction encoding / decoding algorithm; The target encoding / decoding algorithm and the data receiving end negotiate encoding / decoding parameters; the encoding / decoding parameters include encoding parameters for determining the encoding algorithm of the data sending end and decoding parameters for determining the decoding algorithm of the data receiving end. When the data sending end and the data receiving end successfully negotiate, the data to be transmitted is encoded according to the encoding algorithm, and the encoded data to be transmitted is transmitted to the data receiving end; the data to be transmitted is the service data corresponding to the target data.
[0005] Optionally, the transmission quality information may be one or more of network layer quality information, data link layer quality information, and physical layer quality information; The network layer quality information is determined based on one or more of end-to-end packet loss rate, transmission delay, and delay jitter; the data link layer quality information is determined based on end-to-end frame error rate and / or data retransmission rate; and the physical layer quality information is determined based on channel bit error rate and / or reference signal received power.
[0006] Optionally, the preset mapping relationship includes multiple sets of correspondence relationships; Each of the aforementioned correspondences includes one type of service information, one type of transmission quality information, and one type of forward error correction encoding / decoding algorithm. Furthermore, multiple combinations of different types of service information and different types of transmission quality information correspond to one type of forward error correction encoding / decoding algorithm.
[0007] Optionally, the service information includes service type and / or data priority, wherein the service type is used to characterize the service scenario corresponding to the data to be transmitted, and the data priority is used to characterize the priority level of the data to be transmitted; The step of determining the target encoding / decoding algorithm corresponding to the service information and the transmission quality information based on a preset mapping relationship includes: Based on the preset mapping relationship, the target encoding and decoding algorithm corresponding to the transmission quality information, the service type, and / or the data priority is determined.
[0008] Optionally, the encoding and decoding parameters may further include a negotiation request flag and a negotiation response flag; The negotiation request flag is used to determine whether the data sender requests to negotiate the forward error correction encoding and decoding algorithm, and the negotiation response flag is used to characterize the negotiation result of the forward error correction encoding and decoding algorithm.
[0009] Optionally, the negotiation of encoding / decoding parameters between the target encoding / decoding algorithm and the data receiving end includes: Set the negotiation request flag to a first value, set the negotiation response flag to a second value, and send the codec parameters carrying the negotiation request flag and the negotiation response flag to the data receiving end; Receive the encoding / decoding parameters returned by the data receiving end; When the negotiation request flag in the encoding / decoding parameters is set to the second value and the negotiation response flag is set to the first value, it is determined that the data sender and the data receiver have successfully negotiated.
[0010] Optionally, after negotiating the encoding and decoding parameters between the target encoding / decoding algorithm and the data receiving end, the method further includes: When the data sending end and the data receiving end fail to negotiate, the data to be transmitted is encoded according to a preset default encoding algorithm, and the encoded data to be transmitted is transmitted to the data receiving end.
[0011] Secondly, this application provides a data transmission apparatus, applied at a data transmitting end, comprising: The data sending module is used to send target data to the transport layer of the data sending end through the application layer using a preset interface; the target data includes service information and transmission quality information. An algorithm determination module is used to receive the target data using the forward error correction encoder in the transport layer, and determine the target encoding and decoding algorithm corresponding to the service information and the transmission quality information based on a preset mapping relationship; the preset mapping relationship includes the correspondence between the service information, the transmission quality information and each forward error correction encoding and decoding algorithm; An algorithm negotiation module is used to negotiate encoding and decoding parameters between the target encoding / decoding algorithm and the data receiving end; the encoding and decoding parameters include encoding parameters for determining the encoding algorithm of the data sending end and decoding parameters for determining the decoding algorithm of the data receiving end. The data transmission module is used to encode the data to be transmitted according to the encoding algorithm when the data sending end and the data receiving end successfully negotiate, and then transmit the encoded data to be transmitted to the data receiving end; the data to be transmitted is business data corresponding to the target data.
[0012] Thirdly, this application provides an electronic device, which includes a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the aforementioned data transmission method.
[0013] Fourthly, this application provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the aforementioned data transmission method.
[0014] Based on the above technical solution, in this application, the application layer sends target data to the transport layer of the data sender through a preset interface. Since the target data includes service information and transmission quality information, the forward error correction encoder in the transport layer can obtain service information representing the upper-layer service requirements and transmission quality information representing the current transmission environment quality in real time. Furthermore, the forward error correction encoder determines the target encoding and decoding algorithm corresponding to the service information and transmission quality information based on a preset mapping relationship. This preset mapping relationship includes the correspondence between service information, transmission quality information, and each forward error correction encoding and decoding algorithm. Therefore, the determined target encoding and decoding algorithm is an algorithm that matches the current service requirements and current transmission quality, rather than a static and fixed encoding strategy. This avoids the problems of redundancy and waste when the transmission environment is good, and insufficient protection when the transmission environment is poor, significantly improving the reliability of wireless transmission and realizing dynamic adaptation of the forward error correction encoding and decoding algorithm to the network environment and service requirements, thereby improving transmission efficiency. Furthermore, the data sending end can negotiate the encoding and decoding parameters with the data receiving end based on the target encoding and decoding algorithm. Through negotiation, the encoding algorithm actually used by the data sending end and the decoding algorithm actually used by the data receiving end can be matched to each other, avoiding decoding failure caused by inconsistency between the two ends, and ensuring the consistency of the encoding and decoding algorithms at both ends and the continuity of data transmission.
[0015] Accordingly, the data transmission apparatus, electronic device, and computer-readable storage medium provided in this application also possess the aforementioned technical effects by executing or implementing the above-described data transmission method, and will not be elaborated further here. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0017] Figure 1 A flowchart of a data transmission method provided in this application; Figure 2 A flowchart of forward error correction data interaction is provided for this application; Figure 3 A schematic diagram of a forward error correction framework for the transport layer provided in this application; Figure 4 A schematic diagram of codec parameter negotiation provided for this application; Figure 5 A schematic diagram of a data transmission device structure is provided in this application; Figure 6This application provides a structural diagram of an electronic device. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0020] Current forward error correction (FEC) coding schemes at the transport layer typically employ static, fixed coding strategies. Their coding decision mechanisms are pre-defined, lacking environmental awareness and service adaptability, and thus failing to meet the dynamically changing network transmission quality and diverse upper-layer service requirements. This application can dynamically determine the appropriate forward error correction coding and decoding algorithm based on real-time changes in network transmission quality and diverse service requirements, thereby improving the reliability of wireless transmission. At the same time, it reduces a large number of retransmissions caused by channel mutations, and lowers end-to-end latency and jitter.
[0021] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] See Figure 1 As shown, this embodiment of the invention discloses a data transmission method applied to a data sending end, comprising: Step S11: Send the target data to the transport layer of the data sending end through the application layer using a preset interface; the target data includes service information and transmission quality information.
[0023] It is understood that in this embodiment, a preset interface for transmitting control data, i.e., target data, is pre-set between the application layer and the transport layer. This preset interface can be a custom application programming interface (API) between the application layer and the transport layer. When the application layer needs to send business data, it determines the business information based on the business scenario to which the data to be transmitted belongs, and determines the transmission quality information based on the current network transmission environment. Then, it sends the target data carrying the business information and transmission quality information to the transport layer at the data sending end through the preset interface, so that the transport layer can be aware of the upper-layer business requirements and the current network transmission quality.
[0024] In one specific implementation, the target data occupies one byte, with four bits for service information and four bits for transmission quality information. For example, the service information value ranges from zero to fifteen, with different values corresponding to different service types or data priorities. The value of the service information can be set according to different service scenarios. Similarly, the transmission quality information value ranges from zero to fifteen, and its value is determined based on the network environment; a higher value indicates better network transmission quality. Thus, service information and transmission quality information can be reported using only one byte of target data, reducing the resources required for service data transmission.
[0025] Specifically, in one implementation, the service information includes service type and / or data priority. The service type characterizes the service scenario corresponding to the data to be transmitted, such as signaling service, real-time control service, video streaming service, etc.; the data priority characterizes the priority level of the data to be transmitted, for example, the data to be transmitted can be divided into different priorities according to its importance and real-time requirements. The application layer may report only the service type, only the data priority, or both simultaneously; this embodiment does not limit this.
[0026] In one specific implementation, transmission quality information is used to measure the quality of the transmission environment and can be one or more of network layer quality information, data link layer quality information, and physical layer quality information. Specifically, network layer quality information is determined based on one or more of end-to-end packet loss rate, transmission delay, and delay jitter. For example, the value range of end-to-end packet loss rate, transmission delay, or delay jitter can be pre-divided into multiple value intervals, and the values of the actually measured indicators corresponding to these intervals are determined as the values of the network layer quality information. Data link layer quality information is determined based on end-to-end frame error rate and / or data retransmission rate. Physical layer quality information is determined based on channel bit error rate and / or reference signal received power. It is understood that the lower the end-to-end packet loss rate, the smaller the transmission delay, the smaller the delay jitter, the lower the end-to-end frame error rate, the lower the data retransmission rate, the lower the channel bit error rate, and the higher the reference signal received power, the larger the corresponding value of the transmission quality information, indicating better network transmission quality.
[0027] Step S12: Receive the target data using the forward error correction encoder in the transport layer, and determine the target encoding / decoding algorithm corresponding to the service information and the transmission quality information based on a preset mapping relationship; the preset mapping relationship includes the correspondence between the service information, the transmission quality information and each forward error correction encoding / decoding algorithm.
[0028] In this embodiment, a forward error correction encoder in the transport layer can be used to receive target data and determine the target encoding / decoding algorithm corresponding to service information and transmission quality information based on a preset mapping relationship. The preset mapping relationship includes the correspondence between service information, transmission quality information, and each forward error correction encoding / decoding algorithm. This preset mapping relationship can be pre-configured in the transport layer of the data sender, for example, stored in the form of an encoding capability list. The preset mapping relationship includes multiple sets of correspondences, each set including one type of service information, one type of transmission quality information, and one forward error correction encoding / decoding algorithm. That is, each set of correspondences records the forward error correction encoding / decoding algorithm to be used under a certain combination of service information value and transmission quality information value.
[0029] It should be noted that in the preset mapping relationship, different combinations of service information and different transmission quality information correspond to a single forward error correction (FEC) encoding / decoding algorithm. That is, the relationship between the combination of service information and transmission quality information and the FEC encoding / decoding algorithm is not one-to-one, but rather a many-to-one correspondence. For example, the combination of video streaming services with good transmission quality, and the combination of voice services with medium transmission quality, can correspond to the same lightweight FEC encoding / decoding algorithm. In this way, the many-to-one correspondence can cover more combinations of services and transmission quality while reducing the computational overhead of matching.
[0030] In one implementation, after receiving target data, the forward error correction encoder extracts the values of service information and transmission quality information from the target data. Then, it searches for a forward error correction encoding / decoding algorithm that corresponds to the values of the service information and transmission quality information in a preset mapping relationship, and determines the found forward error correction encoding / decoding algorithm as the target encoding / decoding algorithm. For example, for services with high reliability requirements such as real-time control, when transmission quality is poor, forward error correction encoding / decoding algorithms with strong error correction capabilities and high redundancy, such as Reed-Solomon codes, can be selected. For services with low latency requirements such as video streaming, when transmission quality is good, lightweight forward error correction encoding / decoding algorithms, such as XOR coding, can be selected. In this way, the target encoding / decoding algorithm can be determined by combining the current service requirements and the current network transmission quality, achieving context-aware forward error correction algorithm selection.
[0031] For example, the preset mapping relationships may include the following correspondences: The first set of correspondences corresponds to the Reed-Solomon code forward error correction encoding / decoding algorithm when the service information is signaling service and the transmission quality information is of a poor level; the second set of correspondences corresponds to the Reed-Solomon code when the service information is real-time control service and the transmission quality information is of a medium level; the third set of correspondences corresponds to the XOR code forward error correction encoding / decoding algorithm when the service information is video streaming service and the transmission quality information is of a good level; and the fourth set of correspondences corresponds to the XOR code when the service information is ordinary file transfer service and the transmission quality information is of a good level. It should also be noted that when storing the preset mapping relationships, a lookup table can be used, with the combination of the service information value and the transmission quality information value as the key, and the identifier of the forward error correction encoding / decoding algorithm as the value. The forward error correction encoder can determine the target encoding / decoding algorithm by looking up the table once.
[0032] Step S13: Negotiate encoding and decoding parameters between the target encoding / decoding algorithm and the data receiving end; the encoding and decoding parameters include encoding parameters for determining the encoding algorithm of the data sending end and decoding parameters for determining the decoding algorithm of the data receiving end.
[0033] In this embodiment, the encoding and decoding parameters include not only encoding parameters and decoding parameters, but also a negotiation request flag and a negotiation response flag. In one specific implementation, the encoding and decoding parameters occupy one byte, including a one-bit negotiation request flag, a one-bit negotiation response flag, three bits of encoding parameters, and three bits of decoding parameters. The encoding parameters determine the encoding algorithm of the data sender, and the decoding parameters determine the decoding algorithm of the data receiver. The encoding and decoding parameters respectively determine the encoding type and decoding type corresponding to the target encoding and decoding algorithm. The negotiation request flag determines whether the data sender requests negotiation of the forward error correction encoding and decoding algorithm, and the negotiation response flag indicates the negotiation result of the forward error correction encoding and decoding algorithm.
[0034] See Figure 2 As shown, during the codec parameter negotiation process, when the data sender requests negotiation, it sets the negotiation request flag to a first value and the negotiation response flag to a second value. Then, it sends the codec parameters, carrying the negotiation request flag, negotiation response flag, encoding parameters, and decoding parameters, to the data receiver. For example, the first value is 1 and the second value is 0, meaning the data sender sets the negotiation request flag to 1 and the negotiation response flag to 0, indicating that the codec parameters sent are for requesting negotiation. After receiving the codec parameters, the data receiver determines whether it supports the corresponding forward error correction codec algorithm based on the encoding and decoding parameters. If it does, the data receiver sets the negotiation request flag in the codec parameters to the second value, sets the negotiation response flag to the first value, and returns the processed codec parameters to the data sender. It can also send an acknowledgment (ACK) response to the data sender. If it does not support the algorithm, it can send a negative acknowledgment (NACK) response to the data sender. Accordingly, the data sending end receives the encoding and decoding parameters returned by the data receiving end. If the negotiation request flag in the encoding and decoding parameters is set to the second value and the negotiation response flag is set to the first value, it is determined that the data sending end and the data receiving end have successfully negotiated. If a negative response is received from the data receiving end, it is determined that the negotiation has failed. Through this negotiation process, the data sending end and the data receiving end can determine the encoding and decoding algorithms used, avoiding the problem of the receiving end being unable to decode due to algorithm mismatch.
[0035] Step S14: When the data sending end and the data receiving end successfully negotiate, the data to be transmitted is encoded according to the encoding algorithm, and the encoded data to be transmitted is transmitted to the data receiving end; the data to be transmitted is the service data corresponding to the target data.
[0036] In this embodiment, when the data sender and the data receiver successfully negotiate, the data sender performs forward error correction encoding on the data to be transmitted according to the encoding algorithm determined by negotiation, generates encoded data to be transmitted containing redundant data packets, and transmits the encoded data to be transmitted to the data receiver. Correspondingly, the data receiver decodes the received data according to the decoding algorithm determined by negotiation, thereby recovering data lost within a certain threshold without relying on feedback retransmission, thus reducing the latency of data transmission.
[0037] Accordingly, when the data sender and receiver fail to negotiate, the data sender encodes the data to be transmitted according to a preset default encoding algorithm and transmits the encoded data to the data receiver to ensure that data transmission is not interrupted due to negotiation failure. The default encoding algorithm can be a lightweight forward error correction encoding algorithm that is supported by default by both the data sender and receiver.
[0038] Based on the above technical solution, see Figure 3 The transport layer forward error correction framework shown in the diagram involves the application layer sending target data, including service information and transmission quality information, to the transport layer through a preset interface. The forward error correction encoder in the transport layer receives the target data, completes the matching of encoding and decoding algorithms based on a preset mapping relationship, and then negotiates the encoding and decoding parameters with the data receiver. After successful negotiation, the service data sent by the application layer is encoded and sent according to the negotiated encoding algorithm. When network transmission quality changes or the service type changes, the application layer can send updated target data again through the preset interface. The transport layer then re-executes algorithm matching and parameter negotiation, thereby enabling the forward error correction encoding and decoding algorithm to be dynamically adjusted according to the network environment and service requirements.
[0039] Furthermore, it should be noted that when the application layer transmits service information and transmission quality information to the transport layer via the API in this embodiment, in addition to using a custom interface, it can also reuse the POSIX (Portable Operating System Interface) network programming standard Socket API interface. For example, the SO_TRAFFIC_TYPE field can be added to option_name to indicate the service type; the SO_NETWORK_QUALITY field can be added to indicate the network transmission quality; and the SO_PRIORITY field can be reused for data priority. In one specific implementation, the following fields can be defined in the `option_name` field of the Socket options: 1. `SO_TRAFFIC_TYPE` field, used to indicate the service type, with a value range of 0 to 15. Different values correspond to different service scenarios, such as signaling services, real-time control services, and video streaming services; 2. `SO_NETWORK_QUALITY` field, used to indicate network transmission quality, with a value range of 0 to 15. A higher value indicates better network transmission quality. The `SO_NETWORK_QUALITY` field can represent one or more of the following: network layer quality information, data link layer quality information, and physical layer quality information; 3. `SO_PRIORITY` field, used to sort network queues based on the value of the `SO_PRIORITY` field. Higher-priority data packets can be processed first. The application layer can also set the corresponding priority based on the importance and real-time requirements of the data to be transmitted. Furthermore, after the application layer configures the above Socket options, the transport layer can read the configured option values in the Socket options to obtain service information and transmission quality information. Furthermore, after receiving the service information and transmission quality information, the forward error correction encoder in the transport layer can determine the target encoding / decoding algorithm corresponding to the service information and transmission quality information based on a preset mapping relationship, and perform encoding / decoding parameter negotiation and data transmission. Thus, this embodiment, by reusing the POSIX standard Socket API, can achieve the transmission of service information and transmission quality information between the application layer and the transport layer without defining additional custom interfaces, exhibiting good compatibility.
[0040] Thus, this embodiment can dynamically select the FEC encoding and decoding scheme based on real-time changes in network transmission quality (such as terminal location, speed, and obstruction) and service type (such as different reliability requirements). This avoids the problems of redundancy waste in good transmission environments and insufficient protection in poor transmission environments caused by fixed FEC schemes, significantly improving the reliability and throughput of wireless transmission and increasing transmission efficiency. Furthermore, it can prioritize data packets, selecting highly redundant FEC with strong error correction capabilities for high-reliability services (such as signaling and real-time control), and lightweight FEC for low-latency or error-tolerant services (such as video streaming). This differentiated FEC selection strategy achieves a balance between transmission reliability and resource consumption under limited channel resources, meeting the Quality of Service (QoS) requirements of diverse services. This embodiment can also reduce a large number of retransmissions caused by channel mutations by sensing the environment in real time and adjusting the FEC scheme in advance, thereby reducing end-to-end latency and jitter, enhancing robustness, and reducing retransmission latency, which is particularly suitable for complex wireless scenarios with high-speed movement and frequent obstruction.
[0041] The above data transmission method will be further explained below with reference to specific embodiments.
[0042] In one specific embodiment, the application layer indicates the service type and / or data priority, as well as network layer quality information. The application layer can then acquire one or more metrics from the network layer, including end-to-end packet loss rate, transmission latency, and latency jitter. Based on these metrics, it determines the value of the network layer quality information, ranging from zero to fifteen, with higher values indicating better network layer transmission quality. The application layer writes the service information value and the network layer quality information value into target data occupying one byte, where the service information occupies four bits and the network layer quality information occupies four bits. This target data is then sent to the transport layer via a custom application programming interface (API). The forward error correction encoder in the transport layer receives the target data, determines the target encoding / decoding algorithm corresponding to the combination of service information and network layer quality information based on a preset mapping relationship, and then negotiates encoding / decoding parameters with the data receiver according to the negotiation process described in the above embodiment. For example, based on the service type or packet priority (i.e., data priority), a suitable FEC encoding / decoding algorithm is matched from the encoding capability list with the network layer quality indicator (i.e., network layer quality information). The encoding capability list includes the correspondence between service type or packet priority, network layer quality, and FEC encoding / decoding, such as: {{service type / packet priority A1, network layer transmission quality B1: FEC encoding / decoding algorithm C1}, ..., {service type / packet priority An, network layer transmission quality Bn: FEC encoding / decoding algorithm Cn}}. If the negotiation is successful, the data receiver replies with an acknowledgment, and the data sender encodes and sends the data to be transmitted according to the negotiated encoding algorithm; if the negotiation fails, the data receiver replies with a denial, and the data sender encodes and sends the data to be transmitted according to the default encoding algorithm.
[0043] In one specific embodiment, the application layer indicates the service type and / or data priority, as well as data link layer quality information. In this embodiment, the application layer obtains the end-to-end frame error rate and / or data retransmission rate of the data link layer, determines the value of the data link layer quality information based on the obtained indicators, and the value ranges from zero to fifteen. The larger the value, the better the transmission quality of the data link layer. The application layer then writes the service information value and the data link layer quality information value into the target data and sends it to the transport layer. The transport layer FEC encoder then receives the service type or data priority, along with data link layer quality information (i.e., data link layer transmission quality indication), and matches a suitable FEC encoding / decoding algorithm from the encoding capability list. The encoding capability list includes the correspondence between service type or data priority, data link layer transmission quality, and FEC encoding / decoding, such as: {{service type / data priority A1, data link layer transmission quality B1: FEC encoding / decoding algorithm C1}, ..., {service type / data priority An, data link layer transmission quality Bn: FEC encoding / decoding algorithm Cn}}. However, different combinations of service types / data priorities and data link layer transmission qualities do not have a one-to-one mapping with the FEC encoding / decoding algorithm; that is, different combinations of service types / data priorities and data link layer transmission qualities can correspond to the same encoding / decoding algorithm. Furthermore, in the encoding / decoding parameters, the negotiation parameters occupy 1 byte, including a negotiation request flag (1 bit), a negotiation response flag (1 bit), an encoding type (3 bits), and a decoding type (3 bits). See also... Figure 4 As shown, when the sending end (data sender) requests to negotiate encoding / decoding parameters, it sets the negotiation request flag to 1 and the negotiation response flag to 0. When the receiving end (data receiver) responds to the negotiation request, it sets the negotiation request flag to 0 and the negotiation response flag to 1. If the data sender and receiver successfully negotiate, they reply with ACK and perform data transmission and reception according to the negotiated encoding / decoding algorithm. Otherwise, they reply with NACK and perform data transmission and reception according to the default encoding / decoding algorithm.
[0044] In one specific embodiment, the application layer indicates the service type and / or data priority, as well as physical layer quality information. In this embodiment, the application layer obtains the channel bit error rate and / or reference signal received power of the physical layer, determines the value of the physical layer quality information based on the obtained indicators, and the value ranges from zero to fifteen. A higher value indicates better physical layer transmission quality. The application layer then writes the service information value and the physical layer quality information value into the target data and sends it to the transport layer. Subsequently, the transport layer FEC encoder receives the service type or data priority, along with the physical layer quality information (i.e., the physical layer transmission quality indicator), and matches a suitable FEC encoding / decoding algorithm from the encoding capability list. The encoding capability list includes the correspondence between service type or data priority, physical layer transmission quality, and FEC encoding / decoding, such as: {{service type / data priority A1, physical layer transmission quality B1: FEC encoding / decoding algorithm C1}, ..., {service type / data priority An, physical layer transmission quality Bn: FEC encoding / decoding algorithm Cn}}. Correspondingly, if the data sender and data receiver successfully negotiate, they reply with an ACK, and data transmission and reception are performed according to the negotiated encoding / decoding algorithm. Otherwise, reply with NACK and send and receive data according to the default encoding and decoding algorithm.
[0045] It is understood that the transmission quality information in the three specific embodiments described above can be used individually or in combination. For example, the application layer can simultaneously report network layer quality information and physical layer quality information, and the transport layer can determine the target encoding / decoding algorithm by integrating multiple quality information. Furthermore, it is also possible to consider using artificial intelligence model prediction to replace algorithm matching based on preset mapping relationships.
[0046] Furthermore, during data transmission, the application layer can periodically measure the aforementioned transmission metrics, or measure them when changes in the transmission environment are detected, and update the transmission quality information based on the latest measurement results. When the change between the updated transmission quality information value and the previously reported value exceeds a preset threshold, or when the service type or data priority of the data to be transmitted changes, the application layer sends the updated target data to the transport layer again through a preset interface. The forward error correction encoder in the transport layer re-executes the matching of the encoding and decoding algorithm based on the updated target data. If the newly determined target encoding and decoding algorithm is inconsistent with the currently used encoding and decoding algorithm, it renegotiates the encoding and decoding parameters with the data receiver. If the negotiation is successful, it switches to the new encoding and decoding algorithm for data transmission. If the newly determined target encoding and decoding algorithm is consistent with the currently used encoding and decoding algorithm, no renegotiation is required, and data transmission continues according to the current encoding and decoding algorithm. In this way, the forward error correction encoding and decoding algorithm can be dynamically updated according to changes in the network environment and service requirements during transmission.
[0047] Accordingly, after receiving the encoded data to be transmitted, the data receiver decodes the received data according to the negotiated decoding algorithm, or, if negotiation fails, according to the default decoding algorithm corresponding to the default encoding algorithm. It can be understood that when the number of data packets lost during transmission does not exceed the recoverable threshold of the decoding algorithm, the data receiver directly recovers the lost data using redundant data packets without requesting retransmission from the data sender. When the number of lost data packets exceeds the recoverable threshold, the data receiver then requests retransmission from the data sender through feedback retransmission, thereby reducing the number of retransmissions while ensuring the reliability of data transmission.
[0048] See Figure 5 As shown in the embodiments, this application also discloses a data transmission device applied at a data sending end, including: Data sending module 11 is used to send target data to the transport layer of the data sending end through the application layer using a preset interface; the target data includes service information and transmission quality information; The algorithm determination module 12 is used to receive the target data using the forward error correction encoder in the transport layer, and determine the target encoding and decoding algorithm corresponding to the service information and the transmission quality information based on a preset mapping relationship; the preset mapping relationship includes the correspondence between the service information, the transmission quality information and each forward error correction encoding and decoding algorithm; The algorithm negotiation module 13 is used to negotiate the encoding and decoding parameters between the target encoding and decoding algorithm and the data receiving end; the encoding and decoding parameters include encoding parameters for determining the encoding algorithm of the data sending end and decoding parameters for determining the decoding algorithm of the data receiving end. The data transmission module 14 is used to encode the data to be transmitted according to the encoding algorithm when the data sending end and the data receiving end successfully negotiate, and transmit the encoded data to be transmitted to the data receiving end; the data to be transmitted is the business data corresponding to the target data.
[0049] In this embodiment, the data transmission module can send target data, including service information and transmission quality information, to the transport layer through a preset interface, enabling the transport layer to perceive the upper-layer service requirements and the current network transmission quality in real time. The algorithm determination module determines the target encoding and decoding algorithm corresponding to the service information and transmission quality information based on a preset mapping relationship, ensuring that the determined algorithm matches the current service requirements and current transmission quality. The algorithm negotiation module negotiates encoding and decoding parameters with the data receiving end to ensure that the encoding algorithm of the data sending end is consistent with the decoding algorithm of the data receiving end. When the negotiation is successful, the data transmission module encodes and transmits the data to be transmitted according to the negotiated encoding algorithm. Therefore, it can dynamically determine the appropriate forward error correction encoding and decoding algorithm according to the real-time changing network transmission quality and diverse service requirements, improving the reliability of wireless transmission, while reducing a large number of retransmissions caused by channel mutations, and reducing end-to-end latency and jitter.
[0050] In some specific embodiments, the transmission quality information is one or more of network layer quality information, data link layer quality information, and physical layer quality information; The network layer quality information is determined based on one or more of end-to-end packet loss rate, transmission delay, and delay jitter; the data link layer quality information is determined based on end-to-end frame error rate and / or data retransmission rate; and the physical layer quality information is determined based on channel bit error rate and / or reference signal received power.
[0051] In some specific embodiments, the preset mapping relationship includes multiple sets of correspondence relationships; Each of the aforementioned correspondences includes one type of service information, one type of transmission quality information, and one type of forward error correction encoding / decoding algorithm. Furthermore, multiple combinations of different types of service information and different types of transmission quality information correspond to one type of forward error correction encoding / decoding algorithm.
[0052] In some specific embodiments, the service information includes service type and / or data priority, wherein the service type is used to characterize the service scenario corresponding to the data to be transmitted, and the data priority is used to characterize the priority level of the data to be transmitted; The algorithm determination module 12 specifically includes: The algorithm determination unit is used to determine the target encoding / decoding algorithm corresponding to the transmission quality information, the service type, and / or the data priority based on the preset mapping relationship.
[0053] In some specific embodiments, the encoding and decoding parameters further include a negotiation request flag and a negotiation response flag; The negotiation request flag is used to determine whether the data sender requests to negotiate the forward error correction encoding and decoding algorithm, and the negotiation response flag is used to characterize the negotiation result of the forward error correction encoding and decoding algorithm.
[0054] In some specific embodiments, the algorithm negotiation module 13 specifically includes: The parameter sending unit is used to set the negotiation request flag to a first value, set the negotiation response flag to a second value, and send the codec parameters carrying the negotiation request flag and the negotiation response flag to the data receiving end; A parameter receiving unit is used to receive the encoding / decoding parameters returned by the data receiving end; The parameter determination unit is used to determine that the data sender and the data receiver have successfully negotiated when the negotiation request flag in the encoding / decoding parameters is set to the second value and the negotiation response flag is set to the first value.
[0055] In some specific embodiments, the data transmission device further includes: The data encoding module is used to encode the data to be transmitted according to a preset default encoding algorithm when the data sending end and the data receiving end fail to negotiate, and then transmit the encoded data to the data receiving end.
[0056] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0057] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the data transmission method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0058] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0059] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0060] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including computer programs capable of performing the data transmission method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0061] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed data transmission method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0062] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0063] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0064] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0065] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0066] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data transmission method, characterized in that, Applied to the data sending end, including: The target data is sent from the application layer to the transport layer of the data sending end via a preset interface; the target data includes service information and transmission quality information. The target data is received using a forward error correction encoder in the transport layer, and a target encoding / decoding algorithm corresponding to the service information and the transmission quality information is determined based on a preset mapping relationship; the preset mapping relationship includes the correspondence between the service information, the transmission quality information and each forward error correction encoding / decoding algorithm; The target encoding / decoding algorithm and the data receiving end negotiate encoding / decoding parameters; the encoding / decoding parameters include encoding parameters for determining the encoding algorithm of the data sending end and decoding parameters for determining the decoding algorithm of the data receiving end. When the data sending end and the data receiving end successfully negotiate, the data to be transmitted is encoded according to the encoding algorithm, and the encoded data to be transmitted is transmitted to the data receiving end; the data to be transmitted is the service data corresponding to the target data.
2. The data transmission method according to claim 1, characterized in that, The transmission quality information is one or more of the following: network layer quality information, data link layer quality information, and physical layer quality information; The network layer quality information is determined based on one or more of end-to-end packet loss rate, transmission delay, and delay jitter; the data link layer quality information is determined based on end-to-end frame error rate and / or data retransmission rate; and the physical layer quality information is determined based on channel bit error rate and / or reference signal received power.
3. The data transmission method according to claim 1, characterized in that, The preset mapping relationship includes multiple sets of correspondence relationships; Each of the aforementioned correspondences includes one type of service information, one type of transmission quality information, and one type of forward error correction encoding / decoding algorithm. Furthermore, multiple combinations of different types of service information and different types of transmission quality information correspond to one type of forward error correction encoding / decoding algorithm.
4. The data transmission method according to claim 1, characterized in that, The business information includes business type and / or data priority. The business type is used to characterize the business scenario corresponding to the data to be transmitted, and the data priority is used to characterize the priority level of the data to be transmitted. The step of determining the target encoding / decoding algorithm corresponding to the service information and the transmission quality information based on a preset mapping relationship includes: Based on the preset mapping relationship, the target encoding and decoding algorithm corresponding to the transmission quality information, the service type, and / or the data priority is determined.
5. The data transmission method according to any one of claims 1 to 4, characterized in that, The encoding and decoding parameters also include a negotiation request flag and a negotiation response flag; The negotiation request flag is used to determine whether the data sender requests to negotiate the forward error correction encoding and decoding algorithm, and the negotiation response flag is used to characterize the negotiation result of the forward error correction encoding and decoding algorithm.
6. The data transmission method according to claim 5, characterized in that, The negotiation of encoding and decoding parameters between the target encoding / decoding algorithm and the data receiving end includes: Set the negotiation request flag to a first value, set the negotiation response flag to a second value, and send the codec parameters carrying the negotiation request flag and the negotiation response flag to the data receiving end; Receive the encoding / decoding parameters returned by the data receiving end; When the negotiation request flag in the encoding / decoding parameters is set to the second value and the negotiation response flag is set to the first value, it is determined that the data sender and the data receiver have successfully negotiated.
7. The data transmission method according to claim 1, characterized in that, After negotiating the encoding and decoding parameters between the target encoding / decoding algorithm and the data receiving end, the process further includes: When the data sending end and the data receiving end fail to negotiate, the data to be transmitted is encoded according to a preset default encoding algorithm, and the encoded data to be transmitted is transmitted to the data receiving end.
8. A data transmission device, characterized in that, Applied to the data sending end, including: The data sending module is used to send target data to the transport layer of the data sending end through the application layer using a preset interface; the target data includes service information and transmission quality information. An algorithm determination module is used to receive the target data using the forward error correction encoder in the transport layer, and determine the target encoding and decoding algorithm corresponding to the service information and the transmission quality information based on a preset mapping relationship; the preset mapping relationship includes the correspondence between the service information, the transmission quality information and each forward error correction encoding and decoding algorithm; An algorithm negotiation module is used to negotiate encoding and decoding parameters between the target encoding / decoding algorithm and the data receiving end; the encoding and decoding parameters include encoding parameters for determining the encoding algorithm of the data sending end and decoding parameters for determining the decoding algorithm of the data receiving end. The data transmission module is used to encode the data to be transmitted according to the encoding algorithm when the data sending end and the data receiving end successfully negotiate, and then transmit the encoded data to be transmitted to the data receiving end; the data to be transmitted is business data corresponding to the target data.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the data transmission method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the data transmission method as described in any one of claims 1 to 7.
