Coding method for three-dimensional grid, decoding method for three-dimensional grid and related device

By dividing the three-dimensional grid into grid sub-graphs and generating feature sequences, combined with the variable component quantization automatic encoder, the problem of insufficient storage resources of the existing three-dimensional grid is solved, and efficient three-dimensional grid compression and accurate reconstruction are achieved.

CN119850874BActive Publication Date: 2025-07-22SHENZHEN HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510335233.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-07-22
Estimated Expiration
2045-03-20

AI Technical Summary

Technical Problem

The existing three-dimensional grid encoding methods require a large amount of storage resources, resulting in inefficient storage.

Method used

The three-dimensional grid is divided into multiple grid sub-maps. Each grid sub-map includes n target vertices and n target vertices to abutment point. A feature sub-sequence is generated and a feature sequence is composed. The variable component quantization autoencoder is used to further compress to generate potential vectors.

Benefits of technology

It effectively reduces the resource requirements for storage vertices, realizes efficient compression of the three-dimensional grid, and can accurately reconstruct the original three-dimensional grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850874B_ABST
    Figure CN119850874B_ABST
Patent Text Reader

Abstract

An embodiment of the present application discloses a coding method for a three-dimensional mesh, which can code the three-dimensional mesh into a feature sequence. Since the number of repeated vertices in multiple mesh subgraphs corresponding to the feature sequence is small, resources for storing vertices can be saved, and effective compression of the three-dimensional mesh can be achieved. The coding method for the three-dimensional mesh includes: after a coding device divides the three-dimensional mesh into multiple mesh subgraphs, generating a feature subsequence corresponding to each mesh subgraph, the feature subsequence includes all vertex coordinates of the mesh subgraph and the adjacency matrix of the mesh subgraph, and then generating a feature sequence including all the feature subsequences. The present application also provides a decoding method for a three-dimensional mesh, a coding device, and a decoding device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing, and in particular, to a method for encoding a three-dimensional mesh, a method for decoding a three-dimensional mesh, and related devices. Background Art

[0002] A three-dimensional mesh (3D mesh) is a collection of polyhedral shapes, vertices, and polygons on the surface of a three-dimensional object.

[0003] Currently, there is a method for encoding a three-dimensional mesh, which includes: dividing the three-dimensional mesh into N triangular meshes, each triangular mesh including 3 vertices, and forming a sequence of the vertex coordinates of all the triangular meshes. The sequence includes 3N vertex coordinates.

[0004] Such a sequence requires a large amount of storage resources. Summary of the Invention

[0005] This application provides a method for encoding a three-dimensional mesh, which can generate multiple mesh subgraphs. The multiple mesh subgraphs include at least two non-repeating vertices, thus reducing the storage resources required for storing vertices, and effectively compressing the three-dimensional mesh. This application also provides a method for decoding a three-dimensional mesh, an encoding device, a decoding device, a computing device, a computer-readable storage medium, and a computer program product.

[0006] In a first aspect, a method for encoding a three-dimensional mesh is provided. The method includes: an encoding device divides a three-dimensional mesh into multiple mesh subgraphs, generates a feature subsequence corresponding to each mesh subgraph, and generates a feature sequence including all the feature subsequences. The feature subsequence includes all the vertex coordinates of the mesh subgraph and the adjacency matrix of the mesh subgraph.

[0007] The multiple mesh subgraphs include a first type of mesh subgraph. Each mesh subgraph in the first type of mesh subgraph includes n target vertices and the adjacent points of the n target vertices, and there is no intersection of the target vertices of any two mesh subgraphs in the first type of mesh subgraph. Therefore, there are fewer repeating vertices in the multiple mesh subgraphs, the total number of vertices of all the mesh subgraphs is less than the number of vertices of all the triangular meshes. Therefore, the vertex data volume of all the mesh subgraphs is smaller, and the storage resources required for the feature subsequence including the vertex coordinates are less, and effective compression of the three-dimensional mesh can be achieved.

[0008] In some possible implementation manners, the encoding device divides the three-dimensional mesh into a plurality of mesh sub-graphs, including steps A to C; wherein, step A includes: the encoding device selects n target vertices from the three-dimensional mesh to be processed, step B includes: the encoding device determines that the mesh sub-graph includes a first vertex set and a first adjacent edge set; step C includes: the encoding device updates the three-dimensional mesh to be processed to the remaining part after removing the n target vertices and the first adjacent edge set from the three-dimensional mesh to be processed; steps A to C are repeatedly executed until the number of adjacent vertices of each vertex in the three-dimensional mesh to be processed is less than n. Wherein, the initial data of the three-dimensional mesh to be processed is a three-dimensional mesh, the n target vertices include the first target vertex and the first n-1 vertices among the adjacent vertices of the first target vertex, the first vertex set includes the union of the n target vertices and the adjacent vertices of the n target vertices, and the first adjacent edge set is the union of the adjacent edges of the n target vertices. The selected mesh sub-graphs are all the first type of mesh sub-graphs. In this way, all or most of the three-dimensional mesh can be divided into the first type of mesh sub-graphs. There are fewer repeated vertices in the first type of mesh sub-graphs. Therefore, the feature sequence corresponding to the first type of mesh sub-graphs occupies less storage resources, and effective compression of the three-dimensional mesh can be achieved.

[0009] In some possible implementation manners, the encoding device divides a three-dimensional mesh into multiple mesh sub-graphs, including steps A to F. Step A includes: the encoding device selects n target vertices from the three-dimensional mesh to be processed; Step B includes: the encoding device determines that the mesh sub-graph includes a first vertex set and a first adjacent edge set; Step C includes: the encoding device updates the three-dimensional mesh to be processed to the remaining part after removing the n target vertices and the first adjacent edge set from the three-dimensional mesh to be processed; Steps A to C are repeatedly executed until the number of adjacent vertices of each vertex in the three-dimensional mesh to be processed is less than n; Step D includes: the encoding device selects a first target vertex and an adjacent vertex set from the three-dimensional mesh to be processed; Step E includes: the encoding device determines that the mesh sub-graph includes a second vertex set and a second adjacent edge set; Step F includes: the encoding device updates the three-dimensional mesh to be processed to the remaining part after removing the first target vertex, the adjacent vertex set, and the second adjacent edge set from the three-dimensional mesh to be processed; Steps D to F are repeatedly executed until the three-dimensional mesh to be processed is empty. Wherein, the initial data of the three-dimensional mesh to be processed is a three-dimensional mesh, the n target vertices include the first target vertex and the first n - 1 vertices among the adjacent vertices of the first target vertex, the first vertex set includes the union of the n target vertices and the adjacent vertices of the n target vertices, the first adjacent edge set is the union of the adjacent edges of the n target vertices, the second vertex set is the union of the first target vertex, the adjacent vertex set, and the adjacent vertices of all vertices in the adjacent vertex set, the adjacent vertex set includes all adjacent vertices of the first target vertex, and the second adjacent edge set is the union of the adjacent edges of the first target vertex and the adjacent edges of all vertices in the adjacent vertex set. In this way, the three-dimensional mesh can be divided into a large number of first-type mesh sub-graphs and a small number of second-type mesh sub-graphs. The total number of target vertices in the second-type mesh sub-graphs is less than n, so that all the mesh sub-graphs include all the adjacent edges and vertices of the three-dimensional mesh, and there are fewer repeated vertices in all the mesh sub-graphs. Therefore, the storage resources required for the feature sequences corresponding to all the mesh sub-graphs are less, and lossless compression of the three-dimensional mesh can be achieved.

[0010] In some possible implementation manners, the sequence numbers of the vertices in each layer of the three-dimensional mesh form an arithmetic sequence. The difference between the minimum sequence number of the vertices in the (i + 1)-th layer and the maximum sequence number of the vertices in the i-th layer is equal to the common difference of the arithmetic sequence. L is the number of vertex layers of the three-dimensional mesh, and i is a positive integer less than L.

[0011] In some possible implementation manners, the sequence numbers of the vertices in each layer of the three-dimensional mesh form an arithmetic sequence. The difference between the maximum sequence number of the vertices in the (i - 1)-th layer and the minimum sequence number of the vertices in the i-th layer is equal to the common difference of the arithmetic sequence. L is the number of vertex layers of the three-dimensional mesh, and i is a positive integer less than L.

[0012] In some possible implementation manners, the first target vertex is the vertex with the minimum sequence number in the mesh sub-graph.

[0013] In some possible implementations, the first target vertex is the vertex with the largest sequence number in the grid subgraph.

[0014] In some possible implementations, n is 2, 3 or 4. In this way, first-class grid subgraphs of different sizes can be obtained, that is, a variety of feasible solutions for segmenting three-dimensional grids are provided. It should be understood that the present application can set n to other integers greater than 1 according to actual needs.

[0015] In some possible implementations, the feature subsequence further includes a first separator and a second separator, the first separator is located between the coordinates of the last target vertex and the coordinates of the first adjacent point, and the second separator is located between the coordinates of the last adjacent point and the adjacency matrix. The first separator is used to separate the last target vertex and the adjacent point of the target vertex, and the second separator is used to separate the adjacent point of the target vertex and the adjacency matrix.

[0016] In some possible implementations, the adjacency matrix of the grid subgraph includes T values, where T is the total number of vertices in the grid subgraph, and the value is used to indicate the connection relationship between a vertex and all vertices in the grid subgraph. Using T values to represent the connection relationship of T vertices requires less storage resources.

