Data coding method and device, terminal and storage medium

By dividing the data to be encoded into multiple data packets and converting them into matrix form using a preset encoding operation table, the problems of intensive calculation and low efficiency in the existing technology are solved, and efficient data encoding is achieved.

CN118868960APending Publication Date: 2024-10-29UNIV OF SCI & TECH BEIJING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410914409.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Existing data encoding technologies are computationally intensive in practical applications, resulting in high processor performance requirements and high computational overhead, especially in forward error correction encoding and advanced image and video compression encoding with low efficiency.

Method used

By dividing the data to be encoded into multiple data packets, generating coding expressions based on the preset coding matrix and extended domain elements, and using the preset coding operation table to convert the extended domain elements into matrix form, the matrix representation of the high-dimensional extended domain is achieved. , thereby reducing computational overhead and improving coding efficiency.

Benefits of technology

It greatly reduces the computational overhead in the data encoding process and improves the encoding efficiency. The computational overhead is only 1/L of traditional matrix operations, achieving a high-efficiency encoding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118868960A_ABST
    Figure CN118868960A_ABST
Patent Text Reader

Abstract

The invention discloses a data coding method and device, a terminal and a storage medium. The method comprises the following steps: dividing to-be-coded data into at least two first data packets; a coding expression is determined based on a preset coding matrix and the first data packet, and elements in the preset coding matrix are the extension field elements; converting the extension field elements into an extension field element matrix based on a preset coding operation table; and based on the coding expression, according to the extension field element matrix and the first data packet, obtaining a target coding data packet. The invention aims to encode the data in the application scene through the high-dimensional extension field, reduce the calculation overhead of the data in the encoding process and improve the encoding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data encoding method, device, terminal and storage medium. Background Art

[0002] Data coding is ubiquitous in the field of information technology and communications. It is the cornerstone of data processing, storage, transmission and security. Different application scenarios require different coding schemes to meet specific requirements, such as efficiency, security, error detection and correction capabilities, etc.

[0003] However, current data coding technologies have some defects in practical applications. For example, forward error correction coding (FEC), including Turbo codes, LDPC codes, and RS codes, can effectively improve transmission reliability, but the decoding process is computationally intensive, requires high processor performance, and has extremely high computational overhead. Advanced image and video compression coding, such as H.264 / H.265, uses complex prediction, transform, and entropy coding mechanisms to achieve a higher compression ratio, resulting in longer encoding and decoding time and lower efficiency. Summary of the invention

[0004] The main purpose of the present application is to provide a data encoding method, device, terminal and storage medium, which aims to encode data in application scenarios through a high-dimensional extension domain, reduce the computational overhead of data during the encoding process, and improve encoding efficiency.

[0005] To achieve the above object, the present application provides a method, which comprises:

[0006] Divide the data to be encoded into at least two first data packets, wherein the symbols of the first data packets are extended domain elements in a preset extended domain corresponding to the data to be encoded, and the preset extended domain is an extended domain generated according to an application scenario of the data to be encoded;

[0007] Determine a coding expression based on a preset coding matrix and the first data packet, wherein the elements in the preset coding matrix are the extended domain elements, and the coding expression is used to calculate a target coded data packet;

[0008] Based on a preset coding operation table, converting the extended domain element into an extended domain element matrix;

[0009] Based on the coding expression, according to the extended domain element matrix and the first data packet, a target coding data packet is obtained.

[0010] Specifically, before converting the extended domain element into an extended domain element matrix based on a preset coding operation table, the method further includes:

[0011] Based on the primitive polynomial corresponding to the preset extended domain, generating an adjoint matrix corresponding to the primitive polynomial;

[0012] Based on the adjoint matrix, the preset encoding operation table is created.

[0013] Specifically, the adjoint matrix is ​​expressed by the following expression:

[0014]

[0015] Where C represents the adjoint matrix, a 0 、a 1 , …, a L-1 are the coefficients in the primitive polynomial, L represents the order of the adjoint matrix, and I represents the preset L-1 order unit matrix.

[0016] Specifically, the coding expression is:

[0017] c j =∑ 1≤i≤k,1≤j≤n g ij m i

[0018] Among them, c j represents the second data packet, j represents the number of columns of the preset coding matrix, i represents the number of rows of the preset coding matrix, k represents the number of the first data packets, g ij represents the element of the preset coding matrix, m i Represents the first data packet.

