Fountain code encoding method and communication device
Through a two-stage encoding method, the data blocks in the fountain code are evenly selected, which solves the problems of unbalanced coding redundancy and increased transmission delay, improves the transmission efficiency and fault tolerance performance of the fountain code, and is suitable for dynamic network environments.
Patent Information
- Application Number
- CN202510579291.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-05-07
AI Technical Summary
In the existing fountain code encoding process, the probability distribution of randomly selected data blocks is uncontrollable, resulting in uneven data block selection, unbalanced coding redundancy, increased transmission delay and reduced fault tolerance performance, especially when the network is congested or the channel quality fluctuates.
A two-stage encoding method is adopted. First, all data blocks are selected for encoding in a preset order. Then, the selection probability is dynamically adjusted according to the number of times the data block has been selected to ensure that the selection probability of each data block is balanced. Data blocks are selected for encoding by randomly generating a second degree value d2 until the termination condition is met.
It achieves balanced selection of data blocks in the fountain code encoding process, improves data block utilization, balances coding redundancy, reduces transmission delay and improves fault tolerance, adapts to dynamic network environments, and improves transmission efficiency and stability.
Smart Images

Figure CN120110607B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a fountain code encoding method and a communication device. Background Art
[0002] In the existing fountain code encoding process, the transmitter randomly selects multiple data blocks, performs an exclusive-OR operation on them, and generates a coded packet. Due to the uncontrollable probability distribution of randomly selected data blocks, this results in uneven block selection. For example, some blocks may be frequently selected, while others are less frequently selected. This situation is particularly pronounced during network congestion or fluctuating channel quality, and can easily lead to problems such as unbalanced coding redundancy, increased transmission latency, and reduced fault tolerance. Summary of the Invention
[0003] The embodiments of the present application provide a fountain code encoding method and a communication device, which are used to achieve balanced selection of data blocks for encoding during the fountain code encoding process.
[0004] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0005] In a first aspect, a fountain code encoding method is provided, comprising: obtaining k data blocks based on original data to be encoded; randomly generating a first degree value d1, selecting d1 data blocks from the k data blocks in a preset order for encoding, generating a first encoding packet, sending the first encoding packet, and repeating this step until each data block is selected at least N times, where N is an integer greater than or equal to 1, and the degree value represents the number of data blocks required to generate one encoding packet; randomly generating a second degree value d2, selecting d2 data blocks from the k data blocks for encoding according to a selection probability of each data block, generating a second encoding packet, sending the second encoding packet, and repeating this step until a termination condition is satisfied, where the selection probability of each data block is determined by the number of times each data block has been selected.
[0006] The fountain code encoding method provided in the embodiments of the present application comprises a two-stage encoding process. In the first stage, all data blocks are selected in a preset order and encoded, covering all data blocks. In the second stage, data is selected based on the selection probability of each data block and encoded. The selection probability of each data block can be adjusted based on the number of times each data block has been selected, achieving dynamic balancing of the selection probabilities of each data block. This ensures that each data block is evenly selected for encoding during the fountain code encoding process.
[0007] In one possible implementation, the fewer times a data block has been selected, the greater its probability of selection, and the greater the number of times a data block has been selected, the smaller its probability of selection. In other words, the fewer times a data block has been selected, the greater its probability of being selected again, and the greater the number of times a data block has been selected, the smaller its probability of being selected again, thereby achieving a dynamic balance in the selection probabilities of each data block.
[0008] In one possible implementation, the selection probability of the i-th data block is equal to: ; is the number of times the i-th data block has been selected, 1≤i≤k, where i is an integer. The significance of this formula is that the selection probability of a data block is not only essentially inversely proportional to the number of times it has been selected, but also combines the selection probabilities of all data blocks, thereby achieving a dynamic balance of the selection probabilities of each data block.
[0009] In one possible implementation, the termination condition is satisfied when the total number of coded packets is greater than or equal to a total threshold. When the total number of coded packets is greater than or equal to the total threshold, the first device stops generating and sending new second coded packets to avoid generating too many redundant coded packets and occupying excessive bandwidth.
[0010] In one possible implementation, the total threshold is equal to: , is a parameter greater than or equal to 0. That is, if the total number of coding packets is too small, some data blocks will be selected too many times while some data blocks will be selected too few times, resulting in an imbalanced selection probability of the data blocks. The total number of coding packets must be at least the number of data blocks k so that there are enough coding packets to achieve a balanced selection probability of the data blocks.
[0011] In one possible implementation, the termination condition is satisfied when the difference between the maximum and minimum selection probabilities of the k data blocks is less than a probability threshold. At this point, the selection probabilities of all k data blocks are numerically close, and the selection probabilities are balanced.
[0012] In one possible implementation, the process further includes: if the first degree value d1 is greater than the number a of remaining unselected data blocks, then selecting d1-a data blocks with equal probability from the k data blocks, encoding the a unselected data blocks and the d1-a data blocks selected with equal probability to generate a first coded packet, and sending the first coded packet. If the first degree value d1 (i.e., the number of data blocks required for encoding) d1 is greater than the number a of remaining unselected (i.e., unencoded) data blocks in the current round of traversal, indicating that the number of remaining unencoded data blocks in the current round of traversal is too small to generate a first coded packet, the first device then selects d1-a data blocks with equal probability from the k data blocks (i.e., the selection probability of each data block is 1 / k), thereby accumulating a+(d1-a)=d1 data blocks for encoding. Encoding these d1 data blocks can generate a first coded packet.
[0013] In one possible implementation, the process further includes: if the first degree value d1 is greater than the number a of remaining unselected data blocks, then selecting d1-a data blocks with equal probability from the remaining k data blocks that have been selected, encoding the a unselected data blocks and the d1-a data blocks that have been selected with equal probability, generating a first coded packet, and transmitting the first coded packet. The first device selects d1-a data blocks with equal probability from the k data blocks. Although this will yield d1 data blocks, some of the k data blocks have already been selected (i.e., encoded) and some have not been selected (i.e., not encoded). Therefore, it is possible that an unselected data block will be selected again. If an XOR operation is performed on the unselected data blocks again, this is equivalent to performing an XOR operation on the same data blocks. The result of the operation (i.e., the resulting coded packet) will always be 0, and the second device will be unable to decode the coded packet. The first device selects d1-a data blocks with medium probability from the remaining ka selected data blocks, so there will be no situation where unselected data blocks are selected again. If an XOR operation is performed on the unselected data blocks again, the XOR operation will not be performed on the same data block. The operation result (that is, the obtained coding packet) will not always be 0, and the second device can decode the coding packet.
[0014] In a second aspect, a communication device is provided, comprising a processing module and a communication module. The processing module is configured to obtain k data blocks based on original data to be encoded; randomly generate a first degree value d1, select d1 data blocks from the k data blocks in a preset order for encoding, and generate a first encoding packet; the communication module is configured to send the first encoding packet, and repeat this step until each data block is selected at least N times, where N is an integer greater than or equal to 1, and the degree value represents the number of data blocks required to generate one encoding packet; the processing module is configured to randomly generate a second degree value d2, select d2 data blocks from the k data blocks for encoding according to the selection probability of each data block, and generate a second encoding packet; the communication module is configured to send the second encoding packet, and repeat this step until a termination condition is satisfied, where the selection probability of each data block is determined by the number of times each data block has been selected.
[0015] The second aspect is the implementation on the device side corresponding to the first aspect. The explanation, supplement and description of the beneficial effects of the first aspect are also applicable to the second aspect and will not be repeated here.
[0016] In a third aspect, a communication device is provided, comprising a processor. The processor is coupled to a memory and can be configured to execute instructions or data in the memory to implement the method of any possible implementation of the first aspect. Optionally, the communication device further comprises a memory. Optionally, the communication device further comprises a communication interface, the processor being coupled to the communication interface.
[0017] In one implementation, the communication interface may be a transceiver, or an input / output interface.
[0018] In another implementation, the communication device is a chip configured in the first device. When the communication device is a chip configured in the first device, the communication interface may be an input / output interface.
[0019] In a fourth aspect, a processor is provided, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method of any possible implementation of any of the above aspects.
[0020] In a specific implementation, the processor may be one or more chips, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a trigger, or various logic circuits. The input signal received by the input circuit may be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by a transmitter. The input circuit and the output circuit may be the same circuit, which functions as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation of the processor and various circuits.
[0021] In a fifth aspect, a communication device is provided, comprising a processor and a memory. The processor is configured to read instructions stored in the memory and receive signals via a receiver and transmit signals via a transmitter to execute the method of any possible implementation of any of the above aspects.
[0022] Optionally, there are one or more processors and one or more memories.
[0023] In a sixth aspect, a computer program product is provided, comprising: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute a method in any possible implementation of any of the above aspects.
[0024] In the seventh aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instructions) which, when run on a computer, enables the computer to execute a method in any possible implementation of any of the above aspects.
[0025] In an eighth aspect, embodiments of the present application provide a chip system comprising one or more processors configured to retrieve and execute instructions stored in a memory, thereby executing the method of any of the above aspects or any possible implementations of each aspect. The chip system may be composed of a chip or may include a chip and other discrete devices.
[0026] Among them, the chip system may include an input circuit or interface for sending information or data, and an output circuit or interface for receiving information or data.
[0027] In a ninth aspect, a communication system is provided, comprising the aforementioned first device and second device. Optionally, the communication system may further comprise other devices that communicate with the first device and / or the second device.
[0028] The technical effects of the third to ninth aspects refer to the technical effects of the first aspect and any of its embodiments and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic diagram of the architecture of a wireless communication system provided in an embodiment of the present application;
[0030] Figure 2 A schematic diagram of the structure of a terminal device and a network device provided in an embodiment of the present application;
[0031] Figure 3 A schematic diagram of encoding and decoding of a fountain code provided in an embodiment of the present application;
[0032] Figure 4 A schematic diagram of another fountain code encoding and decoding method provided in an embodiment of the present application;
[0033] Figure 5 A schematic diagram of a flow chart of a fountain code encoding method provided in an embodiment of the present application;
[0034] Figure 6 A schematic diagram of encoding of a fountain code provided in an embodiment of the present application;
[0035] Figure 7 A schematic diagram of another fountain code encoding provided in an embodiment of the present application;
[0036] Figure 8 A schematic diagram showing a comparison of packet loss rates under different code lengths provided in an embodiment of the present application;
[0037] Figure 9 A schematic diagram showing a comparison of encoding times under different code lengths provided in an embodiment of the present application;
[0038] Figure 10 A schematic diagram of the structure of a communication device provided in an embodiment of the present application;
[0039] Figure 11 A schematic diagram of the structure of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0041] First, some concepts involved in this application are described.
[0042] The terms "first", "second", etc. involved in the embodiments of the present application are only used to distinguish features of the same type and cannot be understood as indicating relative importance, quantity, order, etc.
[0043] The terms "exemplary" or "for example" in the embodiments of this application are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0044] The technical solutions provided in this application can be applied to various communication systems, such as: long term evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD) system, sidelink communication system, universal mobile telecommunication system (UMTS), worldwide interoperability for microwave access (WiMAX) communication system, non-terrestrial network (NTN) communication system, fifth generation (5G) mobile communication system, new radio access technology (NR), future communication systems, and 5G Advanced communication system. Among them, 5G mobile communication system can include non-standalone (NSA) and / or standalone (SA) networking. The technical solutions provided in this application can also be applied to future communication systems. This application does not limit this. The terms "system" and "network" in the embodiments of the present application are often used interchangeably, and the described technology can be used for the systems and radio technologies mentioned above as well as other systems and radio technologies.
[0045] Figure 1 The following is a schematic diagram of the architecture of a wireless communication system provided in an embodiment of the present application. The communication system 100 may include network devices, such as Figure 1 At least one network device 110 is shown. The communication system 100 may also include terminal devices, such as Figure 1 The communication system 100 may also include an ambient IoT device, such as Figure 1 The environmental Internet of Things device 130 shown. The network device 110, the terminal device 120, and the environmental Internet of Things device 130 can communicate with each other via a wireless link.
[0046] Figure 1 The example shows one network device 110 , one terminal device 120 , and one environmental IoT device 130 . Optionally, the communication system 100 may further include multiple network devices 110 , multiple terminal devices 120 , and multiple environmental IoT devices 130 .
[0047] The network devices in this application may be network-side devices such as access network devices and core network devices. Access network devices are sometimes also referred to as access nodes. Access network devices have wireless transceiver functions and are used to communicate with terminals. Access network devices include but are not limited to base stations (base stations) in the above-mentioned communication systems, evolved NodeBs (eNodeBs), transmission reception points (TRPs), next-generation NodeBs (gNBs) in 5G mobile communication systems, access network devices or modules of access network devices in open access networks (ORAN) systems, satellites in NTN communication systems, base stations in future mobile communication systems, or access nodes in WiFi systems. Access network devices may also be modules or units that can implement some of the functions of a base station. Access network devices may be macro base stations, micro base stations or indoor stations, relay nodes or donor nodes, or wireless controllers in cloud radio access network (CRAN) scenarios. Optionally, access network devices may also be servers, wearable devices, or vehicle-mounted devices. For example, the access network device in vehicle-to-everything (V2X) technology can be a roadside unit (RSU). Multiple access network devices in a communication system can be base stations of the same type or different types. A base station can communicate with a terminal or through a relay station. A terminal can communicate with multiple base stations using different access technologies. The embodiments of this application do not limit the specific technology or device form used by the access network device. In this application, the access network device is referred to as a network device.
[0048] In this application, the device for implementing the function of a network device can be a network device, or a device that can support the network device to implement the function, such as a processor, circuit, chip, or chip system, etc. The device can be installed in the network device or connected to the network device for use. In the technical solution provided in this application, the technical solution provided in this application is described by taking the device for implementing the function of a network device as an example.
[0049] In this application, a terminal device or ambient IoT device can be a wireless terminal device capable of receiving scheduling and instruction information from network devices. A wireless terminal device can be a device that provides voice and / or data connectivity to a user, a handheld device with wireless connectivity, or other processing device connected to a wireless modem. For example, a terminal device or ambient IoT device can communicate with one or more core networks or the Internet via a radio access network (RAN). A terminal device or ambient IoT device can also be referred to as a terminal, user equipment (UE), mobile station, or mobile terminal. A terminal device or ambient IoT device can be widely used in various scenarios, such as device-to-device (D2D), vehicle-to-everything (V2X) communication, machine-type communication (MTC), the Internet of Things (IoT), ultra-reliable low-latency communication (URLLC), virtual reality, augmented reality, industrial control, autonomous driving, telemedicine, smart grid, smart furniture, smart office, smart wearables, smart transportation, smart city, or satellite communication. The terminal can be a mobile phone, tablet computer, computer with wireless transceiver function, wearable device, vehicle, aircraft (such as drone, helicopter, airplane), hot air balloon, ship, robot, robotic arm, or smart home device, etc. The embodiments of this application do not limit the form of terminal devices or environmental IoT devices.
[0050] In this application, the device for realizing the function of a terminal device or an environmental Internet of Things device can be a terminal device or an environmental Internet of Things device, or can be a device that can support the terminal device or the environmental Internet of Things device to realize the function, such as a processor, circuit, chip, chip system, etc. The device can be installed in the terminal device or the environmental Internet of Things device, or connected to the terminal device or the environmental Internet of Things device for use. In the technical solution provided in this application, the technical solution provided in this application is described by taking the terminal device as an example in which the device for realizing the function of a terminal device or an environmental Internet of Things device is a terminal device.
[0051] The access network device, terminal device or environmental Internet of Things device can be fixed or movable. The access network device, terminal device or environmental Internet of Things device can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted; can also be deployed on the water surface; can also be deployed on airplanes, balloons and artificial satellites in the air. The embodiments of the present application do not limit the application scenarios of the access network device, terminal device or environmental Internet of Things device. The access network device, terminal device or environmental Internet of Things device can be deployed in the same scenario or different scenarios. For example, the access network device, terminal device or environmental Internet of Things device are deployed on land at the same time; or, the access network device is deployed on land, and the terminal device or environmental Internet of Things device is deployed on the water surface, etc., and no further examples are given.
[0052] In practical applications, multiple network devices can collaborate to assist terminal devices or ambient IoT devices in achieving wireless access, with different network devices each implementing portions of a base station's functionality. For example, a network device can be a centralized unit (CU), a distributed unit (DU), a CU-control plane (CP), a CU-user plane (UP), or a radio unit (RU). The CU and DU can be separate or included in the same network element, such as a baseband unit (BBU). The RU can be included in a radio frequency device or radio unit, such as a remote radio unit (RRU), an active antenna unit (AAU), or a remote radio head (RRH).
[0053] In different systems, the CU (or CU-CP and CU-UP), DU, or RU may have different names, but those skilled in the art will understand their meanings. For example, in the ORAN system, the CU may also be called an O-CU (Open CU), the DU may also be called an O-DU, the CU-CP may also be called an O-CU-CP, the CU-UP may also be called an O-CU-UP, and the RU may also be called an O-RU. Any of the CU (or CU-CP, CU-UP), DU, and RU in this application may be implemented as a software module, a hardware module, or a combination of software and hardware modules. The CU (or CU-CP and CU-UP), DU, and RU can implement different protocol layer functions.
[0054] Figure 2This is a schematic diagram of the structure of a terminal device (or environmental IoT device) and a network device provided in an embodiment of the present application. The terminal device 120 (or environmental IoT device 130) includes a first processor 121, a first memory 122, and a first transceiver 123.
[0055] The first processor 121 may include one or more processing units, for example, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a microcontroller unit (MCU), a programmable logic device (PLD), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0056] The first memory 122 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DRRAM).
[0057] The first memory 122 can be independent and connected to the first processor 121 via a bus. The first memory 122 can also be integrated with the first processor 121. The first memory 122 is used to store application code for executing the solution of the present application, and the execution is controlled by the first processor 121. The first processor 121 is used to execute the computer program instructions stored in the first memory 122, thereby performing various functional applications and data processing of the terminal device (or environmental IoT device), such as implementing the perception method described in the embodiments of the present application.
[0058] The first processor 121 and the first transceiver 123 are connected via a bus. The first transceiver 123 can be any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access networks (RAN), and wireless local area networks (WLAN). The first transceiver 123 includes a transmitter Tx and a receiver Rx.
[0059] Network device 110 includes a second processor 111, a second memory 112, and a second transceiver 113. Second processor 111 is configured to execute computer program instructions stored in second memory 112, thereby performing various functional applications and data processing of network device 110, such as implementing the fountain code encoding method described in the embodiments of this application. The functions of second processor 111 are similar to those described for first processor 121, the functions of second memory 112 are similar to those described for first memory 122, and the functions of second transceiver 113 are similar to those described for first transceiver 123, and are not further described here.
[0060] To facilitate understanding of the embodiments of this application, a brief description of the terms used in this application is first provided. Alternatively, reference may be made to the explanations in the 3rd Generation Partnership Project (3GPP) standard protocols for the interpretation of some of these terms. It should be understood that the technical terms used in this application are intended only as examples and not as limitations. For example, as technology evolves, technical terms may also change. In cases where the technical meanings remain the same, other technical terms should also apply to this application.
[0061] Fountain codes are rateless codes designed for efficient and reliable data transmission. They are particularly well-suited for communication scenarios with high packet loss rates or difficult feedback, such as satellite communications and the Internet of Things. The sender generates infinite coded packets based on data blocks, like a fountain. As long as the receiver receives a sufficient number of coded packets, it can successfully decode the data block. Rateless codes have a variable code rate (the ratio of coded packets to data blocks). This allows the generation of an infinite number of coded packets, making them resilient to continuous packet loss.
[0062] Fountain codes, with their variable bit rate and robustness against burst packet loss, are a key technology for optimizing short-code transmission in fifth-generation (5G) communications and future communication methods. They are particularly well-suited for scenarios such as massive machine-type communications (mMTC), vehicle-to-everything (V2X), and live streaming. For example, in mMTC, the transmitter dynamically generates coded packets based on fountain codes to alleviate channel congestion, enabling efficient transmission of coded packets for a large number of low-power devices. This significantly reduces retransmission power consumption and latency, meeting the large-scale connectivity requirements of smart cities and the Industrial Internet of Things. In V2X scenarios, such as high-speed mobile environments (for example, vehicle-to-vehicle communications), short-code transmission can be optimized for packet loss resilience and fast decoding. In live streaming scenarios such as augmented reality (AR), virtual reality (VR), and cloud gaming, the retransmission-free mechanism of fountain codes ensures low-latency and highly reliable transmission of the first frame, reducing first-frame latency and minimizing video freezes.
[0063] Degree: The degree represents the number of data blocks required by the sender to generate a single coded packet. For example, if the degree d = 1, the sender directly generates a single coded packet from a single data block. If the degree is greater than 1, the sender combines d data blocks (for example, using an exclusive OR (XOR) operation) to generate a single coded packet. By optimizing the distribution of the degree, we ensure that redundant information can be efficiently combined during decoding.
[0064] Representative fountain code encoding methods include Luby transform codes (LT) and Raptor codes. LT codes, first proposed by Luby, use an ideal soliton distribution or a robust soliton distribution to randomly generate the degree value d. Their advantages are simplicity and computational efficiency. Their disadvantages are that when the number of data blocks k is small, decoding may require a large number of redundant coded packets. Raptor codes are an improved version of LT codes that improve decoding efficiency by introducing precoding, such as low-density parity-check codes (LDPC). Their advantages are faster decoding and lower redundancy (approaching the Shannon limit).
[0065] Soliton distribution: A core mathematical tool in fountain codes (particularly LT codes), soliton distribution controls the degree distribution of coded packets, ensuring efficient and stable decoding. Its design draws inspiration from soliton waves in physics, which are solitary waves that propagate without loss. By analogy, the decoding process should proceed smoothly, just like soliton waves.
[0066] The core problem that soliton distribution needs to solve is: how to distribute the probability of the degree value d so that decoding can start smoothly, that is, a sufficient number of coded packets with d=1 are required; the decoding process is executed continuously to avoid decoding failure; and the number of redundant coded packets is minimized.
[0067] Ideal soliton distribution: Ideal soliton distribution is a probability distribution used primarily in fountain codes, particularly LT codes, to optimize the encoding and decoding process. Its goal is to ensure that each encoded packet provides maximum information gain during data recovery, thereby improving decoding efficiency. The ideal soliton distribution is defined as follows: .
[0068] Where k is the number of data blocks to be encoded, and d is the degree. The probability is highest when d=1, meaning the number of coded packets with d=1 is the largest. The receiver can directly decode a coded packet with d=1 to obtain a data block, thus enabling decoding. When d is greater than 1, the probability of an ideal soliton distribution decreases rapidly as d increases, preventing decoding difficulties caused by an excessive number of coded packets with high values.
[0069] Robust soliton distribution (RSD): While ideal soliton distribution is theoretically optimal, random fluctuations can easily lead to decoding failures in practice. The robust soliton distribution improves decoding stability by introducing a redundant parameter δ based on the ideal distribution, making it more widely applicable in practice. The definition of the robust soliton distribution is as follows: .
[0070] in, , d represents the degree value, s represents the number of code packets with a degree value of 1, and k represents the number of data blocks. The robust soliton distribution increases the weight of degree d equal to 1 compared to the ideal soliton distribution to ensure more reliable decoding startup. It also introduces a spike to increase the probability at d = k / s to prevent decoding stagnation.
[0071] The encoding and decoding process of fountain codes in the prior art is as follows:
[0072] The transmitter performs encoding: The transmitter divides the original data into k equal parts {x1, x2, …, xk}. A degree d is randomly generated based on a soliton distribution (e.g., ideal or robust). If degree d = 1, the transmitter randomly selects a data block from the k data blocks, generates a coded packet y, and sends this coded packet y to the receiver. If degree d > 1, the transmitter randomly selects d data blocks from the k data blocks, performs a concatenation operation (e.g., XOR) on them, generates a coded packet y, and sends this coded packet y. This continues in this manner. For each degree d generated by the transmitter, a coded packet y is generated based on this value. Ultimately, m coded packets y1, y2, …, ym can be generated and sent, where m ≥ k.
[0073] Decoding process at the receiver: The receiver receives n coded packets, where n ≤ m. It uses belief propagation (BP) or Gaussian elimination to progressively decode these packets into k data blocks. These k data blocks are then concatenated according to their block identifiers to obtain the original data. Specifically, the receiver prioritizes decoding coded packets with a degree value of d = 1, directly obtaining a single data block. Then, based on the self-invertibility of XOR, it performs an XOR operation on the decoded data block and the coded packet generated based on it to obtain the remaining data blocks.
[0074] Figure 3 A schematic diagram of encoding and decoding of a fountain code provided in an embodiment of the present application. Figure 4 This is a schematic diagram of another fountain code encoding and decoding method provided in an embodiment of the present application. For example, Figure 3 and Figure 4As shown in the figure, the sender evenly divides the original data into four (k=4) data blocks: x1, x2, x3, and x4. The sender randomly generates a degree value d=1 based on the soliton distribution, randomly selects one data block x1, generates a coded packet y1, and sends it. The sender randomly generates a degree value d=3 based on the soliton distribution, randomly selects three data blocks x1, x2, and x3, performs a combination operation (e.g., XOR), generates a coded packet y2, and sends it. The sender randomly generates a degree value d=2 based on the soliton distribution, randomly selects two data blocks x2 and x4, performs a combination operation (e.g., XOR), generates a coded packet y3, and sends it. Similarly, the sender randomly generates a degree value d=2 based on the soliton distribution, randomly selects two data blocks x3 and x4, performs a combination operation (e.g., XOR), generates a coded packet y8, and sends it. The transmitter generates and sends eight coded packets, y1-y8, for a total of m = 8. These packets may be lost during transmission, such as packets y2 and y8. The receiver receives six coded packets, y1, y3, ..., and y7, for a total of n = 6. The receiver decodes these packets sequentially to obtain four data blocks, x1, x2, x3, and x4.
[0075] The uncontrollable probability distribution of random data block selection at the sender leads to uneven block selection. For example, some blocks are frequently selected, while others are less frequently selected. This situation is particularly pronounced during periods of network congestion or fluctuating channel quality, and can lead to problems such as unbalanced coding redundancy, increased transmission latency, and decreased fault tolerance.
[0076] In view of this, the present application provides a fountain code encoding method. The fountain code encoding process includes two stages. In the first stage, all data blocks are selected in a preset order and encoded, covering all data blocks. In the second stage, data is selected and encoded based on the selection probability of each data block. The selection probability of each data block can be adjusted based on the number of times each data block has been selected. The smaller the number of times a data block has been selected, the greater the probability of selection of the data block, and the larger the number of times a data block has been selected, the smaller the probability of selection of the data block, so that the selection probabilities of each data block are close.
[0077] This fountain code encoding method achieves balanced selection of individual data blocks for encoding during the fountain code encoding process, improving data block utilization, balancing coding redundancy, reducing transmission latency, and improving fault tolerance. This method exhibits greater adaptability and stability, particularly in dynamic network environments. This fountain code encoding method does not require significant modifications to existing fountain code coding standards, ensuring good compatibility. Optimization for short-code scenarios significantly improves transmission efficiency and reduces latency, meeting the requirements for low-latency, highly reliable transmission in future communications and the Internet of Things. Furthermore, the optional forward error correction (FEC) mechanism adds redundant information, enabling the receiver to automatically detect and correct errors, enhancing short-code transmission performance.
[0078] It should also be noted that the order of the two stages can be interchanged, for example, the first stage is executed first and then the second stage, or the second stage is executed first and then the first stage.
[0079] The solution provided by this application is described in detail below in conjunction with the corresponding flowchart. It can be understood that the schematic flowchart provided by this application mainly uses different devices (for example, terminal devices, environmental Internet of Things devices, network devices) as examples of the execution subjects of the interactive diagram to illustrate the method, but this application does not limit the execution subjects of the interactive diagram. For example, the device in the schematic flowchart (for example, terminal devices, environmental Internet of Things devices, network devices) can also be a chip, chip system, or processor that supports the device to implement the method, or a logic module or software that can implement all or part of the functions of the device.
[0080] For a unified explanation here, in the interaction process of the embodiment of the present application, the message or signaling interaction involved can adopt the message or signaling in the standard, or it can be a newly introduced message or signaling, and the embodiment of the present application does not make specific limitations on this.
[0081] Figure 5 A schematic diagram of a fountain code encoding method provided in an embodiment of the present application. It can be understood that the terminal device involved in the fountain code encoding method can be Figure 1 The terminal device in the term "fountain code" may also refer to a device in the terminal device (such as a processor, a chip, or a chip system). The network device involved in the fountain code encoding method may be Figure 1 The network device in the network device can also refer to the device in the network device (such as a processor, chip, or chip system, etc.). The environmental Internet of Things device involved in the fountain code encoding method can be Figure 1 The term "environmental IoT device" may also refer to a device in an environmental IoT device (such as a processor, chip, or chip system). Figure 5As shown, the fountain code encoding method 500 includes the following steps S501-S503:
[0082] S501: A first device obtains k data blocks according to original data to be encoded.
[0083] The first device may divide the original data to be encoded (length H) into k data blocks of equal length. If the length H of the original data is not divisible by k, blank data of length L (for example, all zeros) is added to the end of the original data so that H + L is divisible by k. In this case, the added blank data is located in the last data block.
[0084] S502. The first device randomly generates a first degree value d1, selects d1 data blocks from k data blocks in a preset order to perform encoding, generates a first encoding packet, sends the first encoding packet to the second device, and repeats this step until each data block is selected at least N times, where N is an integer greater than or equal to 1, and the degree value represents the number of data blocks required to encode and generate one encoding packet.
[0085] The first device is the transmitter of the raw data to be encoded, and the second device is the receiver of the raw data to be encoded. The first device is any one of a network device, a terminal device, or an ambient IoT device, and the second device is any one of a network device, a terminal device, or an ambient IoT device. For example, the first device is a network device, and the second device is a terminal device or an ambient IoT device; or the first device is a terminal device or an ambient IoT device, and the second device is a network device; or the first device is a terminal device, and the second device is an ambient IoT device; or the first device is an ambient IoT device, and the second device is a terminal device; or both the first and second devices are terminal devices; or both the first and second devices are ambient IoT devices; or both the first and second devices are network devices.
[0086] The first device can randomly generate a first degree value d1 using a soliton distribution (e.g., an ideal soliton distribution or a robust soliton distribution). If the first degree value d1 = 1, the first device selects a data block from k data blocks according to a preset order (e.g., ascending or descending order of data block identifiers), generates a first coded packet y, and sends the first coded packet y to the second device. If the first degree value d1 is greater than 1, the first device selects d1 data blocks from the k data blocks according to the same preset order, performs a concatenation operation (e.g., an exclusive-OR operation) on them, generates a first coded packet y, and sends the first coded packet y to the second device. Similarly, each time the first device generates a first degree value d1, it selects d1 data blocks from the k data blocks according to the preset order, performs encoding once, generates a first coded packet y, and sends the first coded packet y to the second device. This is equivalent to traversing each data block in the preset order in each round until each data block has been selected at least N times, i.e., all k data blocks have been traversed at least N times, where N is an integer greater than or equal to 1.
[0087] If the first degree value (i.e., the number of data blocks required for encoding) d1 is greater than the number a of unselected (i.e., unencoded) data blocks remaining in the current round of traversal, indicating that the number of unencoded data blocks remaining in the current round of traversal is too small to encode and generate a first coded packet, the first device then selects d1-a data blocks with equal probability from the k data blocks (i.e., the probability of selecting each data block is 1 / k), thereby generating a+(d1-a)=d1 data blocks for encoding. Alternatively, the first device selects d1-a data blocks with equal probability from the remaining ka selected (i.e., encoded) data blocks of the k data blocks (i.e., the probability of selecting each data block is 1 / (ka)), thereby generating a+(d1-a)=d1 data blocks for encoding. Specifically, the first device encodes (e.g., combines (e.g., performs an XOR operation) on the a unselected data blocks and the d1-a data blocks selected with equal probability (a total of d1 data blocks) to generate a first coded packet y, and transmits the first coded packet y to the second device.
[0088] It should be noted that the first device selects d1-a data blocks with moderate probability from the k data blocks. Although this ensures d1 data blocks, some of the k data blocks have already been selected (i.e., encoded) and some have not been selected (i.e., not encoded). Therefore, it is possible that an unselected data block may be selected again. If an XOR operation is performed on the unselected data blocks again, this is equivalent to performing an XOR operation on the same data block. The result (i.e., the resulting coded packet) will always be 0, and the second device will be unable to decode the coded packet. However, if the first device selects d1-a data blocks with moderate probability from the remaining ka selected data blocks, the unselected data blocks will not be selected again. If an XOR operation is performed on the unselected data blocks again, the same data block will not be performed on the same data block. The result (i.e., the resulting coded packet) will not always be 0, and the second device can decode the coded packet.
[0089] Figure 6 This is a schematic diagram of a fountain code encoding provided in an embodiment of the present application. Figure 6 As shown, taking N=1 as an example, the first device generates a first degree value d1=1. It then selects d1=1 data block x1 from k=4 data blocks in ascending order of data block identifiers, performs encoding once, generates a first coded packet y, and sends this first coded packet y1 to the second device. Then, the first device generates a first degree value d1=2. It then selects d1=2 data blocks x2 and x3 from k=4 data blocks in ascending order of data block identifiers, performs encoding once, generates a first coded packet y, and sends this first coded packet y2 to the second device. Then, the first device generates a first degree value d1=2, which is greater than the number a=1 of the remaining unselected data blocks (x4). The first device then selects a data block (e.g., x2) with equal probability from the k=4 data blocks, encodes this a=1 unselected data block and a data block (e.g., d1-a=2-1=1) selected with equal probability, generates a first coded packet y, and sends this first coded packet y3 to the second device.
[0090] Each time the first device traverses the k data blocks once according to the preset order, each data block is selected at least once. Each time the first device traverses the k data blocks N times according to the preset order, each data block is selected at least N times. Furthermore, when N > 1, the preset order of traversing the k data blocks in two consecutive rounds can be different. For example, the first round of traversing the k data blocks can be based on the selection probability of each data block, while the second round of traversing the k data blocks can be based on descending order of data block identifiers, thereby avoiding random fluctuations that may cause decoding failures on the second device.
[0091] The first device also records the number of times each data block has been selected C. For example, the number of times the i-th data block among k data blocks has been selected is , 1≤i≤k, i is an integer.
[0092] Step S502 corresponds to the first stage of fountain code encoding.
[0093] S503. The first device randomly generates a second degree value d2, selects d2 data blocks from the k data blocks according to the selection probability of each data block, performs encoding, generates a second encoding packet, sends the second encoding packet to the second device, and repeats this step until the termination condition is met. The selection probability of each data block is determined by the number of times each data block has been selected.
[0094] The first device can randomly generate a second degree value d2 using an ideal soliton distribution or a robust soliton distribution. If the second degree value d2 = 1, the first device selects a data block from the k data blocks based on the selection probability of each data block, generates a second coded packet y, and sends the second coded packet y to the second device. If the second degree value d2 > 1, the first device selects d2 data blocks from the k data blocks based on the selection probability of each data block, performs a merge operation (e.g., an exclusive OR operation), generates a second coded packet y, and sends the second coded packet y to the second device. Similarly, each time the transmitter generates a second degree value d2, it selects d2 data blocks from the k data blocks based on the selection probability of each data block, performs encoding once, generates a second coded packet y, and sends the second coded packet y to the second device, until a termination condition is met.
[0095] The selection probability of each data block is determined by the number of times each data block has been selected. The smaller the number of times a data block has been selected, the greater the probability of that data block being selected, and the larger the number of times a data block has been selected, the smaller the probability of that data block being selected. In other words, the smaller the number of times a data block has been selected, the greater the probability of it being selected again, and the larger the number of times a data block has been selected, the smaller the probability of it being selected again, thereby achieving dynamic balancing of the selection probabilities of each data block. After each encoding cycle is completed, the first device increments the number of times the data block involved in the encoding cycle by 1 and adjusts the selection probability of each data block based on the number of times each data block has been selected.
[0096] Exemplarily, the selection probability of the i-th data block is equal to: ; is the number of times the i-th data block has been selected, 1≤i≤k, where i is an integer. The significance of this formula lies in that the probability of selecting a data block is not only substantially inversely proportional to the number of times the data block has been selected, but also integrates the selection probabilities of all data blocks, thereby achieving dynamic balancing of the selection probabilities of each data block. This embodiment of the present application does not limit how the selection probability of the i-th data block is calculated.
[0097] In one possible implementation, the termination condition is satisfied by: the total number of coded packets is greater than or equal to a total number threshold. For example, the total number threshold is equal to: , is a parameter greater than or equal to 0. That is, if the total number of coded packets is too small, some data blocks will be selected too many times while others will be selected too few times, resulting in an imbalance in the probability of data block selection. The total number of coded packets must reach at least the number of data blocks, k, to ensure a sufficient number of coded packets to achieve a balanced probability of data block selection. When the total number of coded packets is greater than or equal to the total number threshold, the first device stops generating and sending new second coded packets to avoid generating too many redundant coded packets and occupying excessive bandwidth.
[0098] In another possible implementation, the termination condition includes: the difference between the maximum and minimum selection probabilities of the k data blocks is less than a probability threshold (e.g., 0.01). At this point, the selection probabilities of all k data blocks are numerically close, and the selection probabilities are balanced.
[0099] It should be noted that these termination conditions can be combined. For example, when any one of the termination conditions is met, or when all the termination conditions are met, the first device stops generating and sending new second coded packets.
[0100] Figure 7 This is a schematic diagram of another fountain code encoding provided in an embodiment of the present application. Figure 7 As shown, the first device generates a second degree value d2=1, then selects d2=1 data block x2 from k=4 data blocks according to the selection probability of each data block, performs encoding once, generates a second coded packet y, and sends the second coded packet y1 to the second device. Then, the first device generates a second degree value d2=2, then selects d2=2 data blocks x1 and x3 from k=4 data blocks according to the selection probability of each data block, performs encoding once, generates a second coded packet y, and sends the second coded packet y2 to the second device. Then, the first device generates a second degree value d2=2, then selects d2=2 data blocks x3 and x4 from k=4 data blocks according to the selection probability of each data block, performs encoding once, generates a second coded packet y, and sends the second coded packet y3 to the second device. Then, the first device generates a second degree value d2=3, then selects d2=3 data blocks x1, x2, and x4 from k=4 data blocks according to the selection probability of each data block, performs encoding once, generates a second coded packet y, and sends the second coded packet y4 to the second device.
[0101] Accordingly, the second device receives multiple coded packets (including a first coded packet and a second coded packet). The second device can decode the multiple coded packets using existing decoding methods to obtain k data blocks, and then concatenate the k data blocks according to the data block identifiers to obtain the original data. For example, the second device can use belief propagation or Gaussian elimination to decode the multiple coded packets to obtain k data blocks, and then concatenate the k data blocks according to the data block identifiers to obtain the original data. Specifically, the second device preferentially decodes coded packets with a degree value (first degree value d1 or second degree value d2) of 1, directly obtaining a data block. Then, based on the self-invertibility of XOR, the second device performs an XOR operation on the decoded data block and the coded packet generated based on the data block to obtain the remaining data blocks.
[0102] Step S503 corresponds to the second stage of fountain code encoding.
[0103] Figure 8 This is a schematic diagram showing a comparison of packet loss rates for different code lengths provided by an embodiment of the present application. The fountain code encoding method provided by an embodiment of the present application has a lower packet loss rate than Reed-Solomon (RS) codes and traditional LT fountain codes.
[0104] Figure 9 The encoding time of the fountain code encoding method provided in the embodiment of the present application is the same as that of the traditional LT fountain code, and is much shorter than that of the RS code.
[0105] The fountain code encoding method and communication device provided in the embodiments of the present application include a two-stage encoding process. In the first stage, all data blocks are selected in a preset order and encoded. In the second stage, data is selected based on the selection probability of each data block and encoded. The selection probability of each data block can be adjusted based on the number of times each data block has been selected, achieving dynamic balancing of the selection probabilities of each data block. This ensures that each data block is evenly selected for encoding during the fountain code encoding process.
[0106] like Figure 10 As shown, an embodiment of the present application provides a communication device. The communication device 1000 may include a communication module 1010. The communication module 1010 can implement corresponding communication functions, which can be internal communication functions of the communication device 1000 or communication functions between the communication device 1000 and other devices. Optionally, the communication module 1010 can also be referred to as a communication interface or a transceiver module. Optionally, the communication device 1000 also includes a processing module 1020. The processing module 1020 can implement corresponding processing functions.
[0107] Optionally, the communication device 1000 further includes a storage module 1030, which can be used to store instructions and / or data; the processing module 1020 can read the instructions and / or data in the storage module 1030, so that the communication device 1000 implements the aforementioned method embodiment.
[0108] In one possible design, the communication device 1000 may correspond to the first device in the above method embodiments, or a component (such as a circuit, chip, or chip system) configured in the first device. The communication device 1000 can be used to execute the steps or processes executed by the first device in any of the above method embodiments.
[0109] For example, the processing module 1020 is used to obtain k data blocks based on the original data to be encoded; randomly generate a first degree value d1, select d1 data blocks from the k data blocks in a preset order to perform encoding, and generate a first encoding packet, the communication module 1010 is used to send the first encoding packet, and repeat this step until each data block is selected at least N times, N is an integer greater than or equal to 1, and the degree value represents the number of data blocks required to encode and generate a encoding packet; the processing module 1020 is used to randomly generate a second degree value d2, select d2 data blocks from the k data blocks according to the selection probability of each data block to perform encoding, and generate a second encoding packet, the communication module 1010 is used to send the second encoding packet, and repeat this step until the termination condition is met, and the selection probability of each data block is determined by the number of times each data block has been selected.
[0110] In an optional design, the smaller the number of times a data block has been selected, the greater the probability of the data block being selected, and the larger the number of times a data block has been selected, the smaller the probability of the data block being selected.
[0111] In an optional design, the selection probability of the i-th data block is equal to: ; is the number of times the i-th data block has been selected, 1≤i≤k, and i is an integer.
[0112] In an optional design, the termination condition is met, including: the total number of encoded packets is greater than or equal to a total threshold.
[0113] In an alternative design, the population threshold is equal to: , A parameter greater than or equal to 0.
[0114] In an optional design, the termination condition is satisfied, including: among the k data blocks, the difference between the maximum selection probability and the minimum selection probability is less than a probability threshold.
[0115] In an optional design, the processing module 1020 is used to: if the first degree value d1 is greater than the number a of remaining unselected data blocks, then select d1-a data blocks with equal probability from the k data blocks, perform encoding on the a unselected data blocks and the d1-a data blocks selected with equal probability to generate a first encoding packet, and the communication module 1010 is used to send the first encoding packet.
[0116] In an optional design, the processing module 1020 is used to: if the first degree value d1 is greater than the number a of remaining unselected data blocks, then select d1-a data blocks with equal probability from the remaining ka selected data blocks, perform encoding on the a unselected data blocks and the d1-a data blocks selected with equal probability to generate a first encoding packet, and the communication module 1010 is used to send the first encoding packet.
[0117] Figure 11 This is a schematic diagram of the structure of another communication device provided in an embodiment of the present application. The communication device 1100 can be a chip, chip system, or processor, etc., which implements the above method in a first device. The communication device 1100 can be used to implement the method described in the above method embodiment. For details, please refer to the description of the above method embodiment.
[0118] like Figure 11 As shown, the communication device 1100 may include one or more processors 1110, which may also be referred to as processing units or processing modules, and may implement certain control functions. Processor 1110 may be a general-purpose processor or a dedicated processor, such as a baseband processor or a central processing unit. The baseband processor may be used to process communication protocols and communication data, while the central processing unit may be used to control the communication device 1100 (e.g., base station, baseband chip, user, user chip), execute software programs, and process software program data.
[0119] In an optional design, the processor 1110 may also store instructions and / or data, and the instructions and / or data can be executed by the processor 1110, so that the communication device 1100 executes the method described in the above method embodiment.
[0120] In another optional design, the communication device 1100 may include a communication interface 1120 for implementing receiving and transmitting functions. For example, the communication interface 1120 may be a transceiver circuit, an interface, an interface circuit, or a transceiver. The transceiver circuit, interface, interface circuit, or transceiver for implementing the receiving and transmitting functions may be separate or integrated. The transceiver circuit, interface, interface circuit, or transceiver may be used for reading and writing code / data, or the transceiver circuit, interface, interface circuit, or transceiver may be used for transmitting or delivering signals.
[0121] Optionally, the communication device 1100 may include one or more memories 1130, which may store instructions. These instructions may be executed on the processor 1110, causing the communication device 1100 to perform the method described in the above method embodiment. Optionally, the memory 1130 may also store data. Optionally, the processor 1110 may also store instructions and / or data. The processor 1110 and memory 1130 may be provided separately or integrated together.
[0122] It should be understood that, in one possible design, each step in the method embodiment provided in the present application can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0123] In one implementation, the communication device 1100 may correspond to the first device in the above-mentioned method embodiment and may be configured to execute the various steps and / or processes performed by the first device in the above-mentioned method embodiment. The processor 1110 may be configured to execute instructions stored in the memory 1130, and when the processor 1110 executes the instructions stored in the memory, the processor 1110 is configured to execute the various steps and / or processes of the above-mentioned method embodiment corresponding to the first device.
[0124] It should be understood that the processor may be one or more chips. For example, the processor may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0125] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0126] According to the method provided in the embodiment of the present application, the present application further provides a processor, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method of the embodiment of the present application.
[0127] In a specific implementation, the processor may be one or more chips, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a trigger, or various logic circuits. The input signal received by the input circuit may be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by a transmitter. The input circuit and the output circuit may be the same circuit, which functions as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation of the processor and various circuits.
[0128] Based on the methods provided in the embodiments of the present application, the present application also provides a chip system, which includes one or more processors configured to retrieve and execute instructions stored in a memory, thereby executing the methods of the embodiments of the present application. The chip system can be composed of a chip or can include a chip and other discrete devices.
[0129] Among them, the chip system may include an input circuit or interface for sending information or data, and an output circuit or interface for receiving information or data.
[0130] According to the method provided in the embodiment of the present application, the present application also provides a communication system, which includes the aforementioned first device and second device.
[0131] According to the method provided in the embodiments of the present application, the present application also provides a computer program product, which includes: computer program code, which, when running on a computer, enables the computer to execute the various steps or processes executed by the first device in any of the aforementioned method embodiments.
[0132] According to the method provided in the embodiments of the present application, the present application also provides a computer-readable storage medium, which stores program code. When the program code runs on a computer, the computer executes the various steps or processes executed by the first device in any of the aforementioned method embodiments.
[0133] The computer-readable storage medium may be the aforementioned volatile memory or non-volatile memory, or may include both volatile memory and non-volatile memory.
[0134] In the embodiments of this application, each term and English abbreviation is provided for convenience of description and shall not constitute any limitation to this application. This application does not exclude the possibility of defining other terms that can achieve the same or similar functions in existing or future agreements.
[0135] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part.
[0136] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0137] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0138] In short, the above description is only a preferred embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included in the scope of protection of this application.
Claims
1. A fountain code encoding method, characterized in that: Applied to a transmitter of raw data to be encoded, the method comprises: Obtain k data blocks according to the original data to be encoded; Randomly generate a first degree value d1, select d1 data blocks from the k data blocks in a preset order, perform encoding, and generate a first coded packet; wherein, if the first degree value d1 is greater than the number a of remaining unselected data blocks, then select d1-a data blocks with equal probability from the remaining ka selected data blocks, perform encoding on the a unselected data blocks and the d1-a data blocks selected with equal probability, and generate the first coded packet; send the first coded packet, and repeat this step until each data block is selected at least N times, where N is an integer greater than or equal to 1, and the degree value represents the number of data blocks required to encode and generate one coded packet; Randomly generate a second degree value d2, select d2 data blocks from the k data blocks according to the selection probability of each data block, perform encoding, generate a second coded packet, send the second coded packet, and repeat this step until the termination condition is met, where the selection probability of each data block is determined by the number of times each data block has been selected.
2. The method according to claim 1, characterized in that The smaller the number of times the data block has been selected, the greater the probability of the data block being selected, and the larger the number of times the data block has been selected, the smaller the probability of the data block being selected.
3. The method according to claim 2, characterized in that The selection probability of the i-th data block is equal to: ; is the number of times the i-th data block has been selected, 1≤i≤k, and i is an integer.
4. The method according to any one of claims 1 to 3, characterized in that The termination condition is satisfied, including: the total number of the coding packets is greater than or equal to a total number threshold.
5. The method according to claim 4, characterized in that The total threshold is equal to: , A parameter greater than or equal to 0.
6. The method according to any one of claims 1 to 3, characterized in that The termination condition is satisfied, including: among the k data blocks, the difference between the maximum selection probability and the minimum selection probability is less than a probability threshold.
7. The method according to any one of claims 1 to 3, characterized in that Also includes: If the first degree value d1 is greater than the number a of remaining unselected data blocks, d1-a data blocks are selected with equal probability from the k data blocks, encoding is performed on the a unselected data blocks and the d1-a data blocks selected with equal probability to generate the first coding packet, and the first coding packet is sent.
8. A communication device, characterized in that: The communication device comprises a processor and a memory, wherein the memory stores instructions, and when the processor executes the instructions, the communication device executes the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instructions are executed, the computer is caused to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Regular variable node degree fountain coding method
CN116633483A