[0017] In some possible implementations, the encoding method further includes: the encoding device inputs the feature sequence into a variational quantized variational autoencoder (VQVAE), and outputs a latent vector through the variational quantized variational autoencoder. The length of the feature sequence is greater than the length of the latent vector. The variational quantized variational autoencoder can compress the feature sequence, so that the feature sequence composed of all feature subsequences can be further compressed, thereby improving the compression rate.

[0018] The second aspect provides a three-dimensional grid decoding method, the method comprising: a decoding device receives a feature sequence, and decodes the feature sequence into a three-dimensional grid. The feature sequence includes a plurality of feature subsequences, and the feature subsequences are related to the grid subsequences of the three-dimensional grid. Figure 1 One-to-one correspondence, the grid subgraphs of the three-dimensional grid include the first type of grid subgraphs, each grid subgraph in the first type of grid subgraphs includes n target vertices and n adjacent points of the target vertices, and the target vertices of any two grid subgraphs in the first type of grid subgraphs have no intersection, and n is an integer greater than 1. This provides a method for restoring a feature sequence to a three-dimensional grid.

[0019] In some possible implementations, the grid subgraph of the three-dimensional grid further includes a second type of grid subgraph, and the number of target vertices in the second type of grid subgraph is less than n.

[0020] In some possible implementation manners, the above decoding method further includes: after receiving the latent vector, the decoding device inputs the latent vector into the decoder of the variational quantization autoencoder, and outputs a three-dimensional mesh through the decoder.

[0021] In some possible implementation manners, the decoding method of the three-dimensional mesh further includes: the decoding device receives the intent text input by the user; when the intent text includes the keyword corresponding to the three-dimensional mesh, the decoding device inputs the intent text into the autoregressive model, outputs the latent vector corresponding to the intent text through the autoregressive model, and then inputs the latent vector corresponding to the intent text into the decoder of the variational quantization autoencoder, and outputs a three-dimensional mesh through the decoder. In this way, a method for generating a three-dimensional mesh according to the user's intent text is provided, which has the advantages of simplicity and high efficiency.

[0022] A third aspect provides a method for training a variational quantization autoencoder, and the method includes: after the data training device obtains a three-dimensional mesh set, encoding the three-dimensional meshes in the three-dimensional mesh set into feature sequences respectively to obtain a feature sequence set, and then performing model training according to the feature sequence set to obtain a variational quantization autoencoder.

[0023] In some possible implementation manners, the variational quantization autoencoder includes an encoder and a decoder. The encoder is used to convert the feature sequence into a latent vector, and the decoder is used to generate a target feature sequence similar to the feature sequence according to the latent vector from the encoder.

[0024] In some possible implementation manners, the encoder includes a convolutional neural network and a quantization neural network. The convolutional neural network is used to perform convolution on the feature sequence, and the quantization neural network is used to generate a latent vector according to the vector obtained by convolution of the convolutional neural network.

[0025] In some possible implementation manners, the quantization neural network is a clustering quantization neural network, a finite scalar quantization (FSQ) neural network, or a look-up free quantization (LFQ) neural network.

[0026] A fourth aspect provides a method for training an autoregressive model, and the method includes: after the data training device obtains a training set, performing model training according to the training set to obtain an autoregressive model. Wherein, the training set includes multiple samples, and each sample includes the keyword corresponding to the three-dimensional mesh and the latent vector corresponding to the three-dimensional mesh. The keyword corresponding to the three-dimensional mesh is used as the input data of the autoregressive model, and the latent vector corresponding to the three-dimensional mesh is used as the label of the autoregressive model.

[0027] In some possible implementation manners, the autoregressive model is a transformer model.

[0028] The fifth aspect provides an encoding device, which includes a segmentation module and a serialization module. The segmentation module is used to divide a three-dimensional mesh into multiple mesh subgraphs, and the serialization module is used to generate a feature subsequence corresponding to each mesh subgraph and generate a feature sequence including all the feature subsequences.

[0029] In some possible implementation manners, the segmentation module is specifically configured to repeatedly execute steps A to C until the number of adjacent vertices of each vertex in the three-dimensional mesh to be processed is less than n.

[0030] In some possible implementation manners, the segmentation module is specifically configured to repeatedly execute steps A to C until the number of adjacent vertices of each vertex in the three-dimensional mesh to be processed is less than n; and then repeatedly execute steps D to F until the three-dimensional mesh to be processed is empty.

[0031] In some possible implementation manners, the encoding device further includes an encoding module. The encoding module is specifically configured to input the feature sequence generated by the serialization module into a variational quantization autoencoder and output a latent vector through the variational quantization autoencoder.

[0032] For the glossary of terms, the steps executed by each module, and the beneficial effects in the fifth aspect, reference may be made to the corresponding descriptions in the first aspect.

[0033] The sixth aspect provides a decoding device, which includes a receiving module and a decoding module. The receiving module is used to receive a feature sequence, and the decoding module is used to decode the feature sequence received by the receiving module into a three-dimensional mesh.

[0034] In some possible implementation manners, the mesh subgraph of the three-dimensional mesh further includes a second type of mesh subgraph, and the number of target vertices in the second type of mesh subgraph is less than n.

[0035] In some possible implementation manners, the receiving module is further used to receive a latent vector, and the decoding module is further used to input the latent vector into the decoder of the variational quantization autoencoder and output a three-dimensional mesh through the decoder.

[0036] In some possible implementation manners, the receiving module is further used to receive the intent text input by the user; when the intent text includes the keyword corresponding to the three-dimensional mesh, the decoding module is further used to input the intent text into an autoregressive model, output the latent vector corresponding to the intent text through the autoregressive model; and input the latent vector corresponding to the intent text into the decoder of the variational quantization autoencoder and output a three-dimensional mesh through the decoder.

[0037] For the glossary of terms, the steps executed by each module, and the beneficial effects in the sixth aspect, reference may be made to the corresponding descriptions in the second aspect.

[0038] The seventh aspect provides a data training device, which includes a serialization module and a training module. The serialization module is used to obtain a three-dimensional mesh set and then encode the three-dimensional meshes in the three-dimensional mesh set into feature sequences respectively to obtain a feature sequence set. The training module is used to perform model training according to the feature sequence set to obtain a variational quantization autoencoder.

[0039] In some possible implementation manners, the variational quantization autoencoder includes an encoder and a decoder. The encoder is used to convert the feature sequence into a latent vector, and the decoder is used to generate a target feature sequence similar to the feature sequence according to the latent vector from the encoder.

[0040] In some possible implementation manners, the encoder includes a convolutional neural network and a quantization neural network. The convolutional neural network is used to perform convolution on the feature sequence, and the quantization neural network is used to generate a latent vector according to the vector obtained by convolution of the convolutional neural network.

[0041] In some possible implementation manners, the quantization neural network is a clustering quantization neural network, a finite scalar quantization neural network, or a query-free quantization neural network.

[0042] The eighth aspect provides a data training device, which includes an acquisition module and a training module. The acquisition module is used to acquire a training set, and the training module is used to perform model training according to the training set to obtain an autoregressive model. Among them, the training set includes multiple samples, and a sample includes a keyword corresponding to a three-dimensional mesh and a latent vector corresponding to the three-dimensional mesh. The keyword corresponding to the three-dimensional mesh is used as input data of the autoregressive model, and the latent vector corresponding to the three-dimensional mesh is used as a label of the autoregressive model.

[0043] In some possible implementation manners, the autoregressive model is a transformer model.

[0044] The ninth aspect provides a computing device, which includes a processor and a memory. The memory stores computer-readable instructions, and the processor executes the computer-readable instructions so that the computing device executes the methods in the above aspects or any one of the possible implementation manners in the above aspects.

[0045] The tenth aspect provides a computer-readable storage medium, which includes computer-readable instructions; the computer-readable instructions are used to implement the methods in the above aspects or any one of the possible implementation manners in the above aspects.

[0046] The eleventh aspect provides a computer program product, which includes computer-readable instructions; the computer-readable instructions are used to implement the methods in the above aspects or any one of the possible implementation manners in the above aspects. Description of the Drawings

[0047] Figure 1A schematic diagram for encoding a 3D mesh into a feature sequence in an embodiment of this application;

[0048] Figure 2 A schematic diagram for decoding a feature sequence into a 3D mesh in an embodiment of this application;

[0049] Figure 3 A schematic diagram for encoding a 3D mesh into a latent vector in an embodiment of this application;

[0050] Figure 4 Another schematic diagram for encoding a 3D mesh into a latent vector in an embodiment of this application;

[0051] Figure 5 A schematic diagram for decoding a latent vector into a 3D mesh in an embodiment of this application;

[0052] Figure 6 Another schematic diagram for decoding a latent vector into a 3D mesh in an embodiment of this application;

[0053] Figure 7 Another schematic diagram for decoding an intent text into a 3D mesh in an embodiment of this application;

[0054] Figure 8 A schematic diagram for a data training device in an embodiment of this application;

[0055] Figure 9 Another schematic diagram for a data training device in an embodiment of this application;

[0056] Figure 10 A flowchart for an encoding method of a 3D mesh in an embodiment of this application;

[0057] Figure 11 A schematic diagram for the corresponding relationship between a mesh sub - graph and an adjacency matrix in an embodiment of this application;