[0019] Specifically, the number of the second data packets is at least 1, each second data packet corresponds one-to-one to each column in the preset coding matrix, and the second data packets correspond one-to-one to the target coding data packets;

[0020] The step of obtaining a target coded data packet based on the coded expression and according to the extended domain element matrix and the first data packet comprises:

[0021] Based on the coding expression, each column in the preset coding matrix is ​​traversed, and each target coding data packet corresponding to each column in the preset coding matrix is ​​calculated and obtained respectively.

[0022] Specifically, the number of rows of the preset coding matrix is ​​equal to the number of the first data packets;

[0023] Determining a coding expression based on a preset coding matrix and the first data packet includes:

[0024] combining the first data packets into a first data packet matrix;

[0025] The first data packet matrix is ​​multiplied by the preset coding matrix to obtain a calculation result, and the coding expression is determined based on the calculation result, wherein the number of the second data packets is equal to the number of columns of the preset coding matrix, and the length of the second data packet is the same as the length of the first data packet.

[0026] Specifically, the extended domain elements include non-zero elements and zero elements, and the extended domain element matrix includes a non-zero element matrix and a zero matrix;

[0027] The step of converting the extended domain element into an extended domain element matrix based on a preset coding operation table includes:

[0028] Based on the size of the preset encoding operation table, converting the non-zero elements into the non-zero element matrix;

[0029] Based on the size of the preset encoding operation table, the zero elements are converted into the zero matrix, wherein the size of the non-zero element matrix is ​​the same as the size of the zero matrix.

[0030] To achieve the above object, the present application also provides a data encoding device, the device comprising:

[0031] A first unit is configured to divide the data to be encoded into at least two first data packets, wherein the symbols of the first data packets are extended domain elements in a preset extended domain corresponding to the data to be encoded, and the preset extended domain is an extended domain generated according to an application scenario of the data to be encoded;

[0032] A second unit is configured to determine a coding expression based on a preset coding matrix and the first data packet, wherein the elements in the preset coding matrix are the extended domain elements;

[0033] A third unit is used to convert the extended domain element into an extended domain element matrix based on a preset coding operation table;

[0034] The fourth unit is used to obtain a target coded data packet based on the coding expression, the extended domain element matrix and the first data packet.

[0035] To achieve the above-mentioned purpose, the present application also provides a terminal, including a memory storing multiple instructions; the processor loads instructions from the memory to execute the steps in any one of the methods provided in the present application.

[0036] To achieve the above objectives, the present application also provides a storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the steps in any method provided in the present application.

[0037] The present application provides a data encoding method, device, terminal and storage medium, which can first divide the data to be encoded into at least two first data packets; then, based on a preset encoding matrix and the first data packet, determine a coding expression, wherein the elements in the preset encoding matrix are the extended domain elements; based on a preset encoding operation table, convert the extended domain elements into an extended domain element matrix to achieve a matrix representation of a high-dimensional extended domain; finally, based on the encoding expression, according to the extended domain element matrix and the first data packet, obtain a target coded data packet, which can greatly reduce the computational overhead and achieve a high-efficiency coding process, that is, using the preset encoding operation table, the extended domain GF(p L ) in the matrix form. Compared with the traditional matrix addition and multiplication based on GF(p), the computational overhead of using the preset encoding operation table is only 1 / L of the traditional matrix operation method.

[0038] The present application can encode and process the data in the application scenario through a high-dimensional extension domain, thereby reducing the computational overhead of the data during the encoding process and improving the encoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A schematic diagram of a process flow provided for an embodiment of the present application;

[0040] Figure 2 A schematic diagram of a coding operation table provided in an embodiment of the present application;

[0041] Figure 3 A schematic diagram of the structure of a data encoding device provided in an embodiment of the present application;

[0042] Figure 4 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0044] Due to some defects in the actual application of current data coding technology, for example, forward error correction coding (FEC), including Turbo code, LDPC code and RS code, can effectively improve transmission reliability, but the decoding process is computationally intensive, requires high processor performance, and has extremely high computational overhead; advanced image and video compression coding, such as H.264 / H.265, uses complex prediction, transformation and entropy coding mechanisms to achieve a higher compression ratio, resulting in longer encoding and decoding time and lower efficiency.

[0045] Therefore, the embodiments of the present application provide a data encoding method, device, terminal and storage medium to solve practical technical problems.

