Communication information arbitrary code distance coding set generation method and system
By calculating and mapping the state bit encoding relationship, a binary encoding set that satisfies any code distance is generated, which solves the problem of inefficient generation of encoding sets in the prior art, and realizes fast and efficient encoding set generation.
Patent Information
- Application Number
- CN202411986228.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-29
AI Technical Summary
The prior art is inefficient when generating binary code sets of any code distance, requiring multiple traversals, and cannot quickly generate code sets that meet the required code distance.
By collecting communication information, calculating the ST bit state bit encoding relationship, establishing a mapping table between data bits and status bits, and using the mapping table to calculate the encoding relationship of each state bit, generating 2N N-bit data bit encodings, forming an encoding set with a code distance of K.
It realizes the rapid generation of encoding sets that meet any code distance requirements, improves encoding efficiency, and can complete the generation of encoding sets in one traversal.
Smart Images

Figure CN119906524A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information coding technology, and in particular to a method and system for generating a binary code set with an arbitrary code distance. Background Art
[0002] In the process of information communication, coding is an important link. The same amount of information can generate very different amounts of data using different coding methods. In long-distance communications, such as satellite communications, due to the high transmission costs, if a set of coding sets can achieve both error detection and error correction, the communication costs can be greatly reduced. The same technology can also be used for wireless communication coding such as drone control, and for wired communications such as fiber optic communications.
[0003] In order to achieve K-bit error correction in a set of codes, the code distance of the code set needs to be 2K+1. At this time, 2K-bit error detection can also be achieved. For N binary bits, how to quickly generate a complete set of feasible code sets to meet the required code distance is an important basis for realizing remote data representation, communication and data storage. The current method for generating code sets with arbitrary code distances requires multiple traversals, which is inefficient. Summary of the invention
[0004] Purpose of the invention: In order to overcome the problem that the current methods for generating arbitrary code distance code sets require multiple traversals and are inefficient, the present invention provides a method for generating arbitrary code distance code sets for communication information.
[0005] Technical solution: To achieve the above purpose, the technical solution adopted by the present invention is:
[0006] A method for generating a communication information arbitrary code distance code set comprises the following steps:
[0007] Step 1: Collect communication information. Encode the communication information, and each encoded data bit is N bits. Find the minimum value of ST that satisfies the formula, where ST is a natural number, is a combination formula, N is the coded data bit, and K is the error correction bit in the code.
[0008] Step 2: Calculate the N ST-bit state bit coding relationship based on the communication information. The state bit coding relationship is that the number of 1s is not less than K-1, that is, any ST-bit state bit coding relationship S satisfies ∑(s i =1)≥K-1, where s i Represents the value of the i-th bit in the state bit S, i∈[0,ST-1].
[0009] Step 3: Represent the N data bits as: D N-1 ...D n…… D 0, where n∈[0,N-1], D n Indicates n data bits, D n Establish a mapping table with S(n), D n The corresponding S(n) is expressed as S(n) ST-1 ……S(n) i ……S(n) 0 .
[0010] Step 4, find out the encoding relationship of each state bit through the mapping table.
[0011] Step 5, List 2 N N bits of data are encoded Data(m), where m∈[0,2 N -1], according to the obtained relationship of each state bit encoding, the state bit encoding State(m) corresponding to each data bit encoding Data(m) is obtained, and the state bit encoding State(m) corresponding to the data bit encoding Data(m) is connected to form the N+ST bit encoding Code(m), that is, Code(m)=State(m)∪Data(m), where ∪ represents encoding connection, and the set of all the obtained encodings Code(m) is the encoding set with a code distance of K.
[0012] Preferred: The method for obtaining the encoding relationship of N ST-bit state bits in step 2 is:
[0013] Step 21, list the complete set of ST bit binary coding relationships, and obtain 2 ST A state bit encoding relationship.
[0014] Step 22, the obtained 2 ST The state bit coding relations in which the number of 1s is less than K-1 are deleted from the set to obtain available state bit coding relations.
[0015] Step 23, select N of the available state bit coding relations as the final state bit coding relations, expressed as {S(N-1), ..., S(n), ..., S(0)}, each state bit coding relation has ST bits, and each binary bit of S(n) is expressed as: S(n) ST-1 ……S(n) i ……S(n) 0 , where i∈[0,ST-1].
[0016] Preferably: each state bit encoding relation in step 4 is:
[0017] Preferred: The specific method in step 5:
[0018] Step 51, list the encoding table, including data bit encoding Data(m) and state bit encoding State(m), where m∈[0,2 N -1], each data bit is encoded by Bit to D 0 The bit consists of N bits, and each state bit is encoded by S ST-1 Bit to S 0 The bits are composed of ST bits.
[0019] Step 52, fill in 2 below the data bit code Data(m) in the coding table. N N-bit data bit encoding, according to the obtained relationship of each state bit encoding, find the S in the corresponding state bit encoding State(m) ST-1 Bit to S 0 The value of the bit is filled in the coding table, and we get 2 N The code set with a code distance of K is composed of codes.
[0020] Another object of the present invention is to provide a base communication information arbitrary code distance code set generation system, comprising a collection unit, an ST determination unit, a state bit coding relationship determination unit, a mapping table unit, a state bit coding relationship determination unit, and a code set determination unit, wherein:
[0021] The collecting unit is used for collecting communication information.
[0022] The ST determination unit is used to encode the communication information, each encoded data bit is N bits, according to Find the minimum value of ST that satisfies the formula, where ST is a natural number, is a combination formula, N is the coded data bit, and K is the error correction bit in the code.
[0023] The state bit coding relationship determination unit is used to obtain N ST-bit state bit coding relationships according to the communication information, and the state bit coding relationship is that the number of 1s is not less than K-1, that is, any ST-bit state bit coding relationship S satisfies ∑(s i =1)≥K-1, where s i Represents the value of the i-th bit in the state bit S, i∈[0,ST-1].
[0024] The mapping table unit is used to represent N data bits as: N-1 ...D n…… D 0 , where n∈[0,N-1], D n Indicates n data bits, D n Establish a mapping table with S(n), D n The corresponding S(n) is expressed as S(n) ST-1 ……S(n)i ……S(n) 0 .
[0025] The state bit coding relationship determination unit is used to obtain each state bit coding relationship through a mapping table.
[0026] The encoding set determination unit is used to list 2 N N bits of data are encoded Data(m), where m∈[0,2 N -1], according to the obtained relationship of each state bit encoding, the state bit encoding State(m) corresponding to each data bit encoding Data(m) is obtained, and the state bit encoding State(m) corresponding to the data bit encoding Data(m) is connected to form the N+ST bit encoding Code(m), that is, Code(m)=State(m)∪Data(m), where ∪ represents encoding connection, and the set of all the obtained encodings Code(m) is the encoding set with a code distance of K.
[0027] Preferably: the ST determination unit includes a state bit coding relationship module, an available state bit coding relationship module, and a final state bit coding relationship module, wherein:
[0028] The state bit coding relationship module is used to list the complete set of ST bit binary coding relationships, and a total of 2 ST A state bit encoding relationship.
[0029] The available state bit encoding relationship module is used to obtain 2 ST The state bit coding relations in which the number of 1s is less than K-1 are deleted from the set to obtain available state bit coding relations.
[0030] The final state bit coding relationship module is used to select N of the available state bit coding relationships as the final state bit coding relationships, which are expressed as {S(N-1), ..., S(n), ..., S(0)}. Each state bit coding relationship has ST bits, and each binary bit of S(n) is expressed as: S(n) ST -1……S(n) i ……S(n) 0 , where i∈[0,ST-1].
[0031] Preferably: the coding set determination unit includes a coding table listing module and a data bit encoding module, wherein:
[0032] The coding table listing module is used to list the coding table, including data bit code Data(m) and state bit code State(m), where m∈[0,2 N -1], each data bit is encoded by D 2N-1 Bit to D0 The bit consists of N bits, and each state bit is encoded by S ST-1 Bit to S 0 The bits are composed of ST bits.
[0033] The data bit encoding module is used to fill in 2 below the data bit encoding Data(m) in the encoding table. N N-bit data bit encoding, according to the obtained relationship of each state bit encoding, find the S in the corresponding state bit encoding State(m) ST-1 Bit to S 0 The value of the bit is filled in the coding table, and we get 2 N The code set with a code distance of K is composed of codes.
[0034] Another object of the present invention is to provide an electronic device, comprising: at least one processor, at least one memory and a communication interface. The processor, memory and communication interface communicate with each other. The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the communication information arbitrary code distance coding set generation method.
[0035] Another object of the present invention is to provide a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to execute the method for generating an arbitrary code distance coding set for communication information.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] (1) It can generate the shortest code set that meets any code distance requirement and meets the number of code sets;
[0038] (2) The coding set generation method is expressed in a simple mathematical formula to facilitate fast calculation and matching;
[0039] (3) The generation of the coding set is completed through a single traversal, which is theoretically optimal and greatly improves the coding efficiency;
[0040] (4) The state bit encoding and data bit encoding can be freely matched to form different mapping relationships, which facilitates the generation of different encoding sets to meet actual needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 The present invention is a flowchart of a method for generating an arbitrary code distance coding set for communication information. DETAILED DESCRIPTION
[0042] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these examples are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.
[0043] A method for generating a communication information arbitrary code distance code set, such as Figure 1 As shown, to generate 2 N The code set with a code distance of K composed of codes includes the following steps:
[0044] Step 1: Collect communication information. Encode the communication information. N It can be seen that the code set consists of N codes, and the data bits of each code in the code set are N bits. Find the minimum value of ST that satisfies the formula, where ST is a natural number, is a combination formula, N is the coded data bit, and K is the error correction bit in the code.
[0045] Step 2: Calculate the N ST-bit state bit coding relationship based on the communication information. The state bit coding relationship is that the number of 1s is not less than K-1, that is, any ST-bit state bit coding relationship S satisfies ∑(s i =1)≥K-1, where s i Represents the value of the i-th bit in the state bit S, i∈[0,ST-1].
[0046] In another embodiment, a method for obtaining a coding relationship between N ST bits includes the following steps:
[0047] Step 21, list the complete set of ST bit binary coding relationships, and obtain 2 ST A state bit encoding relationship.
[0048] Step 22, the obtained 2 ST The state bit coding relations in which the number of 1s is less than K-1 are deleted from the set to obtain available state bit coding relations.
[0049] Step 23, select N of the available state bit coding relations as the final state bit coding relations, expressed as {S(N-1), ..., S(n), ..., S(0)}, each state bit coding relation has ST bits, and each binary bit of S(n) is expressed as: S(n) ST-1 ……S(n) i ……S(n) 0 , where i∈[0,ST-1].
[0050] Step 3: Represent the N data bits as: D N-1 ...D n…… D0 , where n∈[0,N-1], D n Indicates n data bits, D n Establish a mapping table with S(n), D n The corresponding S(n) is expressed as S(n) ST-1 ……S(n) i ……S(n) 0 .
[0051] Step 4, find out the encoding relationship of each state bit through the mapping table:
[0052] Each state bit encodes the relationship: ∑ is the sum (or XOR) of the binary numbers modulo 2.
[0053] Step 5, List 2 N N bits of data are encoded Data(m), where m∈[0,2 N -1], according to the obtained relationship of each state bit encoding, the state bit encoding State(m) corresponding to each data bit encoding Data(m) is obtained, and the state bit encoding State(m) corresponding to the data bit encoding Data(m) is connected to form the N+ST bit encoding Code(m), that is, Code(m)=State(m)∪Data(m), where ∪ represents encoding connection, and the set of all the obtained encodings Code(m) is the encoding set with a code distance of K.
[0054] In another embodiment, the specific method in step 5 is as follows:
[0055] Step 51, list the encoding table, including data bit encoding Data(m) and state bit encoding State(m), where m∈[0,2 N -1], each data bit is encoded by Bit to D 0 The bit consists of N bits, and each state bit is encoded by S ST-1 Bit to S 0 The bits are composed of ST bits.
[0056] Step 52, fill in 2 below the data bit code Data(m) in the coding table. N N-bit data bit encoding, according to the obtained relationship of each state bit encoding, find the S in the corresponding state bit encoding State(m) ST-1 Bit to S 0 The value of the bit is filled in the coding table, and we get 2 N The code set with a code distance of K is composed of codes.
[0057] In another embodiment, a base communication information arbitrary code distance code set generation system is provided, including a collection unit, an ST determination unit, a state bit code relationship determination unit, a mapping table unit, a state bit code relationship determination unit, and a code set determination unit, wherein:
[0058] The collecting unit is used for collecting communication information.
[0059] The ST determination unit is used to encode the communication information, each encoded data bit is N bits, according to Find the minimum value of ST that satisfies the formula, where ST is a natural number, is a combination formula, N is the coded data bit, and K is the error correction bit in the code.
[0060] In another embodiment, the ST determination unit includes a state bit encoding relationship module, an available state bit encoding relationship module, and a final state bit encoding relationship module, wherein:
[0061] The state bit coding relationship module is used to list the complete set of ST bit binary coding relationships, and a total of 2 ST A state bit encoding relationship.
[0062] The available state bit encoding relationship module is used to obtain 2 ST The state bit coding relations in which the number of 1s is less than K-1 are deleted from the set to obtain available state bit coding relations.
[0063] The final state bit coding relationship module is used to select N of the available state bit coding relationships as the final state bit coding relationships, which are expressed as {S(N-1), ..., S(n), ..., S(0)}. Each state bit coding relationship has ST bits, and each binary bit of S(n) is expressed as: S(n) ST-1 ……S(n) i ……S(n) 0 , where i∈[0,ST-1].
[0064] The state bit coding relationship determination unit is used to obtain N ST-bit state bit coding relationships according to the communication information, and the state bit coding relationship is that the number of 1s is not less than K-1, that is, any ST-bit state bit coding relationship S satisfies ∑(s i =1)≥K-1, where s i Represents the value of the i-th bit in the state bit S, i∈[0,ST-1].
[0065] The mapping table unit is used to represent N data bits as: N-1 ...D n…… D 0 , where n∈[0,N-1], Dn Indicates n data bits, D n Establish a mapping table with S(n), D n The corresponding S(n) is expressed as S(n) ST-1 ……S(n) i ……S(n) 0 .
[0066] The state bit coding relationship determination unit is used to obtain each state bit coding relationship through a mapping table.
[0067] The encoding set determination unit is used to list 2 N N bits of data are encoded Data(m), where m∈[0,2 N -1], according to the obtained relationship of each state bit encoding, the state bit encoding State(m) corresponding to each data bit encoding Data(m) is obtained, and the state bit encoding State(m) corresponding to the data bit encoding Data(m) is connected to form the N+ST bit encoding Code(m), that is, Code(m)=State(m)∪Data(m), where ∪ represents encoding connection, and the set of all the obtained encodings Code(m) is the encoding set with a code distance of K.
[0068] In another embodiment, the coding set determination unit includes a coding table listing module and a data bit encoding module, wherein:
[0069] The coding table listing module is used to list the coding table, including data bit code Data(m) and state bit code State(m), where m∈[0,2 N -1], each data bit is encoded by Bit to D 0 The bit consists of N bits, and each state bit is encoded by S ST-1 Bit to S 0 The bits are composed of ST bits.
[0070] The data bit encoding module is used to fill in 2 below the data bit encoding Data(m) in the encoding table. N N-bit data bit encoding, according to the obtained relationship of each state bit encoding, find the S in the corresponding state bit encoding State(m) ST-1 Bit to S 0 The value of the bit is filled in the coding table, and we get 2 N The code set with a code distance of K is composed of codes.
[0071] In another embodiment, an electronic device is provided, comprising: at least one processor, at least one memory and a communication interface. The processor, the memory and the communication interface communicate with each other. The memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the communication information arbitrary code distance coding set generation method.
[0072] In another embodiment, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to execute the communication information arbitrary code distance coding set generation method.
[0073] Examples
[0074] This example provides a method for generating a communication information arbitrary code distance code set for a code set with a code distance of K=4 and N=16. The specific steps are as follows:
[0075] Step 1: From 2 N It can be seen that the code set consists of N codes, and the data bits of each code in the code set are N bits. Find the minimum value of ST that satisfies the formula, where ST is a natural number; is the combination formula;
[0076] Depend on and Get ST=5.
[0077] Step 2: Find 16 5-bit state bit coding relationships. The characteristic of the state bit coding relationship is that the number of 1s is not less than 3, that is, any 5-bit state bit coding relationship S satisfies ∑(s i =1)≥k-1, where s i Represents the value of the i-th bit in the state bit S, i∈[0,ST-1].
[0078] (2.1) List the complete set of 5-bit binary coding relations, as shown in Table 1, and obtain 2 5 =32 kinds of state bit encoding relationships;
[0079] Table 1 Status bit encoding set
[0080]
[0081]
[0082] (2.2) The obtained 2 ST The state bit coding relations in which the number of 1s in the state bit coding relations is less than K-1 are deleted from the set, as shown in Table 2, and the available state bit coding relations are obtained;
[0083] Table 2 Available status bit encoding sets
[0084]
[0085]
[0086] (2.3) Select any N of the available state bit encoding relations as the final state bit encoding relations, as shown in Table 3, represented as {S(N-1), ..., S(n), ..., S(0)}, each state bit encoding relation has ST bits, and each binary bit of S(n) is represented as: S(n) ST-1 ……S(n) i ……S(n) 0 , where i∈[0,ST-1].
[0087] Table 3 Final state bit encoding relationship
[0088]
[0089]
[0090] Step 3: Represent the N data bits as: D N-1 ...D n…… D 0 , where n∈[0,N-1], D n Establish a mapping table with S(n), as shown in Table 4, D n The corresponding S(n) is expressed as S(n) ST-1 ……S(n) i ……S(n) 0 ;
[0091] Table 4 Data bit and final state bit encoding relationship mapping table
[0092]
[0093] Step 4: Use the mapping table to find the encoding relationship of each state bit according to the following formula:
[0094]
[0095] Where ∑ is the sum of binary modulo 2 (or XOR);
[0096]
[0097]
[0098]
[0099]
[0100]
[0101] Step 5: List 2 N N bits of data are encoded Data(m), where m∈[0,2 N -1], according to the obtained relationship of each state bit encoding, the state bit encoding State(m) corresponding to each data bit encoding Data(m) is obtained, and the state bit encoding State(m) corresponding to the data bit encoding Data(m) is connected to form the N+ST bit encoding Code(m), that is, Code(m)=State(m)∪Data(m), where ∪ represents encoding connection, and the set of all the obtained encodings Code(m) is the encoding set with a code distance of K.
[0102] (5.1) List the coding table, as shown in Table 5, including data bit coding Data(m) and state bit coding State(m), where m∈[0,2 N -1], each data bit is encoded by Bit to D 0 The bit consists of N bits, and each state bit is encoded by S ST-1 Bit to S 0 The bits are composed of ST bits;
[0103] Table 5 Coding table empty table
[0104]
[0105] (5.2), as shown in Table 6, fill in 2 under the data bit code Data(m) in the coding table. N N data bits are encoded;
[0106] Table 6 Coding table - filled data positions
[0107]
[0108] (5.3) According to the obtained relationship of each state bit encoding, find the S in the corresponding state bit encoding State(m). ST-1 Bit to S 0 The value of the bit is filled in the coding table, and we get 2 N The code set with a code distance of K is composed of codes.
[0109] According to the encoding relationship of each state bit that has been obtained:
[0110]
[0111]
[0112]
[0113]
[0114]
[0115] When Data(m)=0000000000000000,
[0116]
[0117]
[0118]
[0119]
[0120]
[0121] When Data(m)=0000000000000001,
[0122]
[0123]
[0124]
[0125]
[0126]
[0127] When Data(m)=0110001011001111,
[0128]
[0129]
[0130]
[0131]
[0132]
[0133] When Data(m)=1111111111111110,
[0134]
[0135]
[0136]
[0137]
[0138]
[0139] When Data(m)=1111111111111111,
[0140]
[0141]
[0142]
[0143]
[0144]
[0145] Fill the obtained values into the table, as shown in Table 7, and get 2 N The code set with a code distance of K is composed of codes.
[0146] Table 7 2 N The codes form a table with a code distance of K.
[0147]
[0148] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for generating a communication information arbitrary code distance code set, characterized in that: The following steps are involved: Step 1, collect communication information; encode the communication information, each encoded data bit is N bits, according to Find the minimum value of ST that satisfies the formula, where ST is a natural number, is a combination formula, N is the coded data bit, K is the error correction bit in the code; Step 2: Calculate the N ST-bit state bit coding relationship based on the communication information. The state bit coding relationship is that the number of 1s is not less than K-1, that is, any ST-bit state bit coding relationship S satisfies ∑(s i =1)≥K-1, where s i Represents the value of the i-th bit in the state bit S, i∈[0,ST-1]; Step 3: Represent the N data bits as: D N-1 ...D n…… D0, where n∈[0,N-1], D n Indicates n data bits, D n Establish a mapping table with S(n), D n The corresponding S(n) is expressed as S(n) ST-1 ……S(n) i ...S(n)0; Step 4, find out the encoding relationship of each state bit through the mapping table; Step 5, List 2 N N bits of data are encoded Data(m), where m∈[0,2 N -1], according to the obtained relationship of each state bit encoding, the state bit encoding State(m) corresponding to each data bit encoding Data(m) is obtained, and the state bit encoding State(m) corresponding to the data bit encoding Data(m) is connected to form the N+ST bit encoding Code(m), that is, Code(m)=State(m)∪Data(m), where ∪ represents encoding connection, and the set of all the obtained encodings Code(m) is the encoding set with a code distance of K.
2. The method for generating a communication information arbitrary code distance code set according to claim 1, characterized in that: The method for finding the encoding relationship of N ST bits in step 2 is: Step 21, list the complete set of ST bit binary coding relationships, and obtain 2 ST The state bit encoding relationship; Step 22, the obtained 2 ST The state bit coding relations in which the number of 1s in the state bit coding relations is less than K-1 are deleted from the set to obtain the available state bit coding relations; Step 23, select N of the available state bit coding relations as the final state bit coding relations, expressed as {S(N-1), ..., S(n), ..., S(0)}, each state bit coding relation has ST bits, and each binary bit of S(n) is expressed as: S(n) ST-1 ……S(n) i ...S(n)0, where i∈[0,ST-1].
3. The method for generating a communication information arbitrary code distance code set according to claim 2, characterized in that: The encoding relationship of each state bit in step 4 is: i∈[0,ST-1], n∈[0,N-1].
4. The method for generating a communication information arbitrary code distance code set according to claim 3, characterized in that: Specific method in step 5: Step 51, list the encoding table, including data bit encoding Data(m) and state bit encoding State(m), where m∈[0,2 N -1], each data bit is encoded by The state bit is composed of N bits from S to D0, and each state bit is encoded by S ST-1 The bits from bit 1 to bit 0 constitute a total of ST bits; Step 52, fill in 2 below the data bit code Data(m) in the coding table. N N-bit data bit encoding, according to the obtained relationship of each state bit encoding, find the S in the corresponding state bit encoding State(m) ST-1 The values from bit 1 to bit S0 are filled into the coding table to get 2 N The code set with a code distance of K is composed of codes.
5. A generation system based on the communication information arbitrary code distance coding set generation method according to claim 1, characterized in that: It includes a collection unit, an ST determination unit, a state bit coding relationship determination unit, a mapping table unit, a state bit coding relationship determination unit, and a coding set determination unit, wherein: The collection unit is used to collect communication information; The ST determination unit is used to encode the communication information, each encoded data bit is N bits, according to Find the minimum value of ST that satisfies the formula, where ST is a natural number, is a combination formula, N is the coded data bit, K is the error correction bit in the code; The state bit coding relationship determination unit is used to obtain N ST-bit state bit coding relationships according to the communication information, and the state bit coding relationship is that the number of 1s is not less than K-1, that is, any ST-bit state bit coding relationship S satisfies ∑(s i =1)≥K-1, where s i Represents the value of the i-th bit in the state bit S, i∈[0,ST-1]; The mapping table unit is used to represent N data bits as: N-1 ...D n…… D0, where n∈[0,N-1], D n Indicates n data bits, D n Establish a mapping table with S(n), D n The corresponding S(n) is expressed as S(n) ST-1 ……S(n) i ...S(n)0; The state bit coding relation determination unit is used to obtain each state bit coding relation through a mapping table; The encoding set determination unit is used to list 2 N N bits of data are encoded Data(m), where m∈[0,2 N -1], according to the obtained relationship of each state bit encoding, the state bit encoding State(m) corresponding to each data bit encoding Data(m) is obtained, and the state bit encoding State(m) corresponding to the data bit encoding Data(m) is connected to form the N+ST bit encoding Code(m), that is, Code(m)=State(m)∪Data(m), where ∪ represents encoding connection, and the set of all the obtained encodings Code(m) is the encoding set with a code distance of K.
6. The generation system according to claim 5, characterized in that: The ST determination unit includes a state bit coding relationship module, an available state bit coding relationship module, and a final state bit coding relationship module, wherein: The state bit coding relationship module is used to list the complete set of ST bit binary coding relationships, and a total of 2 ST The state bit encoding relationship; The available state bit encoding relationship module is used to obtain 2 ST The state bit coding relations in which the number of 1s in the state bit coding relations is less than K-1 are deleted from the set to obtain the available state bit coding relations; The final state bit coding relationship module is used to select N of the available state bit coding relationships as the final state bit coding relationships, which are expressed as {S(N-1), ..., S(n), ..., S(0)}. Each state bit coding relationship has ST bits, and each binary bit of S(n) is expressed as: S(n) ST-1 ……S(n) i ...S(n)0, where i∈[0,ST-1].
7. The generation system according to claim 6, characterized in that: The coding set determination unit includes a coding table listing module and a data bit encoding module, wherein: The coding table listing module is used to list the coding table, including data bit code Data(m) and state bit code State(m), where m∈[0,2 N -1], each data bit is encoded by D 2N-1 The state bit is composed of N bits from S to D0, and each state bit is encoded by S ST-1 The bits from bit 1 to bit 0 constitute a total of ST bits; The data bit encoding module is used to fill in 2 below the data bit encoding Data(m) in the encoding table. N N-bit data bit encoding, according to the obtained relationship of each state bit encoding, find the S in the corresponding state bit encoding State(m) ST-1 The values from bit 1 to bit S0 are filled into the coding table to get 2 N The code set with a code distance of K is composed of codes.
8. An electronic device, characterized in that: include: at least one processor, at least one memory, and a communication interface; The processor, memory and communication interface communicate with each other; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method for generating an arbitrary code distance coding set for communication information according to any one of claims 1-4.
9. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method for generating an arbitrary code distance coding set for communication information as claimed in any one of claims 1 to 4.