[0058] Figure 12 A flowchart for segmenting a 3D mesh in an embodiment of this application;

[0059] Figure 13 Another flowchart for segmenting a 3D mesh in an embodiment of this application;

[0060] Figure 14 A schematic diagram for a 3D mesh in an embodiment of this application;

[0061] Figure 15 A schematic diagram for a 3D mesh sub - graph in an embodiment of this application;

[0062] Figure 16 A schematic diagram for a decoding method in an embodiment of this application;

[0063] Figure 17 A structural diagram of a computing device in an embodiment of the present application;

[0064] Figure 18 A structural diagram of a computing device cluster in an embodiment of the present application;

[0065] Figure 19 Another structural diagram of a computing device cluster in an embodiment of the present application. Detailed implementation manners

[0066] The encoding method and decoding method of the three-dimensional grid in the present application can be applied to image processing scenarios, such as games, digital humans, or clothing design, etc. The encoding device of the present application can be an encoding device providing cloud services or a local encoding device, and the decoding device can be a decoding device providing cloud services or a local decoding device.

[0067] The following introduces the process of encoding a three-dimensional grid into a feature sequence in combination with the encoding device of the present application. Please refer to Figure 1 , in one embodiment, the encoding device 100 includes a segmentation module 101 and a serialization module 102. After the user inputs a three-dimensional grid into the encoding device 100, the segmentation module 101 divides the three-dimensional grid into multiple grid sub-graphs, and the serialization module 102 generates a feature sub-sequence corresponding to each grid sub-graph, and then generates a feature sequence including all the feature sub-sequences.

[0068] Please refer to Figure 2 , in one embodiment, the decoding device 200 includes a receiving module 201 and a decoding module 202. The receiving module 201 is used to receive the feature sequence, and the decoding module 202 is used to decode the feature sequence into a three-dimensional grid. The three-dimensional grid in the present application can be, but is not limited to, a character model, an item model, a scene model, an online digital human model, or a clothing model in a game, and can be specifically set according to actual situations, and the present application does not make any limitations.

[0069] Refer to Figure 3 , in one embodiment, the encoding device 100 includes a segmentation module 101, a serialization module 102, and an encoding module 103. After the user inputs a three-dimensional grid into the encoding device 100, the segmentation module 101 divides the three-dimensional grid into multiple grid sub-graphs, the serialization module 102 generates a feature sub-sequence corresponding to each grid sub-graph, and then generates a feature sequence including all the feature sub-sequences. The encoding module 103 is specifically used to input the feature sequence into a variational quantization auto-encoder, and output a latent vector through the variational quantization auto-encoder.

[0070] The following introduces the encoding method of the three-dimensional grid in combination with an embodiment. Please refer to Figure 4, in one embodiment, after the user inputs the three-dimensional model of a flower, the segmentation module 101 divides the three-dimensional mesh of the flower into multiple mesh sub-graphs, the serialization module 102 generates feature subsequences corresponding to each mesh sub-graph, such as feature subsequence 1 to feature subsequence P, generates a feature sequence including all the feature subsequences, and the encoding module 103 is specifically configured to input the feature sequence into a variational quantization autoencoder and output a latent vector through the variational quantization autoencoder. It should be understood that P is an integer greater than 1.

[0071] Refer to Figure 5 , in some embodiments, the receiving module 201 is further configured to receive a latent vector, and the decoding module 202 is specifically configured to input the latent vector received by the receiving module 201 into the decoder of the variational quantization autoencoder and output a three-dimensional mesh through the decoder.

[0072] The decoding method is introduced below in conjunction with an embodiment. Refer to Figure 6 , in one embodiment, the receiving module 201 is further configured to receive a latent vector from the user, and the decoding module 202 is specifically configured to input the latent vector received by the receiving module 201 into the decoder of the variational quantization autoencoder and output the three-dimensional mesh of the flower through the decoder.

[0073] Refer to Figure 7 , in another embodiment, the receiving module 201 is further configured to receive the intent text input by the user (such as a blooming flower); when the intent text includes a flower, the decoding module 202 is further configured to input the intent text into an autoregressive model and output a latent vector corresponding to the intent text through the autoregressive model; input the latent vector corresponding to the intent text into the decoder of the variational quantization autoencoder and output the three-dimensional mesh of the flower through the decoder.

[0074] This application includes a data training device for training a variational quantization autoencoder. Refer to Figure 8 , in another embodiment, this application further provides a data training device 800, which includes an encoding module 801 and a training module 802. The encoding module 801 is configured to, after obtaining a set of three-dimensional meshes, encode the three-dimensional meshes of the set of three-dimensional meshes into feature sequences respectively to obtain a set of feature sequences, and the training module 802 is configured to perform model training according to the set of feature sequences to obtain a variational quantization autoencoder. The specific method for the encoding module 801 to encode the three-dimensional meshes of the set of three-dimensional meshes into feature sequences respectively is similar to the method for the encoding device 100 to encode a three-dimensional mesh into a feature sequence, and specific reference can be made to the corresponding description in the foregoing text.

[0075] In some possible implementation manners, the variational quantization autoencoder includes an encoder and a decoder. The encoder is configured to convert a feature sequence into a latent vector, and the decoder is configured to generate a target feature sequence similar to the feature sequence according to the latent vector from the encoder.

[0076] In some possible implementations, the encoder includes a convolutional neural network and a quantization neural network. The convolutional neural network is used to perform convolution on the feature sequence, and the quantization neural network is used to generate a latent vector according to the vector obtained by the convolution of the convolutional neural network.

[0077] The following introduces the process of training the variational quantization autoencoder by the training module 802. Training the variational quantization autoencoder includes the processes of training the encoder and the decoder. In the process of training the encoder, the feature sequence is input into the encoder, processed by one or more convolutional neural networks of the encoder, and then processed by one or more quantization neural networks, so as to obtain the latent vector z. The quantization neural network can be, but is not limited to, a clustering quantization neural network, a finite scalar quantization neural network, or a query-free quantization neural network.

[0078] In the process of training the decoder, the latent vector z is input into the decoder, and a three-dimensional grid is output by the decoder. The loss between the three-dimensional grid output by the decoder and the original three-dimensional grid corresponding to the feature sequence is calculated according to the loss function, the gradient is calculated by the backpropagation algorithm, and the model parameters of the variational quantization autoencoder are updated according to the gradient and the learning rate. Among them, the loss function can be, but is not limited to, the mean square error loss function or the cross-entropy loss function. The model parameters θ, the learning rate η, and the gradient ▽L satisfy the following formula: θ = θ - η▽L.

[0079] Iteratively execute the above steps of training the encoder and the decoder until the loss function converges or reaches the preset number of training epochs. In the variational quantization autoencoder, the number of convolutional neural network layers, the number of quantization neural network layers, the number of convolutional kernels in the convolutional neural network, the size of the quantization neural network, and the learning rate of the encoder can all be adjusted according to the actual situation, and this application does not make a limitation.

[0080] This application also includes a data training device for training an autoregressive model. Refer to Figure 9, in another embodiment, the data training device 900 includes an acquisition module 901 and a training module 902. The acquisition module 901 is used to acquire a training set, and the training module 902 is used to perform model training according to the training set to obtain an autoregressive model. Among them, the training set includes multiple samples, and each sample includes a keyword corresponding to a three-dimensional grid and a latent vector corresponding to the three-dimensional grid. The keyword corresponding to the three-dimensional grid is used as the input data of the autoregressive model, and the latent vector corresponding to the three-dimensional grid is used as the label of the autoregressive model. Optionally, the autoregressive model is a transformer model. The transformer model includes an encoder and a decoder. The encoder includes multiple encoding layers, and each encoding layer includes a multi-head attention layer and a feed-forward neural network layer. The decoder includes multiple decoding layers, and each decoding layer includes a masked multi-head attention layer, a multi-head attention layer, and a feed-forward neural network layer. The encoder can convert the input text into a vector, and the decoder can generate the next output data according to the output data of the encoder and the historical output data.

[0081] The process of the training module 902 training the autoregressive model is introduced below. In one embodiment, the keyword corresponding to the three-dimensional grid is converted into a vector X, and the latent vector corresponding to the three-dimensional grid is used as the observation vector Y. They satisfy the following formula: Y = Xβ + ε, where β is the parameter of the autoregressive model, and ε is the error vector. β is estimated using the least squares method. It should be understood that the method for training the autoregressive model is not limited to the above example, and other methods can also be used for training, and this application does not limit it.

[0082] Since the amount of data of all triangular meshes in the prior art is large and requires a lot of storage resources, this application provides another method for saving three-dimensional grid data as a feature sequence, which can reduce the storage resources of three-dimensional grid data. Please refer to Figure 10 , in one embodiment, the encoding method of the three-dimensional grid in this application includes the following steps:

[0083] S1001. The encoding device divides the three-dimensional grid into multiple grid subgraphs.

[0084] Among them, the three-dimensional grid can be regarded as a three-dimensional grid model. The three-dimensional grid includes multiple triangular meshes. The multiple grid subgraphs include the first type of grid subgraphs. Each grid subgraph in the first type of grid subgraphs includes n target vertices and the adjacent vertices of the n target vertices. The vertices in the first type of grid subgraphs can be regarded as the set of the n target vertices and the adjacent vertices of the n target vertices. There is no intersection of the target vertices of any two grid subgraphs in the first type of grid subgraphs. n is an integer greater than 1. The vertices in a single grid subgraph are unique. There are no common edges between any two grid subgraphs among the multiple grid subgraphs, and there are few repeated vertices among the multiple grid subgraphs. In this way, the storage resources required for the obtained grid subgraphs are less. The multiple grid subgraphs may further include the second type of grid subgraphs, and the number of target vertices of the second type of grid subgraphs is less than n.