[0046] In some embodiments, the device may be specifically integrated into an electronic device, which may be a terminal, a server or other device.

[0047] In some embodiments, the server may also be implemented in the form of a terminal.

[0048] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0049] The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0050] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0051] An embodiment of the present application provides a data encoding method, which can encode data in an application scenario through a high-dimensional extension domain, reduce the computational overhead of the data during the encoding process, and improve the encoding efficiency.

[0052] like Figure 1 As shown, the specific process of the method can be as follows:

[0053] S110. Divide the data to be encoded into at least two first data packets, wherein the symbols of the first data packets are extended domain elements in a preset extended domain corresponding to the data to be encoded, and the preset extended domain is an extended domain generated according to an application scenario of the data to be encoded.

[0054] In mathematics and information science, especially in the fields of coding theory, cryptography, and digital signal processing, an extended field usually refers to a larger field formed by expanding a basic field. The basic field is often a finite field. A finite field, also known as a Galois field, is a field with a finite number of elements.

[0055] In some embodiments, the data to be encoded may be one of several batches of data, and the preset extension domain is generated based on the application scenario of the data to be encoded. For example, the data to be encoded may be video feature data for video transmission. When video transmission is required, the video feature data is encoded to facilitate video communication transmission.

[0056] Specifically, the data to be encoded may be a relatively long piece of data, and the data to be encoded may be grouped in a preset grouping manner to obtain grouped data, and then each group of grouped data may be encoded using the method.

[0057] S120. Determine a coding expression based on a preset coding matrix and the first data packet, wherein the elements in the preset coding matrix are the extended domain elements, and the coding expression is used to calculate a target coded data packet.

[0058] In some embodiments, the number of rows of the preset coding matrix is ​​equal to the number of the first data packets;

[0059] The determining of the coding expression based on the preset coding matrix and the first data packet includes the following steps S121 to S122:

[0060] S121. Combine first data packets into a first data packet matrix.

[0061] S122. Multiply the first data packet matrix by the preset coding matrix to obtain a calculation result, and determine the coding expression based on the calculation result, wherein the number of second data packets is equal to the number of columns of the preset coding matrix, and the length of the second data packet is the same as the length of the first data packet.

[0062] In some embodiments, the coded expression is:

[0063] c j =∑ 1≤i≤k,1≤j≤n g ij m i

[0064] Among them, c jrepresents the second data packet, j represents the number of columns of the preset coding matrix, i represents the number of rows of the preset coding matrix, k represents the number of the first data packets, g ij represents the element of the preset coding matrix, m i Represents the first data packet.

[0065] Specifically, k first data packets of length M are encoded by a preset encoding matrix G with k rows and n columns = [g ij ] k×n , determine n second data packets c of length M 1 ,c 2 ,…,c n The corresponding calculation expressions are: ij are the preset extension domain GF(p L ) in the element. It can be known from the calculation expression that each second data packet requires kM times of inter-symbol multiplication and (k-1)M times of inter-symbol addition operations.

[0066] S130. Convert the extended domain element into an extended domain element matrix based on a preset coding operation table.

[0067] In some embodiments, before converting the extended domain element into an extended domain element matrix based on a preset coding operation table, the method further includes steps T110 to T120 as shown below:

[0068] T110. Based on the primitive polynomial corresponding to the preset extended domain, generate a companion matrix corresponding to the primitive polynomial.

[0069] In some embodiments, based on the matrix representation of the extended domain, the preset extended domain is GF(p L ), using GF(p L ) corresponds to the primitive polynomial p(x) = a 0 +a 1 x+a 2 x 2 +…+a L-1 x L-1 +x L To represent the adjoint matrix, the adjoint matrix is ​​represented by the following expression:

[0070]

[0071] Where C represents the adjoint matrix, a 0 、a 1 , …, a L-1 are the coefficients in the primitive polynomial, L represents the order of the adjoint matrix, and I represents the preset L-1 order unit matrix.

[0072] Specifically, GF(p L ) L The elements can be expressed in matrix form as And L matrix sets {I L ,C,C 2 ,…,C L-1} is GF(p L ) is a basis over the finite field GF(p).

[0073] T120. Create the preset coding operation table based on the companion matrix.

[0074] In some embodiments, based on the companion matrix C, a matrix based on the preset extension field GF(p L ), the dimension is L×(p L -1) of the preset coding operation table.

