Data coding and decoding method, device, chip and system
By directly mapping and transforming data at low-dimensional grid points during data encoding and decoding, the resource consumption problem caused by grid-based storage is solved, achieving efficient data encoding and decoding, which is suitable for various communication and storage systems.
Patent Information
- Application Number
- CN202411158536.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2026-03-03
AI Technical Summary
In the prior art, computing devices need to pre-store the lattice base when performing data encoding and decoding, resulting in additional consumption of computing and storage resources.
By using mapping and dimensional transformation methods, the data to be encoded is directly mapped to high-dimensional BW grid points, avoiding the use of a grid basis. The mapping and high-dimensional transformation are performed directly on the low-dimensional grid points to obtain the target grid encoding result.
This method enables data encoding and decoding without using a lattice basis, reducing the consumption of computational and storage resources and improving the applicability and efficiency of the method.
Smart Images

Figure CN121603019A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to methods, apparatus, chips, and systems for data encoding and decoding. Background Technology
[0002] Communication systems, storage systems, and other similar systems can encode data before transmitting or storing the encoded data. Data encoding can achieve effects such as data compression, improved data immunity, and error correction capabilities.
[0003] Barnes-Wall lattice-based encoding methods are widely used in data encoding. Encoding data using Barnes-Wall lattice-based methods can achieve effects such as data compression and error correction. Currently, computing devices need to pre-store the lattice basis (e.g., an n-dimensional lattice basis matrix) and use the lattice basis to implement Barnes-Wall lattice-based data encoding and decoding. The storage of the lattice basis consumes additional computing and storage resources. Summary of the Invention
[0004] This application provides a method, apparatus, chip, and system for data encoding and decoding, which can solve the problem that computing devices need to consume resources to store lattice bases when performing data encoding and decoding.
[0005] Firstly, a data encoding method is provided. The method includes obtaining an intermediate grid encoding result based on data to be encoded, wherein the data to be encoded includes any one or more vector representations of images, text, and audio, and the intermediate grid encoding result is a grid encoding result obtained by mapping the data to be encoded to grid points in a first dimension. Furthermore, a dimension transformation operation is performed on the intermediate grid encoding result to map it to grid points in a second dimension, obtaining a target grid encoding result for the data to be encoded, wherein the second dimension is greater than the first dimension.
[0006] The data encoding method provided in this application embodiment can map the data to be encoded to the grid points of the BW lattice in the required dimension (such as the second dimension) through calculation processes such as mapping and dimension transformation without using the BW lattice base, thus obtaining the target lattice encoding result. Furthermore, the data encoding method provided in this application embodiment can achieve lattice encoding mapped to grid points of any required dimension, making it more convenient to perform lattice encoding of different dimensions and thus having wider applicability. Compared with methods that use the BW lattice base to implement BW lattice-based data encoding and decoding, the data encoding method provided in this application embodiment does not require the use of the BW lattice base, and the computing device does not need to store the lattice base, thus avoiding the consumption of computing and storage resources caused by storing the lattice base.
[0007] In the data encoding method provided in this application embodiment, the data to be encoded is first mapped to grid points in a first dimension to obtain an intermediate grid encoding result. Then, a dimension transformation operation is performed to map the intermediate grid encoding result to grid points in a second dimension, which is higher than the first dimension, to obtain the desired target grid encoding result. This ensures that the purpose of data encoding is achieved. For example, the purpose of data encoding includes meeting the requirements for data encoding complexity and the security requirements for the data encoding result. Mapping the data to be encoded to grid points in a higher dimension ensures that the data encoding complexity and the security requirements for the data encoding result are met.
[0008] In one possible implementation, obtaining the intermediate lattice encoding result from the data to be encoded includes: performing a mapping operation on the data to be encoded to obtain the intermediate lattice encoding result, wherein the mapping operation is independent of the lattice basis.
[0009] Thus, the data encoding method provided in this application embodiment maps the data to be encoded to the grid points of the first dimension through a mapping operation independent of the lattice basis. Subsequently, a dimension transformation is performed based on the intermediate lattice encoding results mapped to the grid points of the first dimension to obtain the desired target lattice encoding result. This avoids the use of the lattice basis for lattice encoding of the first dimension grid points in the data encoding method provided in this application embodiment.
[0010] In another possible implementation, the dimension transformation operation is used to perform computations based on the intermediate lattice encoding result to update the intermediate lattice encoding result, where the computation is independent of the lattice basis.
[0011] In the construction principle of BW lattices, grid point data in low-dimensional BW lattices can be updated through basis-independent computations to obtain grid point data in high-dimensional BW lattices. Similarly, the data encoding method provided in this application updatees intermediate lattice encoding results through basis-independent computations, mapping the intermediate lattice encoding results to second-dimensional grid points to obtain the desired target lattice encoding results. This avoids the use of a lattice basis for lattice encoding of second-dimensional grid points in the data encoding method provided in this application.
[0012] In another possible implementation, the data to be encoded includes multiple elements, and obtaining the intermediate grid encoding result based on the data to be encoded includes: mapping multiple elements of the data to be encoded to multiple grid points in the first dimension to obtain the intermediate grid encoding result, wherein at least two elements of the multiple elements of the data to be encoded are mapped to a grid point in the first dimension.
[0013] By dividing the elements in the data to be encoded and mapping at least two elements to a grid point in the first dimension, the correspondence between the elements in the data to be encoded and the grid point in the first dimension can be guaranteed during mapping, thus achieving a simple and accurate mapping of the data to be encoded to the grid point in the first dimension.
[0014] In another possible implementation, the intermediate grid encoding result includes multiple grid point data, and the dimensional transformation of the intermediate grid encoding result includes transforming the intermediate grid encoding result to map the intermediate grid encoding result to grid points in the second dimension to obtain updated multiple grid point data; and obtaining the target grid encoding result of the data to be encoded based on the updated multiple grid point data.
[0015] In the construction principle of BW lattices, grid point data in a high-dimensional BW lattice can be obtained by updating the grid point data of grid points in a low-dimensional BW lattice. Thus, in the data encoding method provided in this application, by updating the grid point data included in the intermediate lattice encoding result, the grid point data included in the intermediate lattice encoding result can be conveniently and effectively transformed into grid point data of a higher-dimensional lattice, thereby obtaining the desired target lattice encoding result.
[0016] In another possible implementation, the multiple grid data points of the intermediate grid encoding result constitute at least one grid combination, and the dimensional transformation operation on the intermediate grid encoding result includes: updating the target grid data in the grid combination based on at least two grid data points contained in the grid combination.
[0017] By dividing the grid data included in the intermediate grid encoding result into grid combination, and updating the target grid data in the grid combination, it is possible to more accurately transform the grid data included in the intermediate grid encoding result into grid data with higher dimensions.
[0018] In another possible implementation, the data to be encoded includes multiple elements, and the dimensional transformation operation on the intermediate cell encoding result includes: performing a target number of dimensional transformations on the intermediate cell encoding result, the target number being determined based on the number of elements in the data to be encoded.
[0019] In the construction principle of the BW lattice, a single update of the grid data in an n-dimensional BW lattice yields the grid data of the grid points in a 2n-dimensional BW lattice. Thus, in the data encoding method provided in this application, multiple dimensional transformations can accurately transform the grid data included in the intermediate lattice encoding result into grid data of the desired dimension.
[0020] In another possible implementation, obtaining the intermediate lattice encoding result based on the data to be encoded includes mapping the data to be encoded to lattice points in the first dimension to obtain the initial lattice encoding result; adjusting the initial lattice encoding result based on the null space of the initial lattice encoding result to obtain the intermediate lattice encoding result.
[0021] In data encryption scenarios, to ensure that the encrypted result obtained by encrypting the target lattice encoding result of the target data can be successfully decrypted and decoded, it is necessary to guarantee the one-to-one correspondence between the elements in the intermediate lattice encoding result before the dimensional transformation operation and the elements in the data to be encoded, as well as the one-to-one correspondence between the elements in the target lattice encoding result after the dimensional transformation operation and the elements in the data to be encoded. By adjusting the null space of the initial lattice encoding result according to the null space of the initial lattice encoding result, the null space in the initial lattice encoding result can be erased. Using the intermediate lattice encoding result obtained by this method for subsequent dimensional transformations can effectively guarantee the one-to-one correspondence between the elements in the intermediate lattice encoding result before the dimensional transformation operation and the elements in the data to be encoded, as well as the one-to-one correspondence between the elements in the target lattice encoding result after the dimensional transformation operation and the elements in the data to be encoded.
[0022] In another possible implementation, the method also includes encrypting the target lattice encoding result of the encoded data to obtain the encrypted result of the data to be encoded.
[0023] Secondly, a data decoding method is provided. The method includes performing a dimensionality transformation operation on the target grid encoding result to be decoded, mapping the target grid encoding result to grid points in a first dimension to obtain an intermediate grid encoding result. The target grid encoding result is the encoding result obtained by mapping the target data to grid points in a second dimension. The target data includes any one or more vector representations of images, text, and audio, where the second dimension is greater than the first dimension. Furthermore, the decoding result of the target data is obtained based on the intermediate grid encoding result.
[0024] The data decoding method provided in this application can decode the target lattice encoding result obtained by mapping the target data to the lattice points of a second-dimensional BW lattice without using a BW lattice base, thus obtaining the decoded result of the target data. For example, the data decoding method provided in this application decodes the target lattice encoding result of the target data through calculation processes such as dimensional transformation of the lattice encoding result, thus obtaining the decoded result of the target data.
[0025] In one possible implementation, the dimension transformation operation is used to perform computations based on the target lattice encoding result to update the target lattice encoding result, where the computation is independent of the lattice basis.
[0026] In another possible implementation, the target grid encoding result includes multiple elements, and the dimensional transformation operation on the target grid encoding result to be decoded includes: obtaining multiple grid point data of the second dimension based on the multiple elements of the target grid encoding result as the transformed target grid encoding result, wherein at least two elements of the multiple elements of the target grid encoding result are mapped to grid point data of the second dimension; and performing a dimensional transformation on the transformed target grid encoding result so that the transformed target grid encoding result is mapped to grid points of the first dimension to obtain updated multiple grid point data as intermediate grid encoding result.
[0027] By dividing the elements of the target grid encoding result and mapping at least two elements to a second-dimensional grid point data, the correspondence between the elements in the target grid encoding result and the second-dimensional grid point data can be guaranteed during mapping. This achieves a simple and accurate mapping of the target grid encoding result to the second-dimensional grid point data, helping to ensure the accuracy of subsequent dimensional transformation operations. Furthermore, in the construction principle of the BW lattice, the grid point data of the higher-dimensional BW lattice can be obtained by updating the grid point data of the lower-dimensional BW lattice. Thus, in the data decoding method provided in this application, by updating the grid point data included in the transformed target grid encoding result, the grid point data included in the transformed target grid encoding result can be conveniently and effectively inversely transformed into lower-dimensional grid point data to obtain the required intermediate grid encoding result.
[0028] In another possible implementation, the multiple grid point data of the transformed target grid encoding result constitute at least one grid point combination, and the dimensional transformation of the transformed target grid encoding result includes updating the target grid point data in the grid point combination based on at least two grid point data contained in the grid point combination.
[0029] By dividing the grid data included in the transformed target grid encoding result into grid combination, and updating the target grid data in the grid combination, it is possible to more accurately transform the grid data included in the transformed target grid encoding result into grid data with lower dimensionality.
[0030] In another possible implementation, dimensional transformation of the transformed target grid encoding result includes: performing a dimensional transformation of the target number on the transformed target grid encoding result, wherein the target number is determined based on the number of grid data points in the transformed target grid encoding result.
[0031] In the construction principle of the BW lattice, a single update of the grid data in an n-dimensional BW lattice yields the grid data of the grid points in a 2n-dimensional BW lattice. Thus, in the data decoding method provided in this application, multiple dimensional transformations can accurately transform the grid data included in the transformed target lattice encoding result into grid data of lower-dimensional grid points.
[0032] In another possible implementation, the mapping of the target data based on the intermediate lattice encoding result includes: adjusting the intermediate lattice encoding result according to the null space of the intermediate lattice encoding result to obtain the initial lattice encoding result; and obtaining the decoding result of the target data based on the initial lattice encoding result.
[0033] In the data encoding method, the initial lattice encoding result is adjusted based on the null space of the initial lattice encoding result to obtain the intermediate lattice encoding result. The null space in the initial lattice encoding result can be removed. Using the intermediate lattice encoding result obtained through this method for subsequent dimensional transformations effectively ensures the one-to-one correspondence between the elements in the intermediate lattice encoding result and the elements in the data to be encoded before the dimensional transformation operation, as well as the one-to-one correspondence between the elements in the target lattice encoding result and the elements in the data to be encoded after the dimensional transformation operation. Thus, in the decoding method provided in this application, by adjusting the intermediate lattice encoding result based on the null space of the intermediate lattice encoding result to obtain the initial lattice encoding result, and by obtaining the decoding result of the target data based on the initial lattice encoding result, the target data can be accurately restored, and the decoding result of the target data can be obtained.
[0034] In another possible implementation, the method further includes: obtaining the encrypted result of the target data, and decrypting the encrypted result of the target data to obtain the target lattice encoding result to be decoded.
[0035] Thirdly, an encoding device is provided, comprising a data-to-be-encoded conversion module and an encoding dimension transformation module. The data-to-be-encoded conversion module obtains an intermediate grid encoding result from the data to be encoded, wherein the data to be encoded includes any one or more vector representations of images, text, and audio, and the intermediate grid encoding result is a grid encoding result obtained by mapping the data to be encoded to grid points in a first dimension. The encoding dimension transformation module performs a dimension transformation on the intermediate grid encoding result, mapping the intermediate grid encoding result to grid points in a second dimension to obtain the target grid encoding result of the data to be encoded, wherein the second dimension is greater than the first dimension.
[0036] In one possible implementation, the data to be encoded includes multiple elements, and the data to be encoded conversion module is further configured to: map the multiple elements of the data to be encoded to multiple grid points in the first dimension to obtain an intermediate grid encoding result, wherein at least two of the multiple elements of the data to be encoded are mapped to a grid point in the first dimension.
[0037] In another possible implementation, the intermediate grid encoding result includes multiple grid point data. The encoding dimension transformation module is also used to perform dimension transformation on the intermediate grid encoding result, mapping the intermediate grid encoding result to grid points in the second dimension, to obtain updated multiple grid point data; and to obtain the target grid encoding result of the data to be encoded based on the updated multiple grid point data.
[0038] In another possible implementation, multiple grid data points of the intermediate grid encoding result constitute at least one grid combination, and the encoding dimension transformation module is further used to update the target grid data in the grid combination based on at least two grid data points contained in the grid combination.
[0039] In another possible implementation, the data to be encoded includes multiple elements, and the encoding dimension transformation module is also used to: perform a dimension transformation on the intermediate grid encoding result for a target number of times, the target number of times being determined based on the number of elements in the data to be encoded.
[0040] In another possible implementation, the data to be encoded conversion module is also used to: map the data to be encoded to grid points in the first dimension to obtain intermediate grid encoding results, including mapping the data to be encoded to grid points in the first dimension to obtain initial grid encoding results; and adjusting the initial grid encoding results according to the null space of the initial grid encoding results to obtain intermediate grid encoding results.
[0041] In another possible implementation, the device further includes an encryption module, which is used to encrypt the target grid encoding result of the encoded data to obtain the encrypted result of the data to be encoded.
[0042] Fourthly, a decoding device is provided, comprising a decoding dimension transformation module and a decoding result acquisition module. The dimension transformation module performs a dimension transformation operation on the target grid encoding result to be decoded. The target grid encoding result is the encoding result obtained by mapping the target data to grid points in a second dimension. The target data includes any one or more vector representations of image, text, and audio. The dimension transformation operation maps the target grid encoding result to grid points in a first dimension to obtain an intermediate grid encoding result, where the second dimension is greater than the first dimension. The decoding result acquisition module obtains the decoding result of the target data based on the intermediate grid encoding result.
[0043] In one possible implementation, the target grid encoding result includes multiple elements, and the decoding dimension transformation module is further configured to: obtain multiple grid point data of the second dimension based on the multiple elements of the target grid encoding result as the transformed target grid encoding result, wherein at least two elements of the multiple elements of the target grid encoding result are mapped to a grid point data of the second dimension; and perform dimension transformation on the transformed target grid encoding result so that the transformed target grid encoding result is mapped to a grid point of the first dimension, thereby obtaining updated multiple grid point data as the intermediate grid encoding result.
[0044] In another possible implementation, the multiple grid point data of the transformed target grid encoding result constitute at least one grid point combination, and the decoding dimension transformation module is also used to update the target grid point data in the grid point combination based on at least two grid point data contained in the grid point combination.
[0045] In another possible implementation, the decoding dimension transformation module is also used to: perform a target number dimension transformation on the transformed target lattice encoding result, wherein the target number is determined based on the number of lattice data points in the transformed target lattice encoding result.
[0046] In another possible implementation, the decoding result acquisition module is also used to: adjust the intermediate lattice encoding result according to the null space of the intermediate lattice encoding result to obtain the initial lattice encoding result; and obtain the decoding result of the target data according to the initial lattice encoding result.
[0047] In another possible implementation, the device further includes a decryption module, which is used to obtain the encryption result of the target data and to decrypt the encryption result of the target data to obtain the target lattice encoding result to be decoded.
[0048] Fifthly, a coding / decoding system is provided, the system comprising at least one means for performing a data encoding method as described in the first aspect or a data decoding method as described in the second aspect.
[0049] A sixth aspect provides a computing device including a processor and a memory. The processor is configured to execute instructions stored in the memory to cause the computing device to perform a data encoding method as described in the first aspect or a data decoding method as described in the second aspect.
[0050] In a seventh aspect, a chip system is provided, comprising a processor and a power supply circuit. The power supply circuit supplies power to the processor, which executes operational steps of the data encoding method as described in the first aspect or operational steps of the data decoding method as described in the second aspect.
[0051] Eighthly, a computer program product comprising instructions is provided, which, when executed by at least one computing device, cause the at least one computing device to perform the data encoding method as described in the first aspect or the data decoding method as described in the second aspect.
[0052] A ninth aspect provides a computer-readable storage medium including computer program instructions that, when executed by a cluster of computing devices, enable the cluster of computing devices to perform a data encoding method as described in the first aspect or a data decoding method as described in the second aspect.
[0053] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.
[0054] The following description includes more specific details about the implementation methods provided for the above aspects. Attached Figure Description
[0055] Figure 1 A schematic diagram of lattices and lattice bases provided in the embodiments of this application;
[0056] Figure 2 This is a schematic diagram of the architecture of the data encoding and decoding system provided in the embodiments of this application;
[0057] Figure 3 A flowchart illustrating the first data encoding method provided in this application embodiment;
[0058] Figure 4 A flowchart illustrating the first data decoding method provided in this application embodiment;
[0059] Figure 5 A flowchart illustrating the second data encoding method provided in this application embodiment;
[0060] Figure 6 A flowchart illustrating the second data decoding method provided in this application embodiment;
[0061] Figure 7 This is a schematic diagram of the structure of the data encoding device provided in the embodiments of this application;
[0062] Figure 8 This is a schematic diagram of the structure of the data decoding device provided in the embodiments of this application;
[0063] Figure 9 A schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation
[0064] Data encoding and decoding can be applied to communication systems, storage systems, and other fields to encode and decode data managed or transmitted by these systems. Data can include various formats such as images, text, and voice. Data can be represented in vector form, known as vector representation of data (multiple vector representations of data can form a matrix).
[0065] Data encoding operations can achieve effects such as data compression, improved data resistance to interference, and error correction.
[0066] Taking message transmission in a communication system as an example, a message can refer to data containing information, such as images, text, and voice. The first device encodes the message and sends the encoded message to the second device, which then decodes the received encoded message to obtain the original message.
[0067] In some scenarios, to ensure data security, communication systems, storage systems, and other systems also encrypt the encoded data before transmission or storage.
[0068] Continuing with the example of message transmission in a communication system, the first device encodes the message and then encrypts it to obtain ciphertext. The first device then sends the ciphertext to the second device, which can decrypt and decode the received ciphertext to obtain the original message.
[0069] Encoding data based on lattice is a type of data encoding method. In the embodiments of this application, encoding data based on lattice can be called lattice encoding, and the result obtained by encoding data based on lattice can be called lattice encoding result.
[0070] A lattice is a set of discrete points in a space, and the points in the lattice are called lattice points. The space can be an n-dimensional space, and the lattice formed by the set of discrete points in the n-dimensional space has an n-dimensional dimension, as do the lattice points.
[0071] As an example, a lattice can be constructed as follows: Given a set of spatial vectors (e.g., a set of linearly independent spatial vectors) as a basis, discrete basis vectors are generated from the spatial vectors in the basis. The set of spatial vectors formed by these discrete basis vectors constitutes the lattice. Alternatively, each spatial vector in the basis can be multiplied by an integer coefficient to generate discrete basis vectors, and the set of spatial vectors formed by these discrete basis vectors constitutes the lattice. The basis of a lattice is called a lattice basis.
[0072] Grid points can be represented by their spatial coordinates, vectors, or other forms. In the embodiments of this application, the data representing the grid points can be referred to as grid point data.
[0073] Encoding data based on lattice refers to mapping data onto lattice points in a lattice. For example, mapping an n-dimensional message vector onto lattice points yields the lattice-encoded result of the message vector, which can be represented as an n-dimensional vector (called a lattice vector).
[0074] Barnes-Wall lattices are a type of lattice, often abbreviated as BW lattice. A BW lattice is a 2x2 lattice. d A lattice with dimensions (d is an integer), such as 2-dimensional, 4-dimensional, 8-dimensional, 16-dimensional, 32-dimensional, etc. An n-dimensional BW lattice can be represented as BW. n The BW lattice can be constructed as shown in equation (1) below:
[0075] BW 2n ={(u,u+φv),u,v∈BW n},φ=1+i (1)
[0076] Where u and v represent BW n Two lattice points in the lattice, φ is a parameter used to assist in constructing the BW lattice. BW0 can be initialized to [1], and as an example, a 2D BW lattice can be constructed as follows: Figure 1As shown in Figure a, it may include grid points (0,0), (0,1), (1,0), and (1,1).
[0077] Encoding data using the BW lattice can achieve effects such as data compression and error correction, and is widely used in data encoding-related fields. Error correction of encoded data refers to correcting errors in the encoded data caused by noise or other reasons during data transmission and storage, restoring the correct encoded data.
[0078] Currently, encoding data based on BW lattice requires the use of a BW lattice base, and correspondingly, decoding the lattice encoding results of BW lattice also requires the use of a BW lattice base.
[0079] Figure 1 The diagram shows some schematic representations of lattice basis matrices. As an example, the lattice basis matrix of a 4D BW lattice can be shown as follows: Figure 1 As shown in Figure b, the lattice basis matrix of an 8-dimensional BW lattice can be obtained as follows: Figure 1 As shown in c, the lattice basis matrix of a 16-dimensional BW lattice can be obtained as follows: Figure 1 As shown in d.
[0080] Taking the encoding of target data based on the BW lattice as an example, the lattice encoding result of the target data can be obtained by calculating the product of the lattice basis of the BW lattice and the representation data of the target data (e.g., the vector representation data of the data). For example, let B represent the lattice basis of the BW lattice (e.g., the lattice basis matrix) and m represent the vector representation data of the target data, the lattice encoding result y of the target data can be calculated by the following formula (2):
[0081] y = Bm T mod 2 r (2)
[0082] Where, m T Let r be the transpose of the vector representation of data m, where r is an integer. Also, if we need to map the vector representation of the target data m to 2... d For 3D lattice points, 2D lattice points are required. d The lattice basis matrix of a 16-dimensional BW lattice. For example, if you need to map m to 16-dimensional lattice points, you need to use the lattice basis matrix of a 16-dimensional BW lattice.
[0083] Therefore, computing devices need to pre-store the lattice basis (e.g., an n-dimensional lattice basis matrix) before they can use the lattice basis to implement BW-based data encoding and decoding. The storage process of the lattice basis consumes additional computing and storage resources. For example, the computing device needs to perform compression or other processing on the lattice basis before storing the processed lattice basis in a storage medium.
[0084] This application provides a data encoding method, including acquiring data to be encoded, mapping the data to be encoded to grid points in a first dimension to obtain an intermediate grid encoding result, and then performing a dimensional transformation on the intermediate grid encoding result to map the intermediate grid encoding result to grid points in a second dimension to obtain a target grid encoding result for the data to be encoded, wherein the second dimension is larger than the first dimension.
[0085] The target data to be encoded can be called the data to be encoded, which may include vector representations of data (such as images, text, audio, etc.). The encoding result of the data to be encoded is called the target lattice encoding result of the data to be encoded.
[0086] The data encoding method provided in this application embodiment can map the data to be encoded to the grid points of the BW lattice in the desired dimension (i.e., the second dimension) without using the lattice basis of the BW lattice, thus obtaining the target lattice encoding result. Furthermore, the data encoding method provided in this application embodiment can achieve lattice encoding mapped to grid points of any desired dimension, making it more convenient to perform lattice encoding of different dimensions and thus having wider applicability. For example, the data encoding method provided in this application embodiment achieves the mapping of the data to be encoded to the grid points of the BW lattice in the desired dimension through calculation processes such as low-dimensional grid point mapping (e.g., first mapping the data to be encoded to a first-dimensional grid point with a dimension lower than the desired grid point) and dimensional transformation of the lattice encoding result (e.g., performing a dimensional transformation on the intermediate lattice encoding result obtained by mapping to the first-dimensional grid point, so that the intermediate lattice encoding result is then mapped to a second-dimensional grid point with a higher dimension than the first-dimensional grid point), thereby obtaining the target lattice encoding result.
[0087] This application also provides a data decoding method, which can be used to decode a target grid encoding result (such as an encoding result obtained by mapping target data to grid points in a second dimension, where the target data includes vector representation data) obtained by the data encoding method proposed in this application. The method includes obtaining the target grid encoding result to be decoded, performing a dimensional transformation on the target grid encoding result to map it to grid points in a first dimension, obtaining an intermediate grid encoding result, wherein the second dimension is greater than the first dimension. Then, the decoding result of the target data is obtained based on the intermediate grid encoding result.
[0088] The data decoding method provided in this application can decode the target lattice encoding result obtained by mapping the target data to the lattice points of a second-dimensional BW lattice without using a BW lattice basis, thus obtaining the decoded result of the target data. For example, the data decoding method provided in this application can decode the target lattice encoding result of the target data through a dimensional transformation of the lattice encoding result (such as performing a dimensional transformation on the target lattice encoding result obtained by mapping the target data to the second-dimensional lattice points, so that the target lattice encoding result is then mapped to the first-dimensional lattice points, which are lower in dimension than the second-dimensional lattice points), thus obtaining the decoded result of the target data.
[0089] Thus, compared with the method of implementing BW lattice-based data encoding and decoding using the BW lattice base, the data encoding and decoding method provided in this application embodiment does not need to use the BW lattice base, and the computing device does not need to store the lattice base, which can avoid the consumption of computing resources and storage resources caused by storing the lattice base.
[0090] The data encoding and decoding methods proposed in this application can be used in various types of communication systems, storage systems, or other systems that require data encoding. For example, a communication system may include a communication system where a client communicates with a server, a communication system where servers communicate with each other, etc. A storage system may include an optical disc storage system, a hard disk storage system, a magnetic tape storage system, a solid-state storage system, or a storage system composed of optical discs, hard disks, magnetic tapes, solid-state storage, or a mixture of multiple storage media.
[0091] Furthermore, the data encoding and decoding methods proposed in this application can be used for data encoding and decoding in data encryption scenarios. These data encryption scenarios may include, for example, encrypted data transmission and encrypted data storage. The encryption algorithms involved in these data encryption scenarios can be various encryption algorithms, such as post-quantum encryption algorithms.
[0092] Figure 2 This is a schematic diagram of the architecture of a data encoding / decoding system provided in an embodiment of this application. Figure 2 As shown, the data encoding and decoding system may include a first computing device 210, a second computing device 220, and a data access device 230.
[0093] The first computing device 210 can be used to encode target data to obtain a target lattice encoding result of the target data. For example, the first computing device 210 can obtain target data from a database or other storage medium. The target data may include vector representation data of data (e.g., any one or more types of data such as images, text, and audio). The first computing device 210 can also execute the data encoding method provided in the embodiments of this application (e.g., in the embodiments of this application). Figure 3The first data encoding method provided is used to perform lattice encoding on the target data to obtain the target lattice encoding result of the target data.
[0094] In some implementations, the first computing device 210 may also be used to store the target lattice encoding result of the target data in the data access device 230 for retrieval and use when needed.
[0095] In some implementations, the second computing device 220 can be used to obtain the target grid encoding result of the target data from the data access device 230, and the second computing device 220 can execute the data decoding method provided in the embodiments of this application (e.g., in the embodiments of this application). Figure 4 The first data decoding method provided is used to decode the target lattice encoding result of the target data to obtain the decoded result of the target data.
[0096] Data access device 230 is used for encoding data storage and encoding data retrieval. Data access device 230 includes storage medium 211, rack 212, and controller 213. Storage medium 211 is used to store data. Storage medium 211 may include optical discs, magnetic disks, magnetic tapes, solid-state storage, or a combination of multiple storage media. Rack 212 is used to load storage media, such as optical discs, and to perform data writing or data reading operations on the storage media. Rack 212 may include an optical drive, an optical disc tray, and a robotic arm (…). Figure 2 (Not shown in the image). The optical drive is used for writing or reading data. The optical disc tray is used to hold optical discs. The robotic arm is used to insert storage media into the optical drive. The controller 213 is used to control the movement of the rack 212. The data access device 210 may also include an I / O interface 214, which can be used to transmit data with other components or devices in the system. For example, the first computing device 210 inputs the target grid encoding result of the target data into the data access device 210 for storage through the I / O interface 214. As another example, the second computing device 220 obtains the target grid encoding result of the target data from the data access device 210 through the I / O interface 214.
[0097] In some implementations, the first computing device 210 can also be used to send the target grid encoding result of the target data to the second computing device 220. After receiving the target grid encoding result of the target data, the second computing device 220 can execute the data decoding method provided in the embodiments of this application (e.g., in the embodiments of this application). Figure 4 The first data decoding method provided is used to decode the target lattice encoding result of the target data to obtain the decoded result of the target data.
[0098] In some implementations, the data encoding / decoding system can also be used to implement data encryption scenarios (such as encrypted data transmission and encrypted data storage).
[0099] Specifically, the first computing device 210 can also be used to execute the data encoding method provided in the embodiments of this application (e.g., in the embodiments of this application). Figure 5 The provided second data encoding method performs lattice encoding on the target data to obtain the target lattice encoding result of the target data. The first computing device 210 then performs an encryption operation on the target lattice encoding result of the target data to obtain the encrypted result of the target data.
[0100] In some implementations, the first computing device 210 may also store the encrypted result of the target data in the data access device 230 for retrieval and use when needed.
[0101] In some implementations, the second computing device 220 can be used to obtain the encryption result of the target data from the data access device 230, and the second computing device 220 can decrypt the encryption result of the target data to obtain the target data's target lattice encoding result. Furthermore, the second computing device 220 then executes the data decoding method provided in the embodiments of this application (e.g., in the embodiments of this application). Figure 6 The second data decoding method provided is used to decode the target lattice encoding result of the target data to obtain the decoded result of the target data.
[0102] In some implementations, the first computing device 210 can also be used to send the encryption result of the target data to the second computing device 220. After receiving the encryption result of the target data, the second computing device 220 can decrypt the encryption result of the target data to obtain the target data's target lattice encoding result. Furthermore, the second computing device 220 then executes the data decoding method provided in the embodiments of this application (e.g., in the embodiments of this application). Figure 6 The second data decoding method provided is used to decode the target lattice encoding result of the target data to obtain the decoded result of the target data.
[0103] It is worth noting that, Figure 2 This is merely a schematic diagram of the architecture of an coded data processing system provided in an embodiment of this application. Figure 2 The positional relationships between the devices, components, modules, etc. shown do not constitute any limitation.
[0104] For example, in Figure 2 In this case, storage medium 211 is located in data access device 230. In other cases, storage medium 211 may also be a component outside of data access device 230.
[0105] For example, in Figure 2 In this context, the first computing device 210 is an external device of the data access device 230. In other cases, the first computing device 210 may also be located on the data access device 230.
[0106] The first data encoding method and the first data decoding method provided in the embodiments of this application are described in detail below.
[0107] Figure 3 This is a flowchart illustrating the first data encoding method provided in the embodiments of this application. Figure 3 The method shown can be executed by a computing device, such as by the processor of the first computing device 210.
[0108] like Figure 3 As shown, the method includes the following steps:
[0109] Step 310: Obtain the data to be encoded.
[0110] As mentioned earlier, the target data to be encoded can be called the data to be encoded, which may include vector representations of data. This data may include any one or more of the following: images, text, and audio. Therefore, the data to be encoded comprises multiple elements.
[0111] In some embodiments, the vector dimension of the data to be encoded can be 2. r Where r is an integer, meaning the data to be encoded includes 2... r Each element.
[0112] As an example, the data to be encoded is the target data m, and in, Represents integers, that is The values are all integers.
[0113] In some embodiments, the value range of each element in the data to be encoded can satisfy the target value range. For example, the target value range is 0 or 1, in which case the elements in the data to be encoded are binary numbers, and the data to be encoded can be called a bit vector (or binary vector). Another example is that the target value range is (0, 1, 2, 3), etc.
[0114] Step 320: Map the data to be encoded to the grid points of the first dimension to obtain the intermediate grid encoding result.
[0115] The first dimension can be determined according to requirements; for example, it can be 2-dimensional, or it can be 4-dimensional or higher. This application's embodiments mainly use a 2-dimensional first dimension as an example for illustration.
[0116] In step 320, the data to be encoded can be divided into multiple element combinations, where each element combination includes at least two elements from the multiple elements, and the elements included in each element combination may be different. Mapping the data to be encoded to a grid point in the first dimension may include: for each element combination, mapping the at least two elements included in the element combination to a grid point in the first dimension to obtain grid point data.
[0117] Therefore, multiple elements can be combined to map multiple grid point data. Based on these multiple grid point data, the intermediate grid encoding result of the data to be encoded can be obtained. For example, the set of multiple grid point data can be used as the intermediate grid encoding result of the data to be encoded.
[0118] The number of elements in an element combination is determined by the first dimension. For example, if the first dimension is 2, then the element combination contains two elements.
[0119] Grid data can be represented in various feasible data formats. As an example, in the embodiments of this application, grid data can be represented by complex numbers. Thus, each element combination includes at least two elements mapped to a grid point in a first dimension, resulting in a complex number. Multiple element combinations can be mapped to multiple complex numbers (forming a set of complex numbers), and the intermediate grid encoding result of the data to be encoded can be obtained based on these multiple complex numbers.
[0120] As an example, for the target data in step 310 Each pair of elements forms an element combination. Mapping the target data m to the grid points of the first dimension involves mapping the two elements of each element combination to a complex number. That is, the two elements of each element combination have a mapping relationship with the real and imaginary parts of a complex number. Thus, multiple element combinations can be mapped to obtain multiple complex numbers.
[0121] Specifically, m1 and m2 are mapped to x1 (e.g., x1 ← m1 + im2), m3 and m4 are mapped to x2 (e.g., x2 ← m3 + im4), and so on, ultimately mapping the target data m to... It represents a complex number. This can then be used as the intermediate encoding result of the data to be encoded.
[0122] Step 330: Perform a dimensional transformation on the intermediate grid encoding result so that the intermediate grid encoding result is mapped to the grid points of the second dimension, thereby obtaining the target grid encoding result of the data to be encoded.
[0123] The second dimension is greater than the first dimension, and the second dimension can be determined according to requirements, such as 8 dimensions, 16 dimensions, etc. In the embodiments of this application, the required second dimension can be equal to the dimension of the data to be encoded.
[0124] The method for dimensional transformation of the intermediate grid encoding result can be as follows: taking the grid dimension transformation as the target, update the multiple grid data contained in the intermediate grid encoding result to obtain the updated multiple grid data, so that the updated multiple grid data are the grid data of the second dimension grid. This method is similar to the construction idea of BW grid, that is, as shown in formula (1), the BW is updated by the calculation method of formula (1). n The grid points in the grid are used to transform the grid point dimensions to obtain BW. 2n Grid points of a grid.
[0125] Furthermore, when performing dimensionality transformation on the intermediate grid encoding result, the method for updating the multiple grid point data contained in the intermediate grid encoding result can be as follows: the multiple grid point data contained in the intermediate grid encoding result constitute at least one grid point combination, and each grid point combination contains at least two grid point data. For each grid point combination, the target grid point data in the updated grid point combination is calculated based on the at least two grid point data contained therein and auxiliary parameters.
[0126] Each dimension transformation operation can transform the dimension of the grid data from n dimensions to 2n dimensions.
[0127] Thus, when the required second dimension is 2 times the first dimension n When n is greater than 1, dimensional transformation of the intermediate grid encoding result can include performing multiple dimensional transformations on the intermediate grid encoding result.
[0128] In some embodiments, when performing dimensional transformation on the intermediate grid encoding result, the number of dimensional transformation operations can be determined based on the number of elements contained in the data to be encoded.
[0129] For example, for the target data in step 310 It contains 2 r Each element. Taking step 320 as an example where the first dimension is 2, every two elements in m form an element combination, mapping m to... (i.e., the intermediate grid encoding result). In step 330, the intermediate grid encoding result needs to be... Perform r-1 dimensional transformations.
[0130] Specifically, the i-th dimensional transformation (where i is an integer) may include: 2 of the multiple grid data contained in the intermediate grid encoding result. i Each grid point data point constitutes a grid point combination. For each grid point combination, based on all the grid point data points and auxiliary parameters contained therein, the second grid point combination is updated. i-1 +1 to the 2nd i The number of grid points (i.e., the target grid point data includes the 2nd) i-1 +1 to the 2nd i (grid points).
[0131] As an example, the aforementioned intermediate grid encoding result The calculation process of performing dimensional transformation to map the intermediate lattice encoding result to the lattice points of the second dimension includes:
[0132] The first dimensional transformation is performed according to the following formula (3) to obtain the first updated grid data of the intermediate grid encoding result:
[0133]
[0134] The second dimensional transformation is performed according to the following formula (4) to obtain the second updated grid data of the intermediate grid encoding result:
[0135]
[0136] Following this pattern, the (r-1)th dimensional transformation is performed according to the following formula (5) to obtain the (r-1)th updated grid data of the intermediate grid encoding result:
[0137]
[0138] Wherein, φ is an auxiliary parameter used for dimensional transformation operations, and its value can be set according to requirements and can be a complex number. In the embodiments of this application, φ can be set to 1 + i.
[0139] In some embodiments, the intermediate grid encoding result is subjected to dimensional transformation so that it is mapped to grid points in the second dimension. After obtaining updated grid point data, a first target vector can be obtained based on the updated grid point data, and the obtained first target vector is used as the target grid encoding result of the data to be encoded. The obtained first target vector is also called a grid vector, and the dimension of the first target vector can be the same as the dimension of the data to be encoded.
[0140] As an example, the aforementioned intermediate grid encoding result Perform dimensional transformation to obtain the updated After that, the updated version can be... The real and imaginary parts of each grid point data (each grid point data is a complex number) are arranged sequentially to obtain the first target vector (i.e., the grid vector).
[0141] In some embodiments, a modulo operation can be performed on the target grid encoding result as needed to adjust the value range of elements in the target grid encoding result, and the adjusted target grid encoding result can be used as the final target grid encoding result.
[0142] For example, it can be based on 2 d Perform a modulo operation on the target lattice encoding result, 2 d For target data The range of values for each element in the set (the range of values for each element is 2). d This indicates that the element can take values less than 2. d Integers. For example, 2. d If the value is 4, then the range of element values can be 0, 1, 2, 3. As an example, based on 2... d The modulo operation on the target lattice encoding result y can be performed using the formula ymod 2. d express.
[0143] Figure 4 This is a flowchart illustrating the first data decoding method provided in an embodiment of this application. Figure 4 The method shown can be executed by a computing device, such as by the processor of the second computing device 220. Figure 4 The data decoding method shown can be used to decode data transmitted through... Figure 3 The encoding result obtained by the first encoding method shown (e.g., the target lattice encoding result of the target data) is decoded.
[0144] In some embodiments, the symbols in the target lattice encoding result obtained by the computing device may be incorrect. The computing device may first perform error correction processing on the obtained target lattice encoding result to restore the correct target lattice encoding result, and then execute the correct target lattice encoding result. Figure 4 The data decoding method shown in the figure yields the decoding result of the target data.
[0145] The error correction processing of the target lattice encoding result with symbol errors can be achieved by various existing feasible error correction methods, and the embodiments of this application do not limit this.
[0146] like Figure 4 As shown, the method includes the following steps:
[0147] Step 410: Obtain the target grid encoding result to be decoded.
[0148] The target lattice encoding result to be decoded can be obtained through... Figure 3 The lattice-encoded result is obtained by encoding the target data using the encoding method in the middle. That is, the lattice-encoded result of the target data to be decoded is the encoded result obtained by mapping the target data to lattice points in the second dimension, and can be in the form of a lattice vector. For example, it could be... Figure 3 The lattice vector obtained in step 330 of the data encoding method shown
[0149] Step 420: Perform a dimensional transformation on the target grid encoding result so that the target grid encoding result is mapped to the grid points of the first dimension to obtain the intermediate grid encoding result.
[0150] Step 420 can be Figure 3The reverse calculation process of step 330 in the data encoding method shown. That is, the method of performing a dimensional transformation on the target grid encoding result to map the target grid encoding result to the grid points of the first dimension to obtain the intermediate grid encoding result can be the reverse process of performing a dimensional transformation on the intermediate grid encoding result to map the intermediate grid encoding result to the grid points of the second dimension in step 330.
[0151] Thus, the method for dimensional transformation of the target lattice encoding result can include the following steps 1.1)-1.2):
[0152] 1.1) First, map at least two elements from multiple elements of the target lattice encoding result (such as lattice vector) to a lattice point data to obtain multiple lattice point data as the transformed target lattice encoding result.
[0153] As an example, for the target lattice encoding result to be decoded in step 410 Each pair of elements forms an element combination, mapping the target lattice encoding result y to a lattice point data. This involves mapping the two elements in each element combination to a complex number, meaning that the two elements in each element combination have a mapping relationship with the real and imaginary parts of a complex number. Thus, multiple element combinations can be mapped to obtain multiple complex numbers.
[0154] Specifically, map y1, y2 to x1 (i.e., x1←y1+iy2), map y3, y4 to x2 (i.e., x2←y3+iy4), and so on, until finally mapping y to... It represents a complex number. This can then be used as the result of the transformed target lattice encoding.
[0155] 1.2) Then perform a dimensional transformation on the transformed target grid encoding result so that the transformed target grid encoding result is mapped to the grid points of the first dimension, and obtain the updated grid point data as the intermediate grid encoding result.
[0156] One method for performing dimensional transformation on the transformed target grid encoding result is as follows: taking grid dimension transformation as the target, update multiple grid data contained in the transformed target grid encoding result to obtain updated multiple grid data, such that the updated multiple grid data are grid data of the first dimension grid.
[0157] Furthermore, when performing dimensional transformation on the transformed target grid encoding result, the method for updating the multiple grid point data contained in the transformed target grid encoding result can be as follows: the multiple grid point data contained in the transformed target grid encoding result constitute at least one grid point combination, and each grid point combination contains at least two grid point data. For each grid point combination, based on the at least two grid point data contained therein and auxiliary parameters, the target grid point data in the updated grid point combination is calculated.
[0158] Each dimension transformation operation can transform the dimension of the grid data from 2n dimensions to n dimensions.
[0159] Thus, with Figure 3 The corresponding encoding method in the middle is when the required second dimension is 2 times the first dimension. n When n is greater than 1, dimensional transformation of the transformed target grid encoding result can include performing multiple dimensional transformations on the transformed target grid encoding result.
[0160] In some embodiments, when performing dimensional transformation on the transformed target lattice encoding result, the number of dimensional transformation operations can be determined based on the number of elements contained in the target lattice encoding result (such as a lattice vector) to be decoded.
[0161] For example, the target lattice encoding result to be decoded It contains 2 r Each element. Taking a 2-dimensional first dimension as an example in step 420, every two elements in y form an element combination, mapping y to... (That is, the transformed target grid encoding result). In step 420, the transformed target grid encoding result needs to be... Perform r-1 dimensional transformations.
[0162] Specifically, the i-th dimensional transformation (where i is an integer) may include: 2 of the multiple grid point data contained in the transformed target grid encoding result. i Each grid point data point constitutes a grid point combination. For each grid point combination, based on all the grid point data points and auxiliary parameters contained therein, the second grid point combination is updated. i-1 +1 to the 2nd i The number of grid points (i.e., the target grid point data includes the 2nd) i-1 +1 to the 2nd i (grid points).
[0163] As an example, the target lattice encoding result after the aforementioned transformation The calculation process of performing dimensional transformation to map the transformed target lattice encoding result to the lattice points of the first dimension includes:
[0164] The first dimensional transformation is performed according to the following formula (6):
[0165]
[0166] And so on, finally performing the (r-1)th dimensional transformation according to the following formula (7):
[0167]
[0168] Where φ is an auxiliary parameter used for dimensional transformation operations, and its setting is... Figure 3 The φ in the encoding method is the same, for example, φ = 1 + i.
[0169] Step 430: Obtain the decoding result of the target data based on the intermediate grid encoding result.
[0170] In some embodiments, the target grid encoding result is dimensionally transformed to map the target grid encoding result to grid points in the first dimension, resulting in updated grid point data (i.e., intermediate grid encoding results). A second target vector can then be obtained based on the updated grid point data, and this second target vector is used as the decoding result of the target data. The dimension of the second target vector can be the same as the dimension of the target grid encoding result to be decoded (e.g., the first target vector).
[0171] As an example, the aforementioned target grid encoding results The mapping yields the transformed target lattice encoding result. and the encoded result of the transformed target lattice Perform dimensional transformation to obtain the updated After that, the updated version can be... The real and imaginary parts of each grid point data (each grid point data is a complex number) are arranged sequentially to obtain the second target vector (i.e., the decoding result of the target data).
[0172] For ease of understanding, the following is based on... Figure 3 The first data encoding method in the text encodes the target data, resulting in an example of the target data's grid encoding result, and according to... Figure 4 The first data decoding method in the text decodes the target lattice encoding result of the target data to obtain an instance of the decoded result of the target data.
[0173] As an example, the target data (i.e., the data to be encoded) is represented as a vector. At this point, the target data has dimension 2. r =8, then r=3.
[0174] In this example, according to Figure 3 The first data encoding method in the text encodes the target data m = (m1, m2, ..., m8) = (1, 0, 0, 1, 1, 1, 0, 1) including the following processes 2.1)-2.3):
[0175] 2.1) According to Figure 3The method described in step 320 of the method shown maps the pairwise elements in the target data m to grid points in the first dimension to obtain multiple grid point data. Each grid point data is represented by a complex number, and these multiple grid point data constitute the intermediate grid encoding result.
[0176] Specifically, m is mapped to the following formula (8): The elements (x1, x2, x3, x4) = (1, i, 1+i, i) in the middle cell are used as the encoding result:
[0177] (x1,x2,x3,x4)←(1,i,1+i,i)=(m1+im2,m3+im4,m5+im6,m7+im8) (8)
[0178] 2.2) According to Figure 3 The method described in step 330 of the illustrated method involves performing r-1 (i.e., 2) dimensional transformations on the intermediate grid encoding result (x1,x2,x3,x4) = (1,i,1+i,i) to map the intermediate grid encoding result to the grid points of the second dimension, thereby obtaining the updated grid point data of the intermediate grid encoding result. Specifically:
[0179] The first dimensional transformation is performed according to the following formula (9), resulting in the first updated grid data (x1, x2, x3, x4) = (1, i, 1+i, 2i):
[0180] (x1,x2,x3,x4)←(x1,x1+φx2,x3,x3+φx4)=(1,1+(1+i)i=i,1+i,2i)=(1,i,1+i,2i) (9)
[0181] The second dimensional transformation is performed according to the following formula (10), resulting in the second update of the intermediate grid encoding result, where multiple grid point data (x1, x2, x3, x4) = (1, i, 1+2i, 3i-2):
[0182] (x1,x2,x3,x4)←(x1,x2,(x1,x2)+φ(x3,x4))=(1,i,1+2i,3i-2)(10)
[0183] Where φ is an auxiliary parameter used for dimensional transformation operations, set to φ = 1 + i.
[0184] 2.3) According to Figure 3 The method described in step 330 of the method shown obtains the first target vector (i.e., the grid vector) as the target grid encoding result of the target data m based on the updated grid data (x1,x2,x3,x4) = (1,i,1+2i,3i-2) of the intermediate grid encoding result.
[0185] Specifically, the real and imaginary parts of each grid point data in multiple grid point data (x1,x2,x3,x4) = (1,i,1+2i,3i-2) are extracted sequentially and arranged to obtain the first target vector y = (y1,y2,…,y8) = (1,0,0,1,1,2,-2,3).
[0186] In this example, according to Figure 4 The first data decoding method in the text decodes the target lattice encoding result y=(y1,y2,…,y8)=(1,0,0,1,1,2,-2,3) of the target data, including the following processes 3.1)-3.3):
[0187] 3.1) According to Figure 4 The method described in step 420 of the method shown maps the pairwise elements in the target grid encoding result y to grid data to obtain multiple grid data. Each grid data is represented by a complex number, and these multiple grid data serve as the transformed target grid encoding result.
[0188] Specifically, according to equation (11) in the figure below, y is mapped to... The elements (x1, x2, x3, x4) = (1, i, 1+2i, -2+3i) in the matrix are used as the transformed target lattice encoding result:
[0189] (x1,x2,x3,x4)←(1,i,1+2i,-2+3i)=(y1+iy2,y3+iy4,y5+iy6,y7+iy8) (11)
[0190] 3.2) According to Figure 4 The method described in step 420 of the illustrated method involves performing r-1 (i.e., 2) dimensional transformations on the transformed target lattice encoding result (x1,x2,x3,x4) = (1,i,1+2i,-2+3i) to map the transformed target lattice encoding result to the lattice points of the first dimension, thus obtaining the intermediate lattice encoding result. Specifically:
[0191] The first dimensional transformation is performed according to the following formula (12), resulting in the first updated grid data (x1, x2, x3, x4) = (1, i, 1+i, 2i) of the target grid encoding result:
[0192] (x1,x2,x3,x4)←(x1,x2,[(x3,x4)-(x1,x2)] / φ)=(1,i,1+i,2i) (12)
[0193] The second dimensional transformation is performed according to the following formula (13), resulting in the second updated grid data (x1, x2, x3, x4) of the target grid encoding result:
[0194]
[0195] Where φ is an auxiliary parameter used for dimensional transformation operations, set to φ = 1 + i.
[0196] 3.3) According to Figure 4 The method described in step 430 of the method shown obtains the second target vector as the decoding result of the target data based on the updated multiple grid point data (x1,x2,x3,x4) = (1,i,1+i,i) of the intermediate grid encoding result.
[0197] Specifically, the real and imaginary parts of each grid point data point in multiple grid point data (x1,x2,x3,x4) = (1,i,1+i,i) are extracted sequentially and arranged to obtain the second target vector.
[0198] The second data encoding method and the second data decoding method provided in the embodiments of this application are described in detail below. The second data encoding method and the second data decoding method can be used for data encoding and data decoding in data encryption and decryption scenarios.
[0199] Figure 5 This is a flowchart illustrating the second data encoding method provided in an embodiment of this application. Figure 5 The method shown can be executed by a computing device, such as by the processor of the first computing device 210.
[0200] Figure 5 The encoding method shown can be used for encoding in data encryption scenarios. For example, a computing device can execute... Figure 5 The method shown encodes the target data to obtain an encoded result, and then encrypts the encoded result to obtain an encrypted result. The computing device can store the encrypted result in a storage medium or transmit it to other devices.
[0201] The encryption operation can be implemented using various existing feasible encryption methods, and this application embodiment does not impose any restrictions on this. As an example, the encoding result of the target data m is represented by Encode(m), and the encryption result b can be obtained by encrypting Encode(m) using the following formula: b = As + e + Encode(m) mod q, where q is a parameter set according to the requirements for encryption and decryption calculation, and its value can be an integer, A is a matrix that follows a uniform distribution mod q, s is the secret vector (i.e., the private key), and e is the constructed error vector.
[0202] like Figure 5 As shown, the method includes the following steps:
[0203] Step 510: Obtain the data to be encoded. The specific content of step 510 is as follows: Figure 3 Step 310 is similar; please refer to step 310 and its related description.
[0204] Step 520: Map the data to be encoded to the grid points of the first dimension to obtain the initial grid encoding result.
[0205] In step 520, the following can be used: Figure 3 This is implemented using a method similar to that described in step 320, which maps the data to be encoded to grid points in the first dimension. For details, please refer to [link to relevant documentation]. Figure 3 Step 320 and its related description.
[0206] Step 520 and Figure 3 The difference in step 320 is that in step 310, the data to be encoded is mapped to the grid points of the first dimension, and the resulting multiple grid point data can be directly used as the intermediate grid encoding result. However, in step 520, the data to be encoded is mapped to the grid points of the first dimension, and the resulting multiple grid point data is not directly used as the intermediate grid encoding result, but rather as the initial grid encoding result.
[0207] Step 530: Adjust the initial lattice encoding result according to the null space of the initial lattice encoding result to obtain the intermediate lattice encoding result.
[0208] In data encryption scenarios, to ensure that the encrypted result obtained by encrypting the target lattice encoding result of the target data can be successfully decrypted and decoded, it is necessary to ensure a one-to-one correspondence between the elements in the intermediate lattice encoding result before the dimensional transformation operation and the elements in the data to be encoded, as well as a one-to-one correspondence between the elements in the target lattice encoding result after the dimensional transformation operation and the elements in the data to be encoded. If the aforementioned one-to-one correspondence is incorrect, it may result in the inability to successfully decrypt and decode the encrypted result to obtain the decoded result of the target data. The values of the elements in the lattice encoding result of the target data affect the one-to-one correspondence between the elements in the lattice encoding result and the elements in the data to be encoded.
[0209] Thus, in step 530, the initial lattice encoding result can be adjusted based on the null space of the initial lattice encoding result to obtain an intermediate lattice encoding result, thereby erasing the null space in the initial lattice encoding result. Using the intermediate lattice encoding result obtained through this method for subsequent steps, i.e., performing a dimensional transformation on the intermediate lattice encoding result to obtain the target lattice encoding result, effectively ensures the one-to-one correspondence between the elements in the intermediate lattice encoding result and the elements in the data to be encoded before the dimensional transformation operation, and also ensures the one-to-one correspondence between the elements in the target lattice encoding result and the elements in the data to be encoded after the dimensional transformation operation.
[0210] The null space of the initial lattice encoding result can be represented by Φ1, which includes multiple elements, and these multiple elements are related to the initial lattice encoding result.
[0211] Multiple grid points correspond one-to-one. Φ1 can be in The null space calculated in the middle, The ring of negative numbers can be represented as:
[0212] In the null space Φ1, the i-th element (i = 1, 2, ..., 2) in the initial lattice encoding result r-1 The elements corresponding to the grid data can be q / φ k Where φ is an auxiliary parameter, which can be set to φ = 1 + i. k represents the number of 1s in the bit representation (i.e., binary representation) of i-1, and q = 2. d ,2 d For target data (i.e., data to be encoded) The range of values for each element.
[0213] As an example, the null space Φ1 of the initial lattice encoding result can be calculated using the following formula (14):
[0214] Φ1=(q,q / φ,q / φ,q / φ 2 ,…,q / φ r-1 (14)
[0215] In some embodiments of this application, for Satisfy φ r-1 |2 d (i.e. 2) d It is φ r-1 Integer multiples).
[0216] Adjusting the initial lattice encoding result based on its null space can be achieved as follows: Perform a modulo operation on the initial lattice encoding result based on its null space to obtain the adjusted initial lattice encoding result. This adjusted initial lattice encoding result serves as the required intermediate lattice encoding result.
[0217] As an example, the initial lattice encoding result can be adjusted using the following formula (15).
[0218]
[0219] Step 540: Perform a dimensional transformation on the intermediate grid encoding result so that the intermediate grid encoding result is mapped to the grid points of the second dimension, thereby obtaining the target grid encoding result of the data to be encoded.
[0220] In step 540, the following can be used: Figure 3The method described in step 330, which involves performing a dimensional transformation on the intermediate grid encoding result to map it to the grid points of the second dimension, thus obtaining the target grid encoding result of the data to be encoded, is similar to this approach. For details, please refer to [link to relevant documentation]. Figure 3 Step 330 and its related description.
[0221] Figure 6 This is a flowchart illustrating the second data decoding method provided in an embodiment of this application. Figure 6 The method shown can be executed by a computing device, such as by the processor of the second computing device 220.
[0222] Figure 6 The decoding method shown can be used to decode encrypted data. For example, a computing device can obtain the encryption result of target data (e.g., read the encryption result of target data from a storage medium, or receive the encryption result of target data sent by another device), decrypt the encryption result of the target data, and obtain the encoded data to be decoded. The computing device can then execute... Figure 6 The method shown here decodes the encoded data to be decoded, obtaining the plaintext of the target data.
[0223] The decryption operation can be implemented using various existing feasible decryption methods, and this application embodiment does not impose any restrictions on this. As an example, after encoding and encrypting the target data m to obtain the encrypted result b, the encrypted result b can be decrypted using the following formula to obtain the decrypted result (i.e., the encoding result of the target data m): Encode(m) = (b-As)mod q, where q is a parameter set according to requirements for encryption and decryption calculation, and its value can be an integer, A is a matrix that follows a uniform distribution mod q, and s is the secret vector (i.e., the private key).
[0224] as well as, Figure 6 The decoding method shown can be used to decode data obtained through... Figure 5 The encoding result obtained by the second encoding method shown is then decoded.
[0225] like Figure 6 As shown, the method includes the following steps:
[0226] Step 610: Obtain the target lattice encoding result to be decoded.
[0227] The target lattice encoding result to be decoded can be obtained through... Figure 5 The lattice encoding result is obtained by encoding the target data using the encoding method in the middle. That is, the lattice encoding result of the target to be decoded is the encoding result obtained by mapping the target data to the lattice points of the second dimension, which can be in the form of a lattice vector.
[0228] Step 620: Perform a dimensional transformation on the target grid encoding result so that the target grid encoding result is mapped to the grid points of the first dimension to obtain the intermediate grid encoding result.
[0229] Step 620 can be Figure 5 The reverse calculation process of step 540 in the data encoding method shown. That is, the method of performing a dimensional transformation on the target grid encoding result to map the target grid encoding result to the grid points of the first dimension to obtain the intermediate grid encoding result can be the reverse process of performing a dimensional transformation on the intermediate grid encoding result to map the intermediate grid encoding result to the grid points of the second dimension in step 540.
[0230] Step 620 can be adopted with Figure 4 This is implemented using a method similar to that described in step 420, which maps the data to be encoded to grid points in the first dimension. For details, please refer to [link to relevant documentation]. Figure 4 Step 420 and its related description.
[0231] Step 630: Adjust the intermediate grid encoding result according to the null space of the intermediate grid encoding result to obtain the initial grid encoding result.
[0232] In step 630, the following can be used: Figure 5 The null space Φ2 of the intermediate lattice encoding result is calculated using a method similar to that used in step 530 to calculate the null space of the initial lattice encoding result, i.e., Φ2 = Φ1.
[0233] In step 630, the same method can also be used. Figure 5 The method described in step 530, which adjusts the initial lattice encoding result based on the null space of the initial lattice encoding result, is similar to the method used to adjust the intermediate lattice encoding result based on the null space of the intermediate lattice encoding result.
[0234] For example, adjusting the intermediate lattice encoding result based on its null space can be achieved as follows: perform a modulo operation on the intermediate lattice encoding result based on its null space to obtain the adjusted intermediate lattice encoding result. This adjusted intermediate lattice encoding result serves as the required initial lattice encoding result.
[0235] As an example, the intermediate grid encoding result can be adjusted using the following formula (16).
[0236]
[0237] Step 640: Obtain the decoding result of the target data based on the initial lattice encoding result.
[0238] Step 640 can be adopted with Figure 4The method described in step 430, which obtains the decoding result of the target data based on the intermediate lattice encoding result, achieves the same result as obtaining the decoding result of the target data based on the initial lattice encoding result. In other words, by replacing the intermediate lattice encoding result in step 430 with the initial lattice encoding result, the decoding result of the target data can be obtained based on the initial lattice encoding result.
[0239] For ease of understanding, the following is based on... Figure 5 The second data encoding method in the text encodes the target data, resulting in an example of the target data's grid encoding result, and based on... Figure 6 The second data decoding method decodes the target lattice encoding result of the target data to obtain an instance of the decoded result of the target data.
[0240] As an example, the target data (i.e., the data to be encoded) is represented as a vector. At this point, the target data has dimension 2. r =8, then r=3, and the range of values for elements in the target data is 2. d =4.
[0241] In this example, according to Figure 5 The second data encoding method in the text encodes the target data m = (m1, m2, ..., m8) = (1, 2, 3, 0, 1, 1, 2, 0) as follows: (4.1)-4.4)
[0242] 4.1) According to Figure 5 The method described in step 520 of the method shown maps the pairwise elements in the target data m to grid points in the first dimension to obtain multiple grid point data. Each grid point data is represented by a complex number, and these multiple grid point data constitute the initial grid encoding result.
[0243] Specifically, m is mapped to the following formula (17): The elements (x1, x2, x3, x4) = (1 + 2i, 3, 1 + i, 2) in the array are used as the initial lattice encoding result:
[0244] (x1,x2,x3,x4)←(1+2i,3,1+i,2)=(m1+im2,m3+im4,m5+im6,m7+im8) (17)
[0245] 4.2) According to Figure 5 The method described in step 530 of the method shown uses the following formula (18) to adjust the initial lattice encoding result based on the null space of the initial lattice encoding result to obtain the intermediate lattice encoding result:
[0246] (x1,x2,x3,x4)modΦ1(18)
[0247] Wherein, the calculated Φ1=(4,4 / φ,4 / φ,4 / φ) 2 ), φ=1+i. x1mod 4=1+2i, x2mod 4 / φ=3mod(2-2i)=3, x3mod 4 / φ=(1+i)mod(2-2i)=1+i, x4mod 4 / φ 2 =2mod(2i)=0.
[0248] Thus, the adjusted initial lattice encoding result (i.e., the intermediate lattice encoding result) is calculated as (x1,x2,x3,x4) = (1+2i,3,1+i,0).
[0249] 4.3) According to Figure 5 The method described in step 540 of the illustrated method performs r-1 (i.e., 2) dimensional transformations on the intermediate grid encoding result (x1,x2,x3,x4) = (1+2i,3,1+i,0) to map the intermediate grid encoding result to the grid points of the second dimension, thereby obtaining the updated grid point data of the intermediate grid encoding result. Specifically:
[0250] The first dimensional transformation is performed according to the following formula (19), resulting in the first updated grid data (x1, x2, x3, x4) = (1+2i, 4+5i, 1+i, 1+i):
[0251] (x1,x2,x3,x4)←(x1,x1+φx2,x3,x3+φx4)=(1+2i,1+2i+(1+i)3=4+5i,1+i,1+i)=(1+2i,4+5i,1+i,1+i) (19)
[0252] The second dimensional transformation is performed according to the following formula (20), resulting in the second update of the intermediate grid encoding result, where (x1, x2, x3, x4) = (1+2i, 4+5i, 1+4i, 4+7i):
[0253] (x1,x2,x3,x4)←(x1,x2,(x1,x2)+φ(x3,x4))=(1+2i,4+5i,1+4i,4+7i) (20)
[0254] 4.4) According to Figure 5 The method described in step 540 of the method shown obtains the first target vector (i.e., the grid vector) based on the updated grid data (x1,x2,x3,x4) = (1+2i,4+5i,1+4i,4+7i) of the intermediate grid encoding result.
[0255] Specifically, the real and imaginary parts of each grid point data in multiple grid point data (x1,x2,x3,x4) = (1+2i,4+5i,1+4i,4+7i) are extracted sequentially and arranged to obtain the first target vector y = (y1,y2,…,y8) = (1,2,4,5,1,4,4,7).
[0256] Then, perform a modulo operation on the first target vector y, i.e., ymod 2. d The adjusted first target vector y`=(y`1,y`2,…,y`8)=(1,2,0,1,1,0,0,3) is obtained as the target grid encoding result of the target data m.
[0257] In this example, according to Figure 6 The second data decoding method in the text decodes the target lattice encoding result y`=(y`1,y`2,…,y`8)=(1,2,0,1,1,0,0,3) of the target data, including the following processes 5.1)-5.4):
[0258] 5.1) According to Figure 6 The method described in step 620 of the method shown maps the pairwise elements in the target grid encoding result y` to grid data to obtain multiple grid data. Each grid data is represented by a complex number, and these multiple grid data serve as the transformed target grid encoding result.
[0259] Specifically, according to equation (21) in the figure below, y' is mapped to The elements (x1,x2,x3,x4) = (1+2i,i,1,3i) in the matrix are used as the transformed target lattice encoding result:
[0260] (x1,x2,x3,x4)←(1+2i,i,1,3i)=(y`1+iy`2,y`3+iy`4,y`5+iy`6,y`7+iy`8) (21)
[0261] 5.2) According to Figure 6 The method described in step 620 of the illustrated method involves performing r-1 (i.e., 2) dimensional transformations on the transformed target lattice encoding result (x1,x2,x3,x4) = (1+2i,i,1,3i), mapping the transformed target lattice encoding result to the lattice points of the first dimension, thus obtaining the intermediate lattice encoding result. Specifically:
[0262] The first dimensional transformation is performed according to the following formula (22), resulting in the first updated grid data (x1, x2, x3, x4) of the target grid encoding result: (1+2i, i, -1-i, 1+i):
[0263] (x1,x2,x3,x4)←(x1,x2,[(x3,x4)-(x1,x2)] / φ)=(1+2i,i,-1-i,1+i)(22)
[0264] The second dimensional transformation is performed according to the following formula (23), resulting in the second updated grid data (x1, x2, x3, x4) of the target grid encoding result: (1+2i, -1, -1-i, 2).
[0265]
[0266] Where φ is an auxiliary parameter used for dimensional transformation operations, set to φ = 1 + i.
[0267] The resulting middle cell encoding is (x1,x2,x3,x4) = (1+2i,-1,-1-i,2).
[0268] 5.3) According to Figure 6 The method described in step 630 of the method shown uses the following formula (24) to adjust the intermediate lattice encoding result based on the null space of the intermediate lattice encoding result to obtain the initial lattice encoding result:
[0269] (x1,x2,x3,x4)modΦ2(24)
[0270] Wherein, the calculated Φ2=(4,4 / φ,4 / φ,4 / φ) 2 ), φ=1+i. x1mod 4=1+2i,x2mod 4 / φ=-1mod(2-2i)=3,x3mod 4 / φ=(-1-i)mod(2-2i)=1+i,x4mod 4 / φ 2 =2mod(2i)=0.
[0271] Thus, the adjusted intermediate grid encoding result (i.e. the initial grid encoding result) is calculated as (x1,x2,x3,x4) = (1+2i,3,1+i,0).
[0272] 5.4) According to Figure 6 The method described in step 640 of the method shown obtains the second target vector as the decoding result of the target data based on the initial lattice encoding result (x1,x2,x3,x4)=(1+2i,3,1+i,0).
[0273] Specifically, the real and imaginary parts of each grid point data point in the multiple grid point data (x1,x2,x3,x4) = (1+2i,3,1+i,0) are extracted sequentially and arranged to obtain the second target vector.
[0274] In data encryption scenarios, when the target data (i.e., the data to be encoded) m is a bit vector (i.e., the value range of m elements is 0 or 1), the target data m can first be converted into the required element value range (e.g., the element value range is 2). d A vector (where d is an integer greater than 0) is generated, and then a data encoding method is applied to the transformed target data.
[0275] The following gives the case where the target data (i.e., the data to be encoded) m is a bit vector, according to Figure 5 The second data encoding method in the text encodes the target data, resulting in an example of the target data's grid encoding result, and based on... Figure 6 The second data decoding method decodes the target lattice encoding result of the target data to obtain an instance of the decoded result of the target data.
[0276] As an example, the target data m = (m1, m2, ..., m 16 ) = (1,0,1,1,1,1,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,0,1,1,1,0), which is a 2-dimensional... r =32 (r=5) dimensional bit vectors with elements taking values in the range {0,1}.
[0277] In this example, according to Figure 5 The second data encoding method in the text encodes the target data m = (1,0,1,1,1,1,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,0,1,1,1,0), which includes the following processes 6.1)-6.4):
[0278] 6.1) Convert the target data m = (1,0,1,1,1,1,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,0,1,1,1,0) into a range of 2 elements. d The vector with a value of 4 is used to obtain the transformed target data m.
[0279] In section 6.1), various feasible methods can be used to transform the range of element values for the target data m. As an example, this can be achieved through the following procedures 6.11)-6.12):
[0280] 6.11) In The null space of the target data m calculated in the middle is Φ3=(4,4 / φ,4 / φ,4 / φ). 2 ,4 / φ,4 / φ 2 ,4 / φ 2 ,4 / φ 3 ,4 / φ,4 / φ2 ,4 / φ 2 ,4 / φ 3 ,4 / φ 2 ,4 / φ 3 ,4 / φ 3 ,4 / φ 4 )=(4,2-2i,2-2i,2i,2-2i,2i,2i,1+i,2-2i,2i,2i,1+i,2i,1+i,1+i,1).
[0281] Thus, the value range of the 32 variables corresponding to the 32 element positions in the target data m can be determined as (4,4,4,2,4,2,2,2,4,2,2,2,2,2,2,0,4,2,2,2,2,2,2,0,2,2,2,2,0,2,2,2,0,2,0,0,0).
[0282] 6.12) Based on the 32 variable value ranges determined in 6.11), the target data m = (1,0,1,1,1,1,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,0,1,1,1,0) is converted to an element value range of 2. d Vectors with a value of 4 During this transformation process, the correspondence (or mapping relationship) between the elements in the original target data m and the variable value range and the elements in the transformed target data m can be represented by the following Table 1:
[0283] 4 4 4 2 4 2 2 2 4 2 2 2 2 2 2 0 10 11 11 0 00 1 0 0 00 0 0 1 1 1 1 0 <![CDATA[m1]]> <![CDATA[m2]]> <![CDATA[m3]]> <![CDATA[m4]]> <![CDATA[m5]]> <![CDATA[m6]]> <![CDATA[m7]]> <![CDATA[m8]]> <![CDATA[m9]]> <![CDATA[m 10 ]]> <![CDATA[m 11 ]]> <![CDATA[m 12 ]]> <![CDATA[m 13 ]]> <![CDATA[m 14 ]]> <![CDATA[m 15 ]]> <![CDATA[m 16 ]]> 4 2 2 2 2 2 2 0 2 2 2 0 2 0 0 0 10 0 0 0 0 1 0 0 1 1 1 0 0 0 0 0 <![CDATA[m 17 ]]> <![CDATA[m 18 ]]> <![CDATA[m 19 ]]> <![CDATA[m 20 ]]> <![CDATA[m 21 ]]> <![CDATA[m 22 ]]> <![CDATA[m 23 ]]> <![CDATA[m 24 ]]> <![CDATA[m 25 ]]> <![CDATA[m 26 ]]> <![CDATA[m 27 ]]> <![CDATA[m 28 ]]> <![CDATA[m 29 ]]> <![CDATA[m 30 ]]> <![CDATA[m 31 ]]> <![CDATA[m 32 ]]>
[0284] Table 1
[0285] 6.2) According to Figure 5 The method described in steps 520 and 530 of the illustrated method maps the transformed target data m = (2,3,3,0,0,1,0,0,0,0,0,1,1,1,1,0,2,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0) to grid points in the first dimension, obtaining the initial grid encoding result. And based on the null space Φ1 = (4,4 / φ,4 / φ,4 / φ) of the initial grid encoding result... 2 ,4 / φ,4 / φ 2 ,4 / φ 2 ,4 / φ 3 ,4 / φ,4 / φ 2 ,4 / φ 2 ,4 / φ 3 ,4 / φ 2 ,4 / φ 3 ,4 / φ 3 ,4 / φ 4)=(4,2-2i,2-2i,2i,2-2i,2i,2i,1+i,2-2i,2i,2i,1+i,2i,1+i,1+i,1) Adjusting the initial lattice encoding result, we obtain the intermediate lattice encoding result (x1,x2,x3,…,x 16 )=(2+3i,3,i,0,0,i,1+i,1,2,0,i,0,1+i,1,0,0).
[0286] 6.3) According to Figure 5 The method described in step 540 of the method shown encodes the intermediate cell result (x1, x2, x3, ..., x...). 16 The equation (2+3i,3,i,0,0,i,1+i,1,2,0,i,0,1+i,1,0,0) undergoes r-1 (i.e., 4) dimensional transformations to map the intermediate lattice encoding result to the lattice points of the second dimension, thus obtaining the target lattice encoding result of the data to be encoded. Specifically:
[0287] Perform the first dimensionality transformation to obtain the first updated grid data (x1, x2, x3, ..., x) of the intermediate grid encoding result. 16 )=((2+3i),(5+6i),1i,1i,0,(-1+1i),(1+1i),(2+2i),2,(2+0i),1i,1i,(1+1i),(2+2i),0,0i).
[0288] Perform a second dimensional transformation to obtain the second updated grid data (x1, x2, x3, ..., x) of the intermediate grid encoding result. 16 )=((2+3i),(5+6i),(1+4i),(4+7i),0,(-1+1i),2i,(-1+5i),2,(2+0i),(1+1i),(1+1i),(1+1i),(2+2i),(1+1i),(2+2i)).
[0289] Perform the third dimensional transformation to obtain the third updated grid data (x1, x2, x3, ..., x) of the intermediate grid encoding result. 16 )=((2+3i),(5+6i),(1+4i),(4+7i),(2+3i),(3+6i),(-1+6i),(-2+11i),2,(2+0i),(1+1i),(1+1i),(2+2i),(2+4i),(1+3i),(1+5i)).
[0290] Perform the fourth dimensional transformation to obtain the fourth update of the intermediate grid encoding result, resulting in multiple grid point data (x1, x2, x3, ..., x). 16)=((2+3i),(5+6i),(1+4i),(4+7i),(2+3i),(3+6i),(-1+6i),(-2+11i), (4+5i),(7+8i),(1+6i),(4+9i),(2+7i),(1+12i),(-3+10i),(-6+17i)).
[0291] 6.4) Update multiple grid point data (x1, x2, x3, ..., x) based on the intermediate grid encoding results 16 )=((2+3i),(5+6i),(1+4i),(4+7i),(2+3i),(3+6i),(-1+6i),(-2+11i),(4+5i),(7+8i),(1+6i),(4+9i),(2+7i),(1+12i),(-3+10i),(-6+17i)), thus obtaining the first target vector (i.e., the lattice vector) y=(y1,y2,…,y 32 And, perform a modulo operation on the obtained first target vector y, i.e., ymod 2. d (2 d =4), thus obtaining the adjusted first target vector:
[0292] y` = (y`1, y`2, ..., y` 32 = (2,3,1,2,1,0,0,3,2,3,3,2,3,2,2,3,0,1,3,0,1,2,0,1,2,3,1,0,1,2,2,1), and use the first target vector as the target grid encoding result of the target data m.
[0293] In this example, according to Figure 6 The second data decoding method in the text results in the target lattice encoding result y`=(y`1,y`2,…,y` 32 Decoding (2,3,1,2,1,0,0,3,2,3,3,2,3,2,2,3,0,1,3,0,1,2,0,1,2,3,1,0,1,2,2,1) includes the following processes 7.1)-7.4):
[0294] 7.1) According to Figure 6 In step 620 of the method, the target grid encoding result y`=(y`1,y`2,…,y`) of the target data m is... 32 )=(2,3,1,2,1,0,0,3,2,3,3,2,3,2,2,3,0,1,3,0,1,2,0,1,2,3,1,0,1,2,2,1) is mapped to The elements (x1, x2, x3, ... x) in the data 16= ((2+3i),(1+2i),(1+0i),3i,(2+3i),(3+2i),(3+2i),(2+3i),1i,(3+0i),(1+2i),1i,(2+3i),(1+0i),(1+2i),(2+1i)) is the transformed target lattice encoding result.
[0295] 7.2) According to Figure 6 The method described in step 620 of the method shown encodes the transformed target lattice result (x1, x2, x3, ... x). 16 The target lattice encoding result is mapped to the lattice points of the first dimension by the following r-1 (i.e., 4) dimensional transformations: ) = ((2+3i),(1+2i),(1+0i),3i,(2+3i),(3+2i),(3+2i),(2+3i),(1+2i),(2+1i)). Specifically:
[0296] Perform the first dimensionality transformation to obtain the first updated grid data (x1, x2, x3, ..., x) of the target grid encoding result. 16 )=((2+3i),(1+2i),(1+0i),3i,(2+3i),(3+2i),(3+2i),(2+3i),(-2+0i),-2i,(1+1i),(-1-1i),0i,(-2+0i),(-1+1i),(-1-1i)).
[0297] Perform a second dimensional transformation to obtain the second updated grid data (x1, x2, x3, ..., x) of the target grid encoding result. 16 )=((2+3i),(1+2i),(1+0i),3i,0i,(1-1i),(2+0i),(1-1i),(-2+0i),-2i,(1+
[0298] 1i),(-1-1i),(1-1i),2i,(-1+1i),0i).
[0299] Perform a third dimensional transformation to obtain the third updated grid data (x1, x2, x3, ..., x) of the target grid encoding result. 16 )=((2+3i),(1+2i),(-2-1i),1i,0i,(1-1i),(1-1i),0i,(-2+0i),-2i,(2-1i),1i,(1-1i),2i,2i,(-1-1i)).
[0300] Perform the fourth dimensional transformation to obtain the fourth updated grid data (x1, x2, x3, ..., x) of the target grid encoding result. 16 )=((2+3i),(-1+0i),(-2-1i),(2+0i),0i,-1i,(1-1i),1i,(-2+0i),-2i,(2-1i),2i,(1-1i),(1+2i),2i,(-2-1i)).
[0301] The resulting intermediate cell encoding is (x1, x2, x3, ..., x 16 )=((2+3i),(-1+0i),(-2-1i),(2+0i),0i,-1i,(1-1i),1i,(-2+0i),-2i,(2-1i),2i,(1-1i),(1+2i),2i,(-2-1i)).
[0302] 7.3) According to Figure 6 The method described in step 630 of the method shown is based on the null space Φ2 = (4, 4 / φ, 4 / φ, 4 / φ) of the intermediate grid encoding result. 2 ,4 / φ,4 / φ 2 ,4 / φ 2 ,4 / φ 3 ,4 / φ,4 / φ 2 ,4 / φ 2 ,4 / φ 3 ,4 / φ 2 ,4 / φ 3 ,4 / φ 3 ,4 / φ 4 )=(4,2-2i,2-2i,2i,2-2i,2i,2i,1+i,2-2i,2i,2i,1+i,2i,1+i,1+i,1) Adjust the middle cell encoding result to obtain the initial cell encoding result (x1,x2,x3,…,x 16 )=(2+3i,3,i,0,0,i,1+i,1,2,0,i,0,1+i,1,0,0).
[0303] And, according to Figure 6 The method described in step 640 of the method shown is based on the initial lattice encoding result (x1, x2, x3, ..., x 16 = (2+3i,3,i,0,0,i,1+i,1,2,0,i,0,1+i,1,0,0), which yields the second target vector as the decoding result of the target data m.
[0304] Specifically, extract multiple grid point data points sequentially (x1, x2, x3, ..., x...). 16The real and imaginary parts of the data at each grid point in (2+3i,3,i,0,0,i,1+i,1,2,0,i,0,1+i,1,0,0) are arranged sequentially to obtain the second target vector m` = (m`1,m`2,…,m`). 32 )=(2,3,3,0,0,1,0,0,0,0,0,1,1,1,1,0,2,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0).
[0305] 7.4) Convert the range of element values of the decoding result m` of the target data m. The conversion method can be the reverse process of the conversion of the value range in 6.1). Finally, the converted decoding result m` = (1,0,1,1,1,1,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,0,1,1,1,1,0).
[0306] It is understood that, in order to achieve the functions in the above embodiments, the computing device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and method steps described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.
[0307] The above text combines Figures 3 to 6 The present application describes in detail the data encoding method and data decoding method provided according to the embodiments of this application. The following will be combined with... Figure 7 and Figure 8 This application describes the apparatus provided according to the present application. These apparatuses can be used to implement the functions of the processor in the above method embodiments, and thus can also achieve the beneficial effects of the above method embodiments.
[0308] Figure 7 The data encoding apparatus provided in the embodiments of this application, such as Figure 7 As shown, the data encoding device 700 includes a data conversion module 710 to be encoded and an encoding dimension transformation module 720.
[0309] The data to be encoded conversion module 710 is used to obtain intermediate grid encoding results based on the data to be encoded, wherein the data to be encoded includes any one or more vector representation data of images, text and audio, and the intermediate grid encoding result is the grid encoding result obtained by mapping the data to be encoded to grid points in the first dimension.
[0310] The dimension transformation module 720 is used to perform dimension transformation on the intermediate grid encoding result, so that the intermediate grid encoding result is mapped to the grid points of the second dimension, and the target grid encoding result of the data to be encoded is obtained, wherein the second dimension is greater than the first dimension.
[0311] In some implementations, the data to be encoded includes multiple elements, and the data to be encoded conversion module 710 is further used to: map the multiple elements of the data to be encoded to multiple grid points in the first dimension to obtain an intermediate grid encoding result, wherein at least two of the multiple elements of the data to be encoded are mapped to a grid point in the first dimension.
[0312] In some implementations, the intermediate grid encoding result includes multiple grid point data. The dimension transformation module 720 is also used to perform dimension transformation on the intermediate grid encoding result, so that the intermediate grid encoding result is mapped to the grid points of the second dimension to obtain updated multiple grid point data; and to obtain the target grid encoding result of the data to be encoded based on the updated multiple grid point data.
[0313] In some implementations, multiple grid point data of the intermediate grid encoding result constitute at least one grid point combination, and the dimension transformation module 720 is further used to: update the target grid point data in the grid point combination based on at least two grid point data contained in the grid point combination.
[0314] In some implementations, the data to be encoded includes multiple elements, and the dimension transformation module 720 is also used to: perform a dimension transformation on the intermediate grid encoding result for a target number of times, the target number of times being determined based on the number of elements in the data to be encoded.
[0315] In some implementations, the data to be encoded conversion module 710 is also used to: map the data to be encoded to grid points in the first dimension to obtain intermediate grid encoding results, including mapping the data to be encoded to grid points in the first dimension to obtain initial grid encoding results; and adjusting the initial grid encoding results according to the null space of the initial grid encoding results to obtain intermediate grid encoding results.
[0316] In some implementations, the data encoding device 700 also includes an encryption module. Figure 7 (Not shown in the image), the encryption module is used to encrypt the target grid encoding result of the encoded data to obtain the encrypted result of the data to be encoded.
[0317] Optionally, the data conversion module 710 and the dimension transformation module 720 may each include multiple sub-modules, which can be deployed separately to implement some of the functions of the corresponding module, such as implementing the aforementioned... Figure 3 and Figure 5 One or more steps in the data encoding method shown.
[0318] All devices can be implemented in software or in hardware. For example, the implementation of the data encoding device 700 will be described below.
[0319] As an example of a software functional unit, the data encoding device 700 may include code running on a computing instance. The computing instance may be at least one of a physical host (computing device), a virtual machine, a container, or other computing devices. Further, the aforementioned computing device may be one or more. For example, the data encoding device 700 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application may be distributed in the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same Availability Zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.
[0320] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same VPC or across multiple VPCs. Typically, a VPC is set up within a single region. Communication between two VPCs within the same region, and between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0321] As an example of a hardware functional unit, the data encoding device 700 may include at least one computing device, such as a server. Alternatively, the data encoding device 700 may also be a device implemented using an ASIC or a PLD. The aforementioned PLD may be implemented using a CPLD, FPGA, GAL, or any combination thereof.
[0322] The data encoding device 700 includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the data encoding device 700 includes multiple computing devices that can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the YY device includes multiple computing devices that can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0323] Figure 8 The data decoding apparatus provided in the embodiments of this application, such as Figure 8 As shown, the data decoding device 800 includes a decoding dimension transformation module 810 and a decoding result acquisition module 820.
[0324] The decoding dimension transformation module 810 is used to perform a dimension transformation operation on the target grid encoding result to be decoded. The target grid encoding result is the encoding result obtained by mapping the target data to the grid points of the second dimension. The target data includes any one or more vector representation data of images, text and audio. The dimension transformation operation is used to map the target grid encoding result to the grid points of the first dimension to obtain the intermediate grid encoding result. The second dimension is greater than the first dimension.
[0325] The decoding result acquisition module 820 is used to obtain the decoding result of the target data based on the intermediate grid encoding result.
[0326] In some implementations, the target grid encoding result includes multiple elements. The decoding dimension transformation module 810 is further configured to: obtain multiple grid point data of the second dimension based on the multiple elements of the target grid encoding result as the transformed target grid encoding result, wherein at least two elements of the multiple elements of the target grid encoding result are mapped to a grid point data of the second dimension; and perform dimension transformation on the transformed target grid encoding result so that the transformed target grid encoding result is mapped to a grid point of the first dimension, thereby obtaining updated multiple grid point data as intermediate grid encoding result.
[0327] In some implementations, the multiple grid point data of the transformed target grid encoding result constitute at least one grid point combination, and the decoding dimension transformation module 810 is further used to: update the target grid point data in the grid point combination based on at least two grid point data contained in the grid point combination.
[0328] In some implementations, the decoding dimension transformation module 810 is also used to: perform a dimension transformation of the target number on the transformed target grid encoding result, wherein the target number is determined based on the number of grid data points in the transformed target grid encoding result.
[0329] In some implementations, the decoding result acquisition module 820 is also used to: adjust the intermediate grid encoding result according to the null space of the intermediate grid encoding result to obtain the initial grid encoding result; and obtain the decoding result of the target data according to the initial grid encoding result.
[0330] In some implementations, the data decoding device 800 also includes a decryption module. Figure 8 (Not shown in the image), the decryption module is used to obtain the encryption result of the target data, and to decrypt the encryption result of the target data to obtain the target lattice encoding result to be decoded.
[0331] Optionally, the decoding dimension transformation module 810 and the decoding result acquisition module 820 may each include multiple sub-modules, which can be deployed separately to implement some of the functions of the corresponding module, such as implementing the aforementioned... Figure 4 and Figure 6One or more steps in the data decoding method shown.
[0332] All devices can be implemented in software or hardware. For example, the implementation of the data decoding device 800 will be described below.
[0333] As an example of a software functional unit, the data decoding device 800 may include code running on a computing instance. The computing instance may be at least one of a physical host (computing device), a virtual machine, a container, or other computing devices. Further, the aforementioned computing device may be one or more. For example, the data decoding device 800 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application may be distributed in the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same Availability Zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.
[0334] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same VPC or across multiple VPCs. Typically, a VPC is set up within a single region. Communication between two VPCs within the same region, and between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0335] As an example of a hardware functional unit, the data decoding device 800 may include at least one computing device, such as a server. Alternatively, the data decoding device 800 may also be a device implemented using an ASIC or a PLD. The aforementioned PLD may be implemented using a CPLD, FPGA, GAL, or any combination thereof.
[0336] The data decoding device 800 includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the data decoding device 800 includes multiple computing devices that can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the YY device includes multiple computing devices that can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0337] This application also provides a computing device 900. For example... Figure 9As shown, the computing device 900 includes a bus 902, a processor 904, a memory 906, and a communication interface 908. The processor 904, memory 906, and communication interface 908 communicate with each other via the bus 902. The computing device 900 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 900. Optionally, the processor 904 of the computing device 900 can be connected to a display or input device via the communication interface 908.
[0338] The 902 bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 9 The bus 902 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 902 may include a path for transmitting information between various components of the computing device 900 (e.g., memory 906, processor 904, communication interface 908).
[0339] Processor 904 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP). In this embodiment, processor 904 is used to execute the embodiments of this application. Figures 3-6 The steps or operations of the provided data encoding and decoding methods.
[0340] The memory 906 may include volatile memory, such as random access memory (RAM). The processor 904 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0341] The memory 906 stores executable program code, and the processor 904 executes the executable program code to implement the functions of the aforementioned **module 710 and **module 720, respectively, thereby realizing the embodiments of this application. Figures 3-6 The provided data encoding and decoding methods. That is, the memory 906 stores data for executing the embodiments of this application. Figures 3-6 The provided instructions for data encoding and data decoding methods.
[0342] The communication interface 908 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 900 and other devices or communication networks.
[0343] The display can include various display devices that can perform display functions, such as plasma displays and liquid crystal displays. The computing device 900 can perform data display functions through the display.
[0344] Input devices can include various input devices such as keyboards, mice, and touch screens that enable user input.
[0345] This application also provides a chip system. The chip system may include a processor and a power supply circuit. The power supply circuit supplies power to the processor, which executes the embodiments of this application. Figures 3-6 The steps or operations of the provided data encoding and decoding methods.
[0346] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to execute the embodiments of this application. Figures 3-6 The provided data encoding and decoding methods, including their steps or operations, can be used, for example, to execute embodiments of this application. Figures 3-6 The provided instructions for the steps or operations of the data encoding and decoding methods.
[0347] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute embodiments of this application. Figures 3-6 The provided data encoding and decoding methods, including their steps or operations, can be used, for example, to execute embodiments of this application. Figures 3-6 The provided instructions for the steps or operations of the data encoding and decoding methods.
[0348] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.
[0349] The terms “first,” “second,” “third,” and “fourth,” etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to define a specific order.
[0350] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
Claims
1. A data encoding method, characterized in that, The method includes: The intermediate grid encoding result is obtained based on the data to be encoded, wherein the data to be encoded includes any one or more vector representation data of images, text and audio, and the intermediate grid encoding result is the grid encoding result obtained by mapping the data to be encoded to grid points in the first dimension; A dimensional transformation operation is performed on the intermediate grid encoding result to map the intermediate grid encoding result to the grid points of the second dimension, thereby obtaining the target grid encoding result of the data to be encoded, wherein the second dimension is greater than the first dimension.
2. The method according to claim 1, characterized in that, The step of obtaining the intermediate lattice encoding result based on the data to be encoded includes: performing a mapping operation on the data to be encoded to obtain the intermediate lattice encoding result, wherein the mapping operation is independent of the lattice basis.
3. The method according to claim 1 or 2, characterized in that, The dimension transformation operation is used to perform calculations based on the intermediate lattice encoding result to update the intermediate lattice encoding result, and the calculations are independent of the lattice basis.
4. The method according to any one of claims 1-3, characterized in that, The data to be encoded includes multiple elements, and obtaining the intermediate grid encoding result based on the data to be encoded includes: Multiple elements of the data to be encoded are mapped to multiple grid points in the first dimension to obtain the intermediate grid encoding result, wherein at least two elements of the multiple elements of the data to be encoded are mapped to a grid point in the first dimension.
5. The method according to claim 4, characterized in that, The intermediate grid encoding result includes multiple grid point data. The step of performing a dimensionality transformation operation on the intermediate grid encoding result, mapping it to grid points in a second dimension, to obtain the target grid encoding result of the data to be encoded, includes: The intermediate grid encoding result is subjected to dimensional transformation so that the intermediate grid encoding result is mapped to the grid points of the second dimension, thereby obtaining updated multiple grid point data; The target grid encoding result of the data to be encoded is obtained based on the updated grid data.
6. The method according to claim 5, characterized in that, The multiple grid data points of the intermediate grid encoding result constitute at least one grid point combination, and the dimensional transformation operation on the intermediate grid encoding result includes: Update the target grid point data in the grid point combination based on at least two grid point data contained in the grid point combination.
7. The method according to any one of claims 1-6, characterized in that, The data to be encoded includes multiple elements, and the dimensional transformation of the encoding result of the intermediate cell includes: The intermediate grid encoding result is subjected to a dimensional transformation based on the target number of elements, wherein the target number is determined according to the number of elements in the data to be encoded.
8. The method according to any one of claims 1-7, characterized in that, The process of obtaining the intermediate grid encoding result based on the data to be encoded includes: The data to be encoded is mapped to grid points in the first dimension to obtain the initial grid encoding result; The initial lattice encoding result is adjusted based on the null space of the initial lattice encoding result to obtain the intermediate lattice encoding result.
9. The method according to any one of claims 1-8, characterized in that, The method further includes: The target grid encoding result of the data to be encoded is encrypted to obtain the encrypted result of the data to be encoded.
10. A data decoding method, characterized in that, The method includes: A dimension transformation operation is performed on the target grid encoding result to be decoded, so that the target grid encoding result is mapped to the grid points of the first dimension to obtain the intermediate grid encoding result. The target grid encoding result is the encoding result obtained by mapping the target data to the grid points of the second dimension. The target data includes any one or more vector representation data of images, text and audio, and the second dimension is greater than the first dimension. The decoding result of the target data is obtained based on the intermediate grid encoding result.
11. The method according to claim 10, characterized in that, The dimensionality transformation operation is used to perform calculations based on the target lattice encoding result to update the target lattice encoding result, and the calculations are independent of the lattice basis.
12. The method according to claim 10 or 11, characterized in that, The target lattice encoding result includes multiple elements, and the dimensional transformation operation on the target lattice encoding result to be decoded includes: Multiple grid point data of the second dimension are obtained from multiple elements of the target grid encoding result as the transformed target grid encoding result, wherein at least two elements of the multiple elements of the target grid encoding result are mapped to a grid point data of the second dimension. The transformed target grid encoding result is subjected to dimensional transformation so that the transformed target grid encoding result is mapped to the grid points of the first dimension, thereby obtaining multiple updated grid point data, which are used as the intermediate grid encoding result.
13. The method according to claim 12, characterized in that, The multiple grid point data of the transformed target grid encoding result constitute at least one grid point combination, and the dimensional transformation of the transformed target grid encoding result includes: Update the target grid point data in the grid point combination based on at least two grid point data contained in the grid point combination.
14. The method according to claim 12 or 13, characterized in that, The dimensional transformation of the transformed target lattice encoding result includes: The transformed target grid encoding result is subjected to a target number dimension transformation, wherein the target number is determined based on the number of grid data points in the transformed target grid encoding result.
15. The method according to any one of claims 10-14, characterized in that, The step of obtaining the decoding result of the target data based on the intermediate grid encoding result includes: Adjust the intermediate lattice encoding result according to the null space of the intermediate lattice encoding result to obtain the initial lattice encoding result; The decoding result of the target data is obtained based on the initial lattice encoding result.
16. The method according to any one of claims 10-15, characterized in that, The method further includes: Obtain the encryption result of the target data; The encryption result of the target data is decrypted to obtain the target grid encoding result to be decoded.
17. An encoding device, characterized in that, The encoding device includes a data conversion module and a dimension transformation module; The data to be encoded conversion module is used to obtain an intermediate grid encoding result based on the data to be encoded. The data to be encoded includes any one or more vector representation data of images, text and audio. The intermediate grid encoding result is a grid encoding result obtained by mapping the data to be encoded to grid points in the first dimension. The dimension transformation module is used to perform dimension transformation on the intermediate grid encoding result, so that the intermediate grid encoding result is mapped to the grid points of the second dimension, to obtain the target grid encoding result of the data to be encoded, wherein the second dimension is greater than the first dimension.
18. A decoding device, characterized in that, The decoding device includes a dimension transformation module and a decoding result acquisition module; The dimension transformation module is used to perform a dimension transformation operation on the target grid encoding result to be decoded. The target grid encoding result is the encoding result obtained by mapping the target data to the grid points of the second dimension. The target data includes any one or more vector representation data of images, text and audio. The dimension transformation operation is used to map the target grid encoding result to the grid points of the first dimension to obtain the intermediate grid encoding result. The second dimension is greater than the first dimension. The decoding result acquisition module is used to obtain the decoding result of the target data based on the intermediate grid encoding result.
19. A codec system, characterized in that, The system includes at least one device for performing the method as described in any one of claims 1-16.
20. A computing device, characterized in that, The computing device includes a processor and a memory; the processor is configured to execute instructions stored in the memory to cause the computing device to perform the method as described in any one of claims 1-9 or the method as described in any one of claims 10-16.
21. A chip system, characterized in that, The chip system includes a processor and a power supply circuit, the power supply circuit being used to supply power to the processor, the processor being used to perform the method as described in any one of claims 1-9 or the method as described in any one of claims 10-16.
22. A computer program product containing instructions, characterized in that, When the instructions are executed by at least one computing device, the at least one computing device performs the method as described in any one of claims 1-9 or the method as described in any one of claims 10-16.
23. A computer-readable storage medium, characterized in that, Includes computer program instructions, which, when executed by a cluster of computing devices, perform the method as described in any one of claims 1-9 or the method as described in any one of claims 10-16.