[0085] S1002. The encoding device generates a feature subsequence corresponding to each grid subgraph. The feature subsequence includes all vertex coordinates of the grid subgraph and the adjacency matrix of the grid subgraph.

[0086] Taking the first type of grid subgraph as an example, if the grid subgraph includes n target vertices and the adjacent vertices of the n target vertices, then the feature subsequence of the grid subgraph includes {coordinates of target vertex 1, coordinates of target vertex 2,..., coordinates of target vertex n, coordinates of adjacent vertex 1, coordinates of adjacent vertex 2,..., coordinates of the last adjacent vertex, adjacency matrix}. Optionally, n is 2, 3, or 4. In this way, the three-dimensional grid can be divided into grid subgraphs of different sizes. Optionally, the feature subsequence further includes a first delimiter and a second delimiter. The first delimiter is located between the coordinates of the last target vertex and the coordinates of the first adjacent vertex. The first delimiter is used to separate the last target vertex and the adjacent vertices of the target vertex. The second delimiter is located between the coordinates of the last adjacent vertex and the adjacency matrix. The second delimiter is used to separate the adjacent vertices of the target vertex and the adjacency matrix. For example, {coordinates of target vertex 1, coordinates of target vertex 2,..., coordinates of target vertex n, first delimiter, coordinates of adjacent vertex 1, coordinates of adjacent vertex 2,..., coordinates of the last adjacent vertex, second delimiter, adjacency matrix}.

[0087] The adjacency matrix of the grid subgraph is used to indicate the connection relationship of all vertices of the grid subgraph. In some embodiments, the adjacency matrix of the grid subgraph includes T values, where T is the total number of vertices of the grid subgraph, and the i-th value is used to indicate the connection relationship between the i-th vertex and all vertices in the grid subgraph. In this way, an adjacency matrix with less storage resource occupation is provided.

[0088] Refer to Figure 11 , in one embodiment, the grid subgraph 1101 includes 6 vertices, namely vertex 1, vertex 2, vertex 5, vertex 6, vertex 7, and vertex 11. If two vertices are connected, the connection relationship between the two vertices is in the original adjacency matrix A ijThe value in it is 1. If two vertices are not connected, the connection relationship between the two vertices in the original adjacency matrix A ij is 0. From this, the original adjacency matrix A ij is as follows:

[0089]

[0090] a ij is the value at the i-th row and j-th column. a ji is the value at the j-th row and i-th column. The values of the i-th row can represent the connection relationship between the i-th vertex and all vertices in the grid subgraph, and the values of the i-th column can represent the connection relationship between the i-th vertex and all vertices in the grid subgraph. If the i-th vertex is connected to the j-th vertex, then a ij and a ji are both 1. If the i-th vertex is not connected to the j-th vertex, then a ij and a ji are both 0. In some embodiments, the values of each row in the original adjacency matrix are recorded as an integer, thereby obtaining an adjacency matrix including T integers. For example, 011100 is recorded as 28. In some other embodiments, the values of each column in the original adjacency matrix are recorded as an integer, thereby obtaining an adjacency matrix including T integers.

[0091] In some other embodiments, the original adjacency matrix A ij is an upper triangular matrix, and this upper triangular matrix is as follows:

[0092]

[0093] a ij is the value at the i-th row and j-th column. The values of the i-th row can represent the connection relationship between the i-th vertex and all vertices in the grid subgraph. In some embodiments, the values of each row in the original adjacency matrix are recorded as an integer, thereby obtaining an adjacency matrix including T integers.

[0094] In some other embodiments, the original adjacency matrix A ij is a lower triangular matrix, and this lower triangular matrix is as follows:

[0095]

[0096] a ij is the value at the i-th row and j-th column. The values of the i-th column can represent the connection relationship between the i-th vertex and all vertices in the grid subgraph. In some embodiments, the values of each column in the original adjacency matrix are recorded as an integer, thereby obtaining an adjacency matrix including T integers.

[0097] In some other embodiments, the adjacency matrix of the grid sub-graph includes T*T values, and each value can be either 0 or 1. In some other embodiments, the adjacency matrix of the grid sub-graph is an upper triangular matrix, which includes T*(T + 1) / 2 values, and each value can be either 0 or 1. In some other embodiments, the adjacency matrix of the grid sub-graph is a lower triangular matrix, which includes T*(T + 1) / 2 values, and each value can be either 0 or 1. It should be understood that the values of T, i, and j can be set according to actual situations, and the present application does not make any limitations.

[0098] S1003. The encoding device generates a feature sequence including all the feature sub-sequences.

[0099] In this embodiment, the multiple grid sub-graphs include the first type of grid sub-graphs. Each grid sub-graph in the first type of grid sub-graphs includes n target vertices and the adjacent points of the n target vertices, and there is no intersection among the target vertices of any two grid sub-graphs in the first type of grid sub-graphs. Therefore, there are fewer duplicate vertices in the multiple grid sub-graphs, the total number of vertices of all the grid sub-graphs is less than the number of vertices of all the triangular grids. Therefore, the vertex data volume of all the grid sub-graphs is smaller, the feature sub-sequence including vertex coordinates requires less storage resources, and effective compression of the three-dimensional grid can be achieved.

[0100] The present application can use various methods to divide the three-dimensional grid, which will be introduced in detail below. Refer to Figure 12 In an alternative embodiment, S1001 includes the following steps:

[0101] Step A: The encoding device selects n target vertices from the three-dimensional grid to be processed. The n target vertices include the first target vertex and the first n - 1 vertices among the adjacent points of the first target vertex.

[0102] Step B: The encoding device determines that the grid sub-graph includes a first vertex set and a first adjacent edge set. The first vertex set is the union of the n target vertices and the adjacent points of the n target vertices, and the first adjacent edge set is the union of the adjacent edges of the n target vertices.

[0103] Step C: The encoding device updates the three-dimensional grid to be processed to the remaining part after removing the n target vertices and the first adjacent edge set from the three-dimensional grid to be processed.

[0104] Steps A to C are executed in a loop until the number of adjacent points of each vertex in the three-dimensional grid to be processed is less than n.

[0105] In this embodiment, the initial data of the three-dimensional grid to be processed is a three-dimensional grid. By repeatedly executing steps A to C, all or most of the three-dimensional grid can be segmented into multiple first-type grid subgraphs. Since n target vertices of the previous grid subgraph are removed when segmenting the grid subgraph, the number of repetitions of the target vertices in the first-type grid subgraph is small. Compared with the existing triangular grid that includes a large number of repeated vertices, the repeated vertices can be reduced, thereby saving storage resources.

[0106] Among them, n can be, but is not limited to, 2, 3, or 4. In this way, first-type grid subgraphs of different sizes can be obtained. Different-sized feature sequences can be generated according to the first-type grid subgraphs of different sizes. In this application, the feature sequence with the smallest data volume can be selected for storage, thereby saving the most storage resources. It should be noted that when n = 3, the feature sequence generated based on the grid subgraph of this size has a good compression rate, and the error between the three-dimensional grid reconstructed based on this feature sequence and the original three-dimensional grid is small.

[0107] In some embodiments, the sequence numbers of the vertices in each layer of the three-dimensional grid form an arithmetic sequence. The difference between the minimum sequence number of the vertices in the (i + 1)-th layer and the maximum sequence number of the vertices in the i-th layer is equal to the common difference of the arithmetic sequence. L is the number of vertex layers of the three-dimensional grid, and i is a positive integer less than L. In some other embodiments, the sequence numbers of the vertices in each layer of the three-dimensional grid form an arithmetic sequence. The difference between the maximum sequence number of the vertices in the (i - 1)-th layer and the minimum sequence number of the vertices in the i-th layer is equal to the common difference of the arithmetic sequence. L is the number of vertex layers of the three-dimensional grid, and i is a positive integer less than L. In some embodiments, the first target vertex is the vertex with the smallest sequence number in the grid subgraph. In some embodiments, the first target vertex is the vertex with the largest sequence number in the grid subgraph.

[0108] In practical applications, the grid subgraph of the three-dimensional grid may also include a second-type grid subgraph. The method for segmenting the second-type grid subgraph from the three-dimensional grid will be introduced below. Refer to Figure 13 In an optional embodiment, S1001 includes the following steps:

[0109] Step A: The encoding device selects n target vertices from the three-dimensional grid to be processed. The n target vertices include the first target vertex and the first n - 1 vertices among the adjacent vertices of the first target vertex.

[0110] Step B: The encoding device determines that the grid subgraph includes a first vertex set and a first adjacent edge set. The first vertex set is the union of the n target vertices and the adjacent vertices of the n target vertices, and the first adjacent edge set is the union of the adjacent edges of the n target vertices.

[0111] Step C: The encoding device updates the three-dimensional grid to be processed to the remaining part after removing the n target vertices and the first adjacent edge set from the three-dimensional grid to be processed.

[0112] Execute steps A to C in a loop until the number of adjacent points of each vertex in the three-dimensional grid to be processed is less than n.