[0075] Specifically, the dimension is L×(p L -1), where the first column is a unit column vector [10 … 0] of length L. T , the 2nd to (L+1)th columns are the preset coding matrix C. The (L+2)th column From the (L+1)th column parameter [-a 0 -a 1 … -a L-1 ] T Calculated based on the following formula:

[0076]

[0077] After that, the (L+s+1)th column is recursively obtained from the (L+s)th column:

[0078]

[0079] The p in the preset coding operation table L -1 columns are all different from each other and constitute exactly p in the L-dimensional linear space based on GF(p) L -1 non-zero column vector. Compared to storing p separately L -1 L×L matrix based on GF(p), the preset encoding operation table has obvious advantages in element matrix representation, and its storage overhead is only 1 / L of the previous one.

[0080] In some embodiments, the extended domain elements include non-zero elements and zero elements, and the extended domain element matrix includes a non-zero element matrix and a zero matrix;

[0081] The step of converting the extended domain element into an extended domain element matrix based on a preset coding operation table includes the following steps S131 to S132:

[0082] S131. Based on the size of the preset encoding operation table, convert the non-zero elements into the non-zero element matrix.

[0083] S132. Based on the size of the preset coding operation table, convert the zero elements into the zero matrix, wherein the size of the non-zero element matrix is ​​the same as the size of the zero matrix.

[0084] In some embodiments, the preset coding operation table is used to represent the non-zero extended domain elements involved in the calculation expression in a matrix form, and the zero elements are represented by an L×L zero matrix.

[0085] Specifically, when 0≤t≤p L -2, the (t+1)th column vector v in the preset operation table t As an extended domain base {I L ,C,C 2 ,…,C L-1}, then we have:

[0086] C t =[I L CC 2 ... C L-1 ]v t

[0087] Since the vectors in the preset encoding table are different from each other, they are different from the matrix There is a one-to-one correspondence. When representing, the vector v in the (t+1)th column of the preset encoding operation table is t First, the first column of the matrix Ct is constructed, and the subsequent (t+2)th to (t+Lth)th columns of the preset coding operation table [v t+1 v t+2 …v t+L-1 ], which corresponds to the subsequent 2 to L columns that constitute Ct, that is, the matrix C t =[v t v t+1 v t+2 … v t+L-1 ]. It should be noted that when j+L-1>p L When -1, the subscript needs to be modulo p L -1 operation, that is, looping back from the rightmost side of the preset coding operation table to the leftmost side, selecting the corresponding column number to complete the matrix construction.

[0088] S140. Based on the coding expression, according to the extended domain element matrix and the first data packet, obtain a target coding data packet.

[0089] In some embodiments, the number of the second data packets is at least 1, each second data packet corresponds one-to-one to each column in the preset coding matrix, and each second data packet corresponds one-to-one to the target coding data packet;

[0090] The step of obtaining a target coded data packet based on the coding expression and according to the extended domain element matrix and the first data packet includes the following specific implementation contents:

[0091] Based on the coding expression, each column in the preset coding matrix is ​​traversed, and each target coding data packet corresponding to each column in the preset coding matrix is ​​calculated and obtained respectively.

[0092] Specifically, by using the preset coding operation table, the addition and multiplication operations in the calculation expression of the extended domain elements in the matrix form can be efficiently implemented. Compared with the traditional matrix addition and multiplication based on GF(p), the calculation overhead of using the preset coding operation table is only 1 / L of the former. In the addition operation, the first columns of the matrices corresponding to the two elements are summed, and the result is the first column of the new element matrix representation obtained after the addition operation. In the multiplication operation, the matrix corresponding to the first element is multiplied by the first column of the matrix corresponding to the second element, and the result is the first column of the new element representation obtained after the multiplication operation.

[0093] Specifically, all 1≤j≤n in the calculation expression are traversed to obtain n target encoding data packets with a length of M.

[0094] The embodiment of the present application first divides the data to be encoded into at least two first data packets; then, based on a preset coding matrix and the first data packet, a coding expression is determined, wherein the elements in the preset coding matrix are the extended domain elements; based on a preset coding operation table, the extended domain elements are converted into an extended domain element matrix to achieve a matrix representation of a high-dimensional extended domain; finally, based on the coding expression, according to the extended domain element matrix and the first data packet, a target coded data packet is obtained, which can greatly reduce the computational overhead and achieve a high-efficiency coding process.

[0095] In order to further explain the present application, a specific embodiment is described below:

[0096] In order to reduce the computational overhead of data during encoding and improve encoding efficiency, this embodiment performs the following processing:

[0097] (I) Modeling a batch of data to be encoded as k=3 first data packets m with a length of M=21 、m 2 、m 3 :

[0098] m 1 =[7 6] T

[0099] m 2 =[1 4] T

[0100] m 3 =[2 5] T

[0101] Each symbol in the first data packet is a preset extended field GF(2 3 ), i.e., p=2, L=3, the coding operation rule is determined by the preset extended field GF(2 3 ) corresponds to the GF(2)-based third-order primitive polynomial p(x)=1+x+x 3 The only certainty.

[0102] (ii) Three first data packets of length 2 are obtained through a preset encoding matrix G of 3 rows and 5 columns to obtain five second data packets of length 2 c 1 、c 2 ,…,c 5 .

[0103] Preset encoding matrix G:

[0104]

[0105] Each element in the encoding matrix G is an extended field GF(2 3 ) in the .

[0106] Encoded expression:

[0107] c 1 =g 11 m 1 +g 21 m 2 +g 31 m 3

[0108] c 2 =g 12 m 1 +g 22 m 2 +g 32 m 3

[0109] c 3 =g 13 m 1 +g 23 m2 +g 33 m 3

[0110] c 4 =g 14 m 1 +g 24 m 2 +g 34 m 3

[0111] c 5 =g 15 m 1 +g 25 m 2 +g 35 m 3

[0112] Obviously, 3×2=6 inter-symbol multiplications and 2×2=4 inter-symbol additions are required to obtain each second data packet.

[0113] (III) When the system is in the extended domain GF(2 3 ), let the matrix C be the third-order primitive polynomial based on GF(2) p(x)=1+x+x 3 The adjoint matrix of a 0 =1,a 1 =1,a 2 =0, then the matrix C is

[0114]

[0115] Based on the adjoint matrix, we can get GF(2 3 ) can be represented in matrix form as {0,C,C 2 ,…,C 7 =I 3}, and the matrix set {I L ,C,C 2} is the extended field GF(2 3 ) is a basis over the binary field GF(2).

[0116] (iv) constructing a coding operation table with a dimension of 3×7, the coding operation table is as follows Figure 2 As shown, the first column is the unit column vector [1 0 0] T , the second to fourth columns are the adjoint matrix, that is, Figure 2 The red box matrix in the encoding operation table. The fifth column is composed of the fourth column parameters [1 1 0] T Calculated to be [0 1 1] T , where the specific calculation process is:

[0117]

[0118] Among them, a 0 =1,a 1 =1,a 2 =0.

[0119] The sixth column of the encoding operation table is composed of the parameters in the fifth column [0 1 1] T Calculated to be [1 1 1] T , where the specific calculation process is:

[0120]

[0121] The seventh column of the encoding operation table is composed of the sixth column parameters [1 1 1] T Calculate [1 0 1] T , where the specific calculation process is:

[0122]

[0123] Based on the above calculation process, the encoding operation table is determined.

[0124] (V) Using the coding operation table with dimension 3×7, the extended field GF(2 3 ) is represented in matrix form as follows:

[0125]

[0126] The above correspondence is given by Figure 2 Given. From Figure 2 Starting from the companion matrix represented by the red 3×3 box in the middle, slide to the right when the power increases, and slide to the left when the power decreases, and you can get matrices C of different powers. j It should be noted that due to C 7 =C 0 =I 3 , so the encoding operation table has a cyclic property, such as Figure 2 Shown in the dashed box.

[0127] (vi) When j = 1, c 1 =g 11 m 1 +g 21 m 2 +g 31 m 3 , we need to base on the extended field GF(2 3 ) performs 6 inter-symbol multiplications and 4 inter-symbol additions.

[0128] In the multiplication operation, the matrix corresponding to the first element is multiplied by the first column of the matrix corresponding to the second element. The result is the first column represented by the new element obtained after the multiplication operation, represented by g 11 =6,g 21 =2,g 31 =7 and m 1 =[7 6] T ,m 2 =[1 4] T ,m 3 =[2 5] T We can get:

[0129]

[0130] (VII) Traverse all 1≤j≤n and calculate 5 target encoding data packets with a length of 2:

[0131]

[0132] The calculation results of each second data packet are each target coded data packet.