[0113] Step D: The encoding device selects a first target vertex and a set of adjacent points from the three-dimensional grid to be processed. The set of adjacent points includes all adjacent points of the first target vertex.

[0114] Step E: The encoding device determines that the grid subgraph includes a second vertex set and a second adjacent edge set. The second vertex set is the union of the first target vertex, the set of adjacent points, and the adjacent points of all vertices in the set of adjacent points. The second adjacent edge set is the union of the adjacent edges of the first target vertex and the adjacent edges of all vertices in the set of adjacent points.

[0115] Step F: The encoding device updates the three-dimensional grid to be processed to the remaining part after removing the first target vertex, the set of adjacent points, and the second adjacent edge set from the three-dimensional grid to be processed.

[0116] Execute steps D to F in a loop until the three-dimensional grid to be processed is empty.

[0117] In this embodiment, the initial data of the three-dimensional grid to be processed is a three-dimensional grid. By executing steps A to C in a loop, all or most of the three-dimensional grid can be divided into multiple first-type grid subgraphs. Since n target vertices of the previous grid subgraph are removed when dividing the grid subgraph, the number of repetitions of the target vertices in the first-type grid subgraph is small. Compared with the existing triangular grid that includes a large number of repeated vertices, the repeated vertices can be reduced, thus saving storage resources.

[0118] After executing steps A to C in a loop, if there are still remaining adjacent edges, then steps D to F can be executed in a loop, and the remaining three-dimensional grid can be divided into multiple second-type grid subgraphs. The number of target vertices in the second-type grid subgraph is less than n. When dividing the second-type grid subgraph from the three-dimensional grid to be processed, the vertices of the second-type grid subgraph are also removed. Therefore, the number of repeated vertices in the second-type grid subgraph is also small, and the required storage resources are also small.

[0119] It should be noted that since the adjacent edges of n target vertices are removed when selecting the grid subgraph, there are no common adjacent edges in the first-type grid subgraph. Similarly, there are no common adjacent edges in the second-type grid subgraph. In the case where all adjacent edges are added to the grid subgraph, the three-dimensional grid to be processed is empty.

[0120] For ease of understanding, the method for dividing a three-dimensional grid in this application will be introduced below with a specific example. Refer to Figure 14 , in an embodiment, the expanded three-dimensional grid 1400 is as Figure 14As shown, the vertices are numbered in the order from left to right and from bottom to top. The first layer includes vertices 1 to 4, the second layer includes vertices 5 to 10, the third layer includes vertices 11 to 15, and the fourth layer includes vertices 16 to 17.

[0121] Refer to Figure 15 , the first grid subgraph is denoted as grid subgraph 1401. First, select vertex 1. The adjacent vertices of vertex 1 include vertex 2, vertex 5, and vertex 6. Among them, the vertex with the smallest serial number is vertex 2, and the vertex with the second smallest serial number is vertex 5. The adjacent vertices of vertex 2 include vertex 1, vertex 6, and vertex 7. The adjacent vertices of vertex 5 include vertex 1, vertex 6, and vertex 11. Then the union of vertex 1, vertex 2, vertex 5, the adjacent vertices of vertex 1, the adjacent vertices of vertex 2, and the adjacent vertices of vertex 5 is {1, 2, 5, 6, 7, 11}. In this application, the adjacent edge from vertex i to vertex j is denoted as edge ij. Since the three-dimensional grid is an undirected graph, edge ij and edge ji can be considered the same edge. The adjacent edges of vertex 1 include edge 12, edge 15, and edge 16. The adjacent edges of vertex 2 include edge 21, edge 26, and edge 27. The adjacent edges of vertex 5 include edge 51, edge 56, and edge 511. Then the union of the adjacent edges of vertex 1, the adjacent edges of vertex 2, and the adjacent edges of vertex 5 is {edge 12, edge 15, edge 16, edge 26, edge 27, edge 56, edge 511}. The grid subgraph 1401 obtained therefrom includes {1, 2, 5, 6, 7, 11} and {edge 12, edge 15, edge 16, edge 26, edge 27, edge 56, edge 511}. Remove {1, 2, 5} and {edge 12, edge 15, edge 16, edge 26, edge 27, edge 56, edge 511} from the three-dimensional grid, and use the remaining part as the three-dimensional grid to be processed for selecting the second grid subgraph.

[0122] The second grid sub - graph is denoted as grid sub - graph 1402. Select vertex 3 from the remaining part. The adjacent vertices of vertex 3 include vertex 4, vertex 8, and vertex 9. Among them, the vertex with the smallest serial number is vertex 4, and the vertex with the second - smallest serial number is vertex 8. The adjacent vertices of vertex 4 include vertex 3, vertex 9, and vertex 10. The adjacent vertices of vertex 8 include vertex 7, vertex 9, vertex 13, and vertex 14. Then the union of vertex 3, vertex 4, vertex 8, the adjacent vertices of vertex 3, the adjacent vertices of vertex 4, and the adjacent vertices of vertex 8 is {3, 4, 8, 7, 9, 10, 13, 14}. The adjacent edges of vertex 3 include edge 34, edge 38, edge 39. The adjacent edges of vertex 4 include edge 43, edge 49, edge 410. The adjacent edges of vertex 8 include edge 83, edge 87, edge 89, edge 813, edge 814. Then the union of the adjacent edges of vertex 3, the adjacent edges of vertex 4, and the adjacent edges of vertex 8 is {edge 34, edge 38, edge 39, edge 49, edge 410, edge 87, edge 89, edge 813, edge 814}. The grid sub - graph 1402 obtained therefrom includes {3, 4, 8, 7, 9, 10, 13, 14} and {edge 34, edge 38, edge 39, edge 49, edge 410, edge 87, edge 89, edge 813, edge 814}. Remove {3, 4, 8} and {edge 34, edge 38, edge 39, edge 49, edge 410, edge 87, edge 89, edge 813, edge 814} from the three - dimensional grid, and use the remaining part as the three - dimensional grid to be processed for selecting the third grid sub - graph.

[0123] The third grid sub - graph is denoted as grid sub - graph 1403. Select vertex 6 from the remaining part. The adjacent vertices of vertex 6 include vertex 7, vertex 11, and vertex 12. Among them, the vertex with the smallest serial number is vertex 7, and the vertex with the second - smallest serial number is vertex 11. The adjacent vertices of vertex 7 include vertex 6, vertex 12, and vertex 13. The adjacent vertices of vertex 11 include vertex 6 and vertex 12. Then the union of vertex 6, vertex 7, vertex 11, the adjacent vertices of vertex 6, the adjacent vertices of vertex 7, and the adjacent vertices of vertex 11 is {6, 7, 11, 12, 13}. The adjacent edges of vertex 6 include edge 67, edge 611, edge 612. The adjacent edges of vertex 7 include edge 76, edge 712, edge 713. The adjacent edges of vertex 11 include edge 116, edge 1112. Then the union of the adjacent edges of vertex 6, the adjacent edges of vertex 7, and the adjacent edges of vertex 11 is {edge 67, edge 611, edge 612, edge 712, edge 713, edge 1112}. The grid sub - graph 1403 obtained therefrom includes {6, 7, 11, 12, 13} and {edge 67, edge 611, edge 612, edge 712, edge 713, edge 1112}. Remove {6, 7, 11} and {edge 67, edge 611, edge 612, edge 712, edge 713, edge 1112} from the three - dimensional grid, and use the remaining part as the three - dimensional grid to be processed for selecting the fourth grid sub - graph.

[0124] The fourth grid sub-graph is denoted as grid sub-graph 1404. Select vertex 9 from the remaining part. The adjacent vertices of vertex 9 include vertex 10, vertex 14, and vertex 15. Among them, the vertex with the smallest serial number is vertex 10, and the vertex with the second smallest serial number is vertex 14. The adjacent vertices of vertex 9 include vertex 10, vertex 14, and vertex 15. The adjacent vertices of vertex 14 include vertex 9, vertex 13, vertex 15, and vertex 17. Then the union of vertex 9, vertex 10, vertex 14, the adjacent vertices of vertex 9, the adjacent vertices of vertex 10, and the adjacent vertices of vertex 14 is {9, 10, 14, 13, 15, 17}. The adjacent edges of vertex 9 include edge 910, edge 914, and edge 915. The adjacent edges of vertex 10 include edge 109 and edge 1015. The adjacent edges of vertex 14 include edge 149, edge 1413, edge 1415, and edge 1417. Then the union of the adjacent edges of vertex 9, the adjacent edges of vertex 10, and the adjacent edges of vertex 14 is {edge 910, edge 914, edge 915, edge 1015, edge 1413, edge 1415, edge 1417}. The grid sub-graph 1404 obtained therefrom includes {9, 10, 14, 13, 15, 17} and {edge 910, edge 914, edge 915, edge 1015, edge 1413, edge 1415, edge 1417}. Remove {9, 10, 14} and {edge 910, edge 914, edge 915, edge 1015, edge 1413, edge 1415, edge 1417} from the three-dimensional grid, and use the remaining part as the three-dimensional grid to be processed for selecting the fifth grid sub-graph.