[0133] In summary, the present application provides a data encoding method, which can efficiently implement the extended field GF(p L ) in the matrix form. Compared with the traditional matrix addition and multiplication based on GF(p), the computational overhead of using the encoding operation table is only 1 / L of the traditional matrix operation method.

[0134] In order to better implement the above method, the embodiment of the present application also provides a data encoding device, which can be integrated in an electronic device, and the electronic device can be a terminal, a server, etc. Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.

[0135] For example, in this embodiment, the method of the embodiment of the present application is described in detail by taking the data encoding device being specifically integrated in the terminal as an example.

[0136] For example, Figure 3 As shown, the data encoding device may include a first unit 301, a second unit 302, a third unit 303 and a fourth unit 304, as follows:

[0137] The first unit 301 is configured to divide the data to be encoded into at least two first data packets, wherein the symbols of the first data packets are extended domain elements in a preset extended domain corresponding to the data to be encoded, and the preset extended domain is an extended domain generated according to an application scenario of the data to be encoded;

[0138] The second unit 302 is configured to determine a coding expression based on a preset coding matrix and the first data packet, wherein the elements in the preset coding matrix are the extended domain elements;

[0139] The third unit 303 is used to convert the extended domain element into an extended domain element matrix based on a preset coding operation table;

[0140] The fourth unit 304 is configured to obtain a target coded data packet based on the coding expression, the extended domain element matrix and the first data packet.

[0141] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.

[0142] It can be seen from the above that the embodiments of the present application can encode the data in the application scenario through a high-dimensional extension domain, reduce the computational overhead of the data during the encoding process, and improve the encoding efficiency.

[0143] The embodiment of the present application also provides an electronic device, which can be a terminal, a server, etc. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc. The server can be a single server or a server cluster composed of multiple servers, etc.

[0144] In some embodiments, the data encoding device may also be integrated into multiple electronic devices. For example, the data encoding device may be integrated into multiple servers, and the data encoding method of the present application may be implemented by multiple servers.

[0145] In this embodiment, the electronic device of this embodiment is a terminal as an example for detailed description, for example, Figure 4 As shown, it shows a schematic diagram of the structure of the terminal involved in the embodiment of the present application, specifically:

[0146] The terminal may include one or more processing core processors 401, one or more storage media memories 402, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that Figure 4 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0147] The processor 401 is the control center of the terminal, and uses various interfaces and lines to connect various parts of the entire terminal. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 performs various functions of the terminal and processes data, thereby monitoring the terminal as a whole. In some embodiments, the processor 401 may include one or more processing cores; in some embodiments, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.

[0148] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0149] The terminal also includes a power supply 403 for supplying power to various components. In some embodiments, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0150] The terminal may further include an input module 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0151] The terminal may also include a communication module 405. In some embodiments, the communication module 405 may include a wireless module. The terminal may perform short-range wireless transmission through the wireless module of the communication module 405, thereby providing the user with wireless broadband Internet access. For example, the communication module 405 may be used to help the user send and receive emails, browse web pages, and access streaming media.

[0152] Although not shown, the terminal may also include a display unit, etc., which will not be described in detail here. Specifically in this embodiment, the processor 401 in the terminal will load the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 will run the application stored in the memory 402 to achieve various functions, as follows:

[0153] Divide the data to be encoded into at least two first data packets, wherein the symbols of the first data packets are extended domain elements in a preset extended domain corresponding to the data to be encoded, and the preset extended domain is an extended domain generated according to an application scenario of the data to be encoded;

[0154] Determine a coding expression based on a preset coding matrix and the first data packet, wherein the elements in the preset coding matrix are the extended domain elements;

[0155] Based on a preset coding operation table, converting the extended domain element into an extended domain element matrix;

[0156] Based on the coding expression, according to the extended domain element matrix and the first data packet, a target coding data packet is obtained.

[0157] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0158] It can be seen from the above that the embodiments of the present application can encode the data in the application scenario through a high-dimensional extension domain, reduce the computational overhead of the data during the encoding process, and improve the encoding efficiency.

[0159] A person skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a storage medium and loaded and executed by a processor.

[0160] To this end, an embodiment of the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the data encoding methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:

[0161] Divide the data to be encoded into at least two first data packets, wherein the symbols of the first data packets are extended domain elements in a preset extended domain corresponding to the data to be encoded, and the preset extended domain is an extended domain generated according to an application scenario of the data to be encoded;