[0125] The fifth grid sub-graph is denoted as grid sub-graph 1405. Select vertex 12 from the remaining part. The adjacent vertices of vertex 12 include vertex 13, vertex 16, and vertex 17. Among them, the vertex with the smallest serial number is vertex 13, and the vertex with the second smallest serial number is vertex 16. The adjacent vertices of vertex 13 include vertex 12 and vertex 17, and the adjacent vertices of vertex 16 include vertex 12 and vertex 17. Then the union of vertex 12, vertex 13, vertex 16, the adjacent vertices of vertex 12, the adjacent vertices of vertex 13, and the adjacent vertices of vertex 16 is {12, 13, 16, 17}. The adjacent edges of vertex 12 include edge 1213 and edge 1216. The adjacent edges of vertex 13 include edge 1312, edge 1316, and edge 1317. The adjacent edges of vertex 16 include edge 1612, edge 1613, and edge 1617. Then the union of the adjacent edges of vertex 12, the adjacent edges of vertex 13, and the adjacent edges of vertex 17 is {edge 1213, edge 1216, edge 1316, edge 1317, edge 1617}. The grid sub-graph 1405 obtained therefrom includes {12, 13, 16, 17} and {edge 1213, edge 1216, edge 1316, edge 1317, edge 1617}. Remove {12, 13, 16} and {edge 1213, edge 1216, edge 1316, edge 1317, edge 1617} from the three-dimensional grid. Since the remaining vertices include vertex 15 and vertex 17, and at this time the number of adjacent vertices of vertex 15 and the number of adjacent vertices of vertex 17 are both 0, the division of the three-dimensional grid can be stopped.

[0126] The characteristic subsequence corresponding to grid sub-graph 1401 is {the coordinates of vertex 1, the coordinates of vertex 2, the coordinates of vertex 5 | the coordinates of vertex 6, the coordinates of vertex 7, the coordinates of vertex 11 | 28 38 37 56 16 8}. The coordinates of each vertex include the X-axis coordinate, the Y-axis coordinate, and the Z-axis coordinate. The length of the adjacency matrix is equal to the number of vertices of the grid sub-graph. Therefore, the length of the characteristic subsequence of grid sub-graph 1401 is 6 * 3 + 6. It can be inferred that the length of the characteristic subsequence of the grid sub-graph is equal to the number of vertices * 4.

[0127] The numbers of vertices of grid sub-graphs 1401 to 1405 are 6, 8, 5, 6, and 4 respectively. It can be seen that the length of the characteristic sequence of the three-dimensional grid 1400 = 6 * 4 + 8 * 4 + 5 * 4 + 6 * 4 + 4 * 4 = 116. When storing the three-dimensional grid with triangular meshes, the three-dimensional grid 1400 includes 18 triangles, and 18 triangle vertex coordinates are required. In this way, the sequence length = 9 * 18 = 162. It can be seen that the sequence length of this application is smaller. Therefore, storage resources can be saved and the compression ratio is improved.

[0128] In an alternative embodiment, the method for encoding a three-dimensional grid in the present application further includes: the encoding device inputs the feature sequence into a variational quantization autoencoder, and outputs a latent vector through the variational quantization autoencoder. The variational quantization autoencoder can further compress the feature sequence, thereby improving the compression rate of the compressed three-dimensional grid. In the present application, the compression rate refers to the percentage of the difference between the size of the original data and the size of the compressed data to the size of the original data.

[0129] The decoding method in the present application will be introduced below. Refer to Figure 16 , in one embodiment, the method for decoding a three-dimensional grid in the present application includes the following steps:

[0130] S1601. The decoding device receives the feature sequence.

[0131] Among them, the feature sequence includes a plurality of feature subsequences, and the feature subsequences correspond one-to-one to the grid sub- Figure 1 graphs of the three-dimensional grid. The feature subsequence includes all vertex coordinates of the grid sub-graph and the adjacency matrix of the grid sub-graph. The grid sub-graphs of the three-dimensional grid include a first type of grid sub-graph. Each grid sub-graph in the first type of grid sub-graph includes n target vertices and adjacent points of the n target vertices. The target vertices of any two grid sub-graphs in the first type of grid sub-graph have no intersection. In some possible embodiments, the grid sub-graphs of the three-dimensional grid further include a second type of grid sub-graph, and the number of target vertices in the second type of grid sub-graph is less than n. n is an integer greater than 1, such as 2, 3, 4, and the specific value is not limited.

[0132] S1602. The decoding device decodes the feature sequence into a three-dimensional grid.

[0133] The decoding device reconstructs the network sub-graph according to the feature subsequence, and forms a three-dimensional grid by combining the network sub-graphs.

[0134] In this embodiment, for a feature sequence with a high compression rate, the present application can restore the feature sequence to a three-dimensional grid, thereby providing an effective decoding method.

[0135] In some possible embodiments, the above decoding method further includes: the decoding device receives the latent vector, inputs the latent vector into the decoder of the variational quantization autoencoder, and outputs a three-dimensional grid through the decoder.

[0136] In this embodiment, for the latent vector obtained by processing the feature sequence using the variational quantization autoencoder, the decoding device can input it into the decoder of the variational quantization autoencoder, and output the corresponding three-dimensional grid through the decoder. It should be understood that the latent vector is also called the hidden vector, and it is shorter than the length of the feature sequence.

[0137] In some possible embodiments, the above decoding method further includes: the decoding device receives the intent text input by the user; when the intent text includes keywords corresponding to a three-dimensional mesh, the decoding device inputs the intent text into an autoregressive model, outputs a latent vector corresponding to the intent text through the autoregressive model, and then inputs the latent vector corresponding to the intent text into the decoder of the variational quantization autoencoder, and outputs a three-dimensional mesh through the decoder.

[0138] In this embodiment, the user can input the intent text, and the decoding device outputs a three-dimensional mesh according to the intent text, which can efficiently draw the corresponding three-dimensional mesh according to the user's needs.

[0139] The following introduces the hardware device in the present application. Refer to Figure 3 An encoding device 100 in the present application includes a segmentation module 101, a serialization module 102, and an encoding module 103. The segmentation module 101 is used to divide a three-dimensional mesh into multiple mesh subgraphs. The three-dimensional mesh includes multiple triangular meshes. The multiple mesh subgraphs include a first type of mesh subgraph. Each mesh subgraph in the first type of mesh subgraph includes n target vertices and adjacent vertices of the n target vertices. There is no intersection of the target vertices of any two mesh subgraphs in the first type of mesh subgraph.

[0140] The serialization module 102 is used to generate a feature subsequence corresponding to each mesh subgraph. The feature subsequence includes all vertex coordinates of the mesh subgraph and the adjacency matrix of the mesh subgraph; and generates a feature sequence including all the feature subsequences.

[0141] As an example of a software functional unit, the segmentation module 101 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above computing instance may be one or more. For example, the segmentation module 101 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers for running the code may be distributed in the same region, or may be distributed in different regions. Further, the multiple hosts / virtual machines / containers for running the code may be distributed in the same availability zone (AZ), or may be distributed in different AZs. Each AZ includes one data center or multiple geographically proximate data centers. Usually, one region may include multiple AZs.

[0142] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Usually, one VPC is set up within one region. To enable cross-region communication between two VPCs within the same region or between VPCs in different regions, a communication gateway needs to be set up within each VPC, and the interconnection between VPCs is achieved through the communication gateway.

[0143] As an example of a hardware functional unit, the splitting module 101 may include at least one computing device, such as a server. Alternatively, the splitting module 101 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). Among them, the above PLD may be implemented using a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0144] The multiple computing devices included in the splitting module 101 can be distributed within the same region or across different regions. The multiple computing devices included in the splitting module 101 can be distributed within the same availability zone (AZ) or across different AZs. Similarly, the multiple computing devices included in the splitting module 101 can be distributed within the same VPC or across multiple VPCs. Among them, the multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0145] In other embodiments, the splitting module 101 may be used to execute Figure 10 、 Figure 12 or Figure 13 any of the steps performed by the encoding device in the three-dimensional mesh encoding method shown, and the serialization module 102 may be used to execute Figure 10 、 Figure 12 or Figure 13 any of the steps performed by the encoding device in the three-dimensional mesh encoding method shown, and the encoding module 103 may be used to execute Figure 10 、 Figure 12 or Figure 13Any step performed by the encoding device in the encoding method of the three-dimensional mesh shown, the steps implemented by the segmentation module 101, the serialization module 102, and the encoding module 103 can be specified as needed and are implemented by the segmentation module 101, the serialization module 102, and the encoding module 103 respectively. Figure 10 , Figure 12 or Figure 13 different steps in the encoding method of the three-dimensional mesh shown to implement all functions of the encoding device. The encoding module 103 is an optional module.

[0146] In some embodiments, the segmentation module 101 is specifically configured to repeatedly execute steps A to C until the number of adjacent points of each vertex in the three-dimensional mesh to be processed is less than n.

[0147] In some embodiments, the segmentation module 101 is specifically configured to repeatedly execute steps A to C until the number of adjacent points of each vertex in the three-dimensional mesh to be processed is less than n; and then repeatedly execute steps D to F until the three-dimensional mesh to be processed is empty.

[0148] In some embodiments, the encoding device 100 further includes an encoding module 103, and the encoding module 103 is configured to input the feature sequence into a variational quantization autoencoder and output a latent vector through the variational quantization autoencoder.

[0149] Referring to Figure 5 , a decoding device 200 in the present application includes: a receiving module 201 for receiving a feature sequence; a decoding module 202 for decoding the feature sequence into a three-dimensional mesh.

[0150] As an example of a software functional unit, the decoding module 202 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the decoding module 202 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers for running the code may be distributed in the same region, or may be distributed in different regions. Further, the multiple hosts / virtual machines / containers for running the code may be distributed in the same availability zone (AZ), or may be distributed in different AZs, and each AZ includes one data center or multiple geographically close data centers. Among them, usually one region may include multiple AZs.

[0151] Similarly, multiple hosts / virtual machines / containers for running the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, one VPC is set up in one region. For cross-region communication between two VPCs within the same region and between VPCs in different regions, communication gateways need to be set up in each VPC, and the interconnection between VPCs is achieved through the communication gateways.

[0152] As an example of a hardware functional unit, the decoding module 202 may include at least one computing device, such as a server. Alternatively, the decoding module 202 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). Among them, the above PLD may be implemented by a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0153] The multiple computing devices included in the decoding module 202 can be distributed in the same region or in different regions. The multiple computing devices included in the decoding module 202 can be distributed in the same availability zone (AZ) or in different AZs. Similarly, the multiple computing devices included in the decoding module 202 can be distributed in the same VPC or in multiple VPCs. Among them, the multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0154] In other embodiments, the decoding module 202 may be used to execute Figure 16 any step performed by the decoding device in the decoding method of the three-dimensional grid shown, and the receiving module 201 may be used to execute Figure 16 any step performed by the decoding device in the decoding method of the three-dimensional grid shown. The steps to be implemented by the receiving module 201 and the decoding module 202 can be specified as needed, and all functions of the decoding device are implemented by separately implementing Figure 16 different steps in the decoding method of the three-dimensional grid shown.

[0155] In some embodiments, the receiving module 201 is further configured to receive a latent vector, which is obtained by processing a feature sequence using a variational quantization autoencoder; the decoding module 202 is further configured to input the latent vector into the decoder of the variational quantization autoencoder, and output a three-dimensional mesh through the decoder.

[0156] In some embodiments, the receiving module 201 is further configured to receive an intent text input by a user; when the intent text includes a keyword corresponding to a three-dimensional mesh, the decoding module 202 is further configured to input the intent text into an autoregressive model, output a latent vector corresponding to the intent text through the autoregressive model; input the latent vector corresponding to the intent text into the decoder of the variational quantization autoencoder, and output a three-dimensional mesh through the decoder.

[0157] This application also provides a computing device 1700. As Figure 17 shown, in one embodiment, the computing device 1700 includes: a bus 1702, a processor 1704, a memory 1706, and a communication interface 1708. The processor 1704, the memory 1706, and the communication interface 1708 communicate with each other through the bus 1702. It should be understood that this application does not limit the number of processors and memories in the computing device 1700.

[0158] The bus 1702 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 17 only one line is shown herein, but it does not mean that there is only one bus or one type of bus. The bus 1702 may include a path for transmitting information between various components of the computing device 1700 (for example, the memory 1706, the processor 1704, the communication interface 1708).

[0159] The processor 1704 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP), etc. The processor includes multiple processing cores.

[0160] The memory 1706 may include volatile memory, such as random access memory (RAM). The memory 1706 may also include non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid state drive (SSD). In some embodiments, executable program code is stored in the memory 1706, and the processor 1704 executes the executable program code to implement the functions of the foregoing segmentation module 101, serialization module 102, and encoding module 103, thereby implementing the encoding method of the three-dimensional grid. In other embodiments, executable program code is stored in the memory 1706, and the processor 1704 executes the executable program code to implement the functions of the foregoing receiving module 201 and decoding module 202, thereby implementing the decoding method of the three-dimensional grid.

[0161] The communication interface 1708 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1700 and other devices or a communication network.

[0162] Embodiments of this application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device may be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0163] As Figure 18 shown, the computing device cluster includes at least one computing device 1700. Instructions for executing the encoding method of the three-dimensional grid may be stored in the same manner in the memory 1706 of one or more of the computing devices 1700 in the computing device cluster.

[0164] In some possible implementation manners, partial instructions for executing the encoding method of the three-dimensional grid may also be stored separately in the memory 1706 of one or more of the computing devices 1700 in the computing device cluster. In other words, a combination of one or more of the computing devices 1700 may jointly execute the instructions for executing the encoding method of the three-dimensional grid.

[0165] It should be noted that the memories 1706 in different computing devices 1700 in the computing device cluster may store different instructions, respectively for performing partial functions of the encoding device. That is, the instructions stored in the memories 1706 in different computing devices 1700 can implement the functions of the segmentation module 101, the serialization module 102, and the encoding module 103. As Figure 19 shown, in the computing device 1700A, the memory 1706 stores executable program code, and the processor 1704 executes the executable program code to implement the functions of the aforementioned segmentation module 101 and serialization module 102. In the computing device 1700B, the memory 1706 stores executable program code, and the processor 1704 executes the executable program code to implement the function of the aforementioned encoding module 103.

[0166] The memories 1706 in one or more computing devices 1700 in the computing device cluster may also store the same instructions for executing the decoding method of the three-dimensional grid.

[0167] In some possible implementation manners, the memories 1706 in one or more computing devices 1700 in the computing device cluster may also separately store partial instructions for executing the decoding method of the three-dimensional grid. In other words, the combination of one or more computing devices 1700 can jointly execute the instructions for executing the decoding method of the three-dimensional grid.

[0168] It should be noted that the memories 1706 in different computing devices 1700 in the computing device cluster may store different instructions, respectively for performing partial functions of the decoding device. That is, the instructions stored in the memories 1706 in different computing devices 1700 can implement the functions of the receiving module 201 and the decoding module 202.

[0169] The embodiments of the present application also provide a computer program product containing instructions. The computer program product may be software or a program product containing instructions that can run on a computing device or be stored in any available medium. When the computer program product runs on at least one computing device, it causes at least one computing device to execute the encoding method of the three-dimensional grid or the decoding method of the three-dimensional grid of the present application.

[0170] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium may 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 may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state drive), etc. The computer-readable storage medium includes instructions that instruct the computing device to execute the encoding method of the three-dimensional grid or the decoding method of the three-dimensional grid of the present application.

[0171] The terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order different from that shown or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that comprises a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0172] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A coding method for a three-dimensional grid, characterized in that The method is applied to an encoding device, and the method includes: The encoding device divides a three-dimensional mesh into a plurality of mesh subgraphs. The three-dimensional mesh includes a plurality of triangular meshes. The plurality of mesh subgraphs includes a first type of mesh subgraph. Each mesh subgraph in the first type of mesh subgraph includes n target vertices and adjacent vertices of the n target vertices. The target vertices of any two mesh subgraphs in the first type of mesh subgraph have no intersection, and n is an integer greater than 1. The encoding device generates a corresponding feature subsequence for each of the mesh subgraphs. The feature subsequence includes all vertex coordinates of the mesh subgraph and the adjacency matrix of the mesh subgraph. The adjacency matrix of the mesh subgraph includes T values, where T is the total number of vertices of the mesh subgraph, and the values are used to indicate the connection relationship between one vertex and all vertices in the mesh subgraph. The encoding device generates a feature sequence including all the feature subsequences.

2. The method according to claim 1, wherein The encoding device divides the three-dimensional mesh into a plurality of mesh subgraphs, which includes: Step A: The encoding device selects n target vertices from the three-dimensional mesh to be processed. The n target vertices include a first target vertex and the first n - 1 vertices among the adjacent vertices of the first target vertex. The initial data of the three-dimensional mesh to be processed is the three-dimensional mesh. Step B: The encoding device determines that the mesh subgraph includes a first vertex set and a first adjacent edge set. The first vertex set includes the union of the n target vertices and the adjacent vertices of the n target vertices, and the first adjacent edge set is the union of the adjacent edges of the n target vertices. Step C: The encoding device updates the three-dimensional mesh to be processed to the remaining part after removing the n target vertices and the first adjacent edge set from the three-dimensional mesh to be processed. Steps A to C are executed cyclically until the number of adjacent vertices of each vertex in the three-dimensional mesh to be processed is less than n.

3. The method according to claim 1, characterized in that The encoding device divides the three-dimensional mesh into a plurality of mesh subgraphs, which includes: Step A: The encoding device selects n target vertices from the three-dimensional mesh to be processed. The n target vertices include a first target vertex and the first n - 1 vertices among the adjacent vertices of the first target vertex. The initial data of the three-dimensional mesh to be processed is the three-dimensional mesh. Step B: The encoding device determines that the mesh subgraph includes a first vertex set and a first adjacent edge set. The first vertex set includes the union of n target vertices and the adjacent vertices of the n target vertices, and the first adjacent edge set is the union of the adjacent edges of the n target vertices. Step C: The encoding device updates the three-dimensional mesh to be processed to the remaining part after removing the n target vertices and the first adjacent edge set from the three-dimensional mesh to be processed. Steps A to C are executed cyclically until the number of adjacent vertices of each vertex in the three-dimensional mesh to be processed is less than n. Step D: The encoding device selects a first target vertex and an adjacent vertex set from the three-dimensional mesh to be processed. The adjacent vertex set includes all adjacent vertices of the first target vertex. Step E: The encoding device determines that the mesh subgraph includes a second vertex set and a second adjacent edge set. The second vertex set is the union of the first target vertex, the set of adjacent vertices, and the adjacent vertices of all vertices in the set of adjacent vertices. The second adjacent edge set is the union of the adjacent edges of the first target vertex and the adjacent edges of all vertices in the set of adjacent vertices; Step F: The encoding device updates the to-be-processed 3D mesh to the remaining part after removing the first target vertex, the set of adjacent vertices, and the second adjacent edge set from the to-be-processed 3D mesh; Steps D to F are repeatedly executed until the to-be-processed 3D mesh is empty.