[0162] Determine a coding expression based on a preset coding matrix and the first data packet, wherein the elements in the preset coding matrix are the extended domain elements;

[0163] Based on a preset coding operation table, converting the extended domain element into an extended domain element matrix;

[0164] Based on the coding expression, according to the extended domain element matrix and the first data packet, a target coding data packet is obtained.

[0165] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0166] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in various optional implementations provided in the above embodiments.

[0167] Since the instructions stored in the storage medium can execute the steps in any data encoding method provided in the embodiments of the present application, the beneficial effects that can be achieved by any data encoding method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0168] The above is a detailed introduction to a data encoding method, device, terminal and storage medium provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data encoding method, characterized in that: The method comprises: Divide the data to be encoded into at least two first data packets, wherein the symbols of the first data packets are extended domain elements in a preset extended domain corresponding to the data to be encoded, and the preset extended domain is an extended domain generated according to an application scenario of the data to be encoded; Determine a coding expression based on a preset coding matrix and the first data packet, wherein the elements in the preset coding matrix are the extended domain elements, and the coding expression is used to calculate a target coded data packet; Based on a preset coding operation table, converting the extended domain element into an extended domain element matrix; Based on the coding expression, according to the extended domain element matrix and the first data packet, a target coding data packet is obtained.

2. The method according to claim 1, characterized in that Before converting the extended domain element into an extended domain element matrix based on a preset coding operation table, the method further includes: Based on the primitive polynomial corresponding to the preset extended domain, generating an adjoint matrix corresponding to the primitive polynomial; Based on the adjoint matrix, the preset encoding operation table is created.

3. The method according to claim 2, characterized in that The adjoint matrix is ​​expressed by the following expression: Wherein, C represents the adjoint matrix, a0, a1, ..., a L-1 are the coefficients in the primitive polynomial, L represents the order of the adjoint matrix, and I represents the preset L-1 order unit matrix.

4. The method according to claim 1, characterized in that The coding expression is: cj=∑1≤i≤k,1≤j≤ngijmi Among them, c j represents the second data packet, j represents the number of columns of the preset coding matrix, i represents the number of rows of the preset coding matrix, k represents the number of the first data packets, g ij represents the element of the preset coding matrix, m i Represents the first data packet.

5. The method according to claim 4, characterized in that The number of the second data packets is at least 1, each second data packet corresponds one-to-one to each column in the preset coding matrix, and the second data packets correspond one-to-one to the target coding data packets; The step of obtaining a target coded data packet based on the coded expression and according to the extended domain element matrix and the first data packet comprises: Based on the coding expression, each column in the preset coding matrix is ​​traversed, and each target coding data packet corresponding to each column in the preset coding matrix is ​​calculated and obtained respectively.

6. The method according to claim 1, characterized in that The number of rows of the preset coding matrix is ​​equal to the number of the first data packets; Determining a coding expression based on a preset coding matrix and the first data packet includes: combining the first data packets into a first data packet matrix; The first data packet matrix is ​​multiplied by the preset coding matrix to obtain a calculation result, and the coding expression is determined based on the calculation result, wherein the number of the second data packets is equal to the number of columns of the preset coding matrix, and the length of the second data packet is the same as the length of the first data packet.

7. The method according to claim 1, characterized in that The extended domain elements include non-zero elements and zero elements, and the extended domain element matrix includes a non-zero element matrix and a zero matrix; The step of converting the extended domain element into an extended domain element matrix based on a preset coding operation table includes: Based on the size of the preset encoding operation table, converting the non-zero elements into the non-zero element matrix; Based on the size of the preset encoding operation table, the zero elements are converted into the zero matrix, wherein the size of the non-zero element matrix is ​​the same as the size of the zero matrix.

8. A data encoding device, characterized in that: The device comprises: A first unit is configured to divide the data to be encoded into at least two first data packets, wherein the symbols of the first data packets are extended domain elements in a preset extended domain corresponding to the data to be encoded, and the preset extended domain is an extended domain generated according to an application scenario of the data to be encoded; A second unit is configured to determine a coding expression based on a preset coding matrix and the first data packet, wherein the elements in the preset coding matrix are the extended domain elements; A third unit is used to convert the extended domain element into an extended domain element matrix based on a preset coding operation table; The fourth unit is used to obtain a target coded data packet based on the coding expression, the extended domain element matrix and the first data packet.

9. A terminal, characterized in that: The method comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the method according to any one of claims 1 to 7.