4. The method according to any one of claims 2 to 3, characterized in that The first target vertex is the vertex with the smallest serial number in the mesh subgraph, or the first target vertex is the vertex with the largest serial number in the mesh subgraph.

5. The method according to any one of claims 1 to 3, characterized in that, The n is 2, 3, or 4.

6. The method according to any one of claims 1 to 3, characterized in that, The feature subsequence further includes a first delimiter and a second delimiter. The first delimiter is located between the coordinates of the last target vertex and the coordinates of the first adjacent vertex. The second delimiter is located between the coordinates of the last adjacent vertex and the adjacency matrix.

7. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The encoding device inputs the feature sequence into a variational quantization autoencoder and outputs a latent vector through the variational quantization autoencoder.

8. A decoding method for a three-dimensional grid, characterized in that, The method is applied to a decoding device. The method includes: The decoding device receives a feature sequence. The feature sequence includes a plurality of feature subsequences, and the feature subsequences correspond one-to-one to the mesh subgraphs of the 3D mesh. The mesh subgraphs of the 3D mesh include a first type of mesh subgraph. Each mesh subgraph in the first type of mesh subgraph includes n target vertices and the adjacent vertices of the n target vertices. The target vertices of any two mesh subgraphs in the first type of mesh subgraph have no intersection. The n is an integer greater than 1. The feature subsequence includes the coordinates of all vertices of the mesh subgraph and the adjacency matrix of the mesh subgraph. The adjacency matrix of the mesh subgraph includes T values. The T is the total number of vertices of the mesh subgraph. The value is used to indicate the connection relationship between one vertex and all vertices in the mesh subgraph; The decoding device decodes the feature sequence into a 3D mesh.

9. The method according to claim 8, wherein The mesh subgraphs of the 3D mesh further include a second type of mesh subgraph. The number of target vertices in the second type of mesh subgraph is less than n.

10. The method according to claim 8 or 9, characterized in that The method further includes: The decoding device receives a latent vector, which is obtained by processing the feature sequence using a variational quantization autoencoder; The decoding device inputs the latent vector into the decoder of the variational quantization autoencoder and outputs the 3D mesh through the decoder.

11. The method according to any one of claims 8 to 9, characterized in that, The method further includes: The decoding device receives the intent text input by the user; When the intent text includes the keyword corresponding to the 3D mesh, the decoding device inputs the intent text into an autoregressive model and outputs the latent vector corresponding to the intent text through the autoregressive model; The decoding device inputs the latent vector corresponding to the intent text into the decoder of the variational quantization autoencoder and outputs the 3D mesh through the decoder.

12. An encoding device, characterized in that, including: A segmentation module, which is used to divide a three-dimensional mesh into multiple mesh subgraphs. The three-dimensional mesh includes multiple triangular meshes. The multiple mesh subgraphs include a first type of mesh subgraph. Each mesh subgraph in the first type of mesh subgraph includes n target vertices and adjacent vertices of the n target vertices. The target vertices of any two mesh subgraphs in the first type of mesh subgraph have no intersection, and n is an integer greater than 1; A serialization module, which is used to generate a feature subsequence corresponding to each mesh subgraph. The feature subsequence includes all vertex coordinates of the mesh subgraph and the adjacency matrix of the mesh subgraph. The adjacency matrix of the mesh subgraph includes T values, and T is the total number of vertices of the mesh subgraph. The values are used to indicate the connection relationship between a vertex and all vertices in the mesh subgraph; generate a feature sequence including all the feature subsequences.

13. The device according to claim 12, characterized in that, Specifically, the serialization module is used to execute the following steps: Step A: Select n target vertices from the three-dimensional mesh to be processed. The n target vertices include a first target vertex and the first n - 1 vertices among the adjacent vertices of the first target vertex. The initial data of the three-dimensional mesh to be processed is the three-dimensional mesh; Step B: Determine that the mesh subgraph includes a first vertex set and a first adjacent edge set. The first vertex set includes the union of the n target vertices and the adjacent vertices of the n target vertices. The first adjacent edge set is the union of the adjacent edges of the n target vertices; Step C: Update the three-dimensional mesh to be processed to the remaining part after removing the n target vertices and the first adjacent edge set from the three-dimensional mesh to be processed; Loop and execute Step A to Step C until the number of adjacent vertices of each vertex in the three-dimensional mesh to be processed is less than n; 14. The device according to claim 12, characterized in that, Specifically, the serialization module is used to execute the following steps: Step A: Select n target vertices from the three-dimensional mesh to be processed. The n target vertices include a first target vertex and the first n - 1 vertices among the adjacent vertices of the first target vertex. The initial data of the three-dimensional mesh to be processed is the three-dimensional mesh; Step B: Determine that the mesh subgraph includes a first vertex set and a first adjacent edge set. The first vertex set includes the union of n target vertices and the adjacent vertices of the n target vertices. The first adjacent edge set is the union of the adjacent edges of the n target vertices; Step C: Update the three-dimensional mesh to be processed to the remaining part after removing the n target vertices and the first adjacent edge set from the three-dimensional mesh to be processed; Loop and execute Step A to Step C until the number of adjacent vertices of each vertex in the three-dimensional mesh to be processed is less than n; Step D: Select a first target vertex and an adjacent vertex set from the three-dimensional mesh to be processed. The adjacent vertex set includes all adjacent vertices of the first target vertex; Step E: Determine that the grid subgraph includes a second vertex set and a second adjacent edge set. The second vertex set includes the first target vertex, the set of adjacent vertices, and the union of the adjacent vertices of all vertices in the set of adjacent vertices. The second adjacent edge set is the union of the adjacent edges of the first target vertex and the adjacent edges of all vertices in the set of adjacent vertices; Step F: Update the to-be-processed 3D grid to the remaining part after removing the first target vertex, the set of adjacent vertices, and the second adjacent edge set from the to-be-processed 3D grid; Loop and execute Steps D to F until the to-be-processed 3D grid is empty.

15. The device according to any one of claims 13 to 14, characterized in that, The first target vertex is the vertex with the smallest serial number in the grid subgraph, or the first target vertex is the vertex with the largest serial number in the grid subgraph.

16. The device according to any one of claims 12 to 14, characterized in that, The n is 2, 3, or 4.

17. The device according to any one of claims 12 to 14, characterized in that The feature subsequence further includes a first delimiter and a second delimiter. The first delimiter is located between the coordinates of the last target vertex and the coordinates of the first adjacent vertex, and the second delimiter is located between the coordinates of the last adjacent vertex and the adjacency matrix.

18. The device according to any one of claims 12 to 14, characterized in that, The device further includes: An encoding module, configured to input the feature sequence into a variational quantization autoencoder and output a latent vector through the variational quantization autoencoder.

19. A decoding device, characterized in that, Including: A receiving module, configured to receive a feature sequence. The feature sequence includes a plurality of feature subsequences, and the feature subsequences correspond one-to-one to the grid subgraphs of a 3D grid. The grid subgraphs of the 3D grid include a first type of grid subgraph. Each grid subgraph in the first type of grid subgraph includes n target vertices and the adjacent vertices of the n target vertices. The target vertices of any two grid subgraphs in the first type of grid subgraph have no intersection. The n is an integer greater than 1. The feature subsequence includes the coordinates of all vertices of the grid subgraph and the adjacency matrix of the grid subgraph. The adjacency matrix of the grid subgraph includes T values. The T is the total number of vertices of the grid subgraph. The values are used to indicate the connection relationship between one vertex and all vertices in the grid subgraph; A decoding module, configured to decode the feature sequence into a 3D grid.

20. The device according to claim 19, characterized in that, The grid subgraphs of the 3D grid further include a second type of grid subgraph, and the number of target vertices in the second type of grid subgraph is less than n.

21. The device according to claim 19 or 20, wherein The receiving module is further configured to receive a latent vector, and the latent vector is obtained by processing the feature sequence using a variational quantization autoencoder; The decoding module is further configured to input the latent vector into the decoder of the variational quantization autoencoder and output the 3D grid through the decoder.

22. The device according to any one of claims 19 to 20, characterized in that, The receiving module is further configured to receive the intent text input by the user; When the intent text includes the keyword corresponding to the 3D grid, the decoding module is further configured to input the intent text into an autoregressive model, output the latent vector corresponding to the intent text through the autoregressive model; input the latent vector corresponding to the intent text into the decoder of the variational quantization autoencoder, and output the 3D grid through the decoder.

23. A cluster of computing devices, characterized in that, Comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 7.

24. A cluster of computing devices, including a processor and a memory, characterized in that, Comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 8 to 11.

25. A computer-readable storage medium, characterized in that, Comprising computer program instructions which, when executed by a computing device cluster, cause the computing device cluster to execute the method according to any one of claims 1 to 11.

26. A computer program product containing instructions, characterized in that, When the instructions are run by a computing device cluster, causing the computing device cluster to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Autoregressive neural network for generating polygonal meshes of 3D objects

    CN115349141A

  • Encoding and decoding method, code stream, encoder, decoder and storage medium

    CN119366187A