Arithmetic encoding and decoding method based on semantic source and related device
Gespeichert in:
| Titel: | Arithmetic encoding and decoding method based on semantic source and related device |
|---|---|
| Patent Number: | 12192,467 |
| Publikationsdatum: | January 07, 2025 |
| Appl. No: | 18/895959 |
| Application Filed: | September 25, 2024 |
| Abstract: | Disclosed is an arithmetic encoding method based on a semantic source, which is applied to an encoder. In this method, a preset encoding interval of the semantic source and a syntax symbol sequence containing syntax symbols are obtained. For each syntax symbol of the syntax symbols, a target synonymous subset of the syntax symbol is determined from preset synonymous subsets of the syntax symbol. The target synonymous subset of the syntax symbol is encoded according to the preset encoding interval through an arithmetic encoding algorithm to obtain an encoded result sequence corresponding to the syntax symbol sequence. After obtaining a sequence length of the syntax symbol sequence, the sequence length and the encoded result sequence are sent to a decoder for decoding. |
| Inventors: | Beijing University of Posts and Telecommunications (Beijing, CN) |
| Assignees: | Beijing University of Posts and Telecommunications (Beijing, CN) |
| Claim: | 1. An arithmetic encoding and decoding method of images based on a semantic source, applied to an encoder, comprising: obtaining a preset encoding interval of the semantic source and a syntax symbol sequence to be encoded; wherein, the syntax symbol sequence to be encoded contains at least one syntax symbol; for each syntax symbol, determining a preset target synonymous subset corresponding to the syntax symbol; wherein, the target synonymous subset is a subset of preset symbol information corresponding to same semantic information; encoding the target synonymous subset corresponding to each syntax symbol according to the preset encoding interval through an arithmetic encoding algorithm to obtain an encoded result sequence corresponding to the syntax symbol sequence to be encoded; and obtaining a sequence length of the syntax symbol sequence to be encoded and sending the sequence length and the encoded result sequence to a decoder for decoding the encoded result sequence based on the sequence length to obtain a reconstructed syntax symbol sequence; wherein determining a preset target synonymous subset corresponding to the syntax symbol comprises: obtaining target symbol information of the syntax symbol; and selecting an initial synonymous subset corresponding to the target symbol information from preset initial synonymous subsets associated with the syntax symbol as the target synonymous subset corresponding to the syntax symbol; wherein a construction process of the preset initial synonymous subsets comprises: for each syntax symbol, determining multiple pieces of preset symbol information corresponding to the syntax symbol and semantic information corresponding to each piece of preset symbol information; and dividing the multiple pieces of preset symbol information into at least one initial synonymous subset based on the semantic information corresponding to each piece of preset symbol information; wherein, pieces of preset symbol information corresponding to same semantic information are divided into a same initial synonymous set; and the multiple pieces of the preset symbol information comprise the target symbol information. |
| Claim: | 2. The method according to claim 1 , wherein, encoding the target synonymous subset corresponding to each syntax symbol according to the preset encoding interval through an arithmetic encoding algorithm to obtain an encoded result sequence corresponding to the syntax symbol sequence to be encoded comprises: for each syntax symbol, determining a probability of an initial synonymous subset associated with the syntax symbol by adding probabilities of the multiple pieces of the preset symbol information corresponding to the initial synonymous subset; obtaining a first permutation order of the syntax symbols in the syntax symbol sequence to be encoded and selecting a target encoding interval from the preset encoding interval based on the first permutation order, the target synonymous subsets corresponding to the syntax symbols and probabilities of the initial synonymous subsets associated with each syntax symbol through the arithmetic encoding algorithm; and determining a shortest binary sequence according to the target encoding interval and taking the shortest binary sequence as the encoded result sequence corresponding to the syntax symbol sequence to be encoded. |
| Claim: | 3. The method according to claim 2 , wherein, selecting a target encoding interval from the preset encoding interval based on the first permutation order, the target synonymous subsets corresponding to the syntax symbols and probabilities of the initial synonymous subsets associated with each syntax symbol through an arithmetic encoding algorithm comprises: taking the preset encoding interval as a candidate encoding interval, taking a first syntax symbol in the syntax symbol sequence according to the first permutation order as a target symbol, and performing at least one iteration operation on the preset encoding interval; wherein, each iteration operation comprises: dividing the candidate encoding interval into at least one initial encoding interval corresponding to the initial synonymous subsets of the target symbol based on the probabilities of the initial synonymous subsets of the target symbol; taking the initial encoding interval that corresponds to the target synonymous subset of the target symbol as an updated candidate encoding interval and taking a next syntax symbol of the target symbol according to the first permutation order as an updated target symbol for a next iteration; exiting the iteration operation, if there is no next symbol in the syntax symbol sequence; and taking the candidate encoding interval as the target encoding interval after executing at least one iteration operation. |
| Claim: | 4. The method according to claim 1 , wherein, before encoding the target synonymous subset corresponding to each syntax symbol according to the preset encoding interval through an arithmetic encoding algorithm, the method further comprises: determining whether the syntax symbol sequence satisfies a first preset condition; wherein, the first preset condition comprises: multiple pieces of the preset symbol information corresponding to any two syntax symbols in the syntax symbol sequence to be encoded are the same, the initial synonymous subsets corresponding to the two syntax symbols are the same, and the probabilities of the initial synonymous subsets corresponding to the two syntax symbols are the same; in response to determining that the syntax symbol sequence satisfies the first preset condition, encoding the target synonymous subset corresponding to each syntax symbol according to the preset encoding interval through an arithmetic encoding algorithm comprises: constructing a sequence of target synonymous subsets based on the target synonymous subset of each syntax symbol; and encoding the target synonymous subset sequence based on the preset encoding interval through the arithmetic encoding algorithm to obtain the encoded result sequence corresponding to the syntax symbol sequence. |
| Claim: | 5. An arithmetic coding and decoding method of images based on a semantic source, applied to a decoder, comprising: receiving a sequence length and an encoded result sequence sent by an encoder and obtaining a preset decoding interval and preset syntax symbols of the semantic source; decoding the encoded result sequence to obtain at least one reconstructed synonymous subset based on the preset decoding interval through an arithmetic decoding algorithm; wherein, the number of the at least one reconstructed synonymous subset equals to the sequence length; each of the at least one reconstructed synonymous subset is a subset of preset symbol information corresponding to same semantic information; for each reconstructed synonymous subset, determining semantic information corresponding to the reconstructed synonymous subset and selecting a target reconstructed syntax symbol corresponding to the reconstructed synonymous subset from the preset syntax symbols based on the semantic information; and arranging the target reconstructed syntax symbols corresponding to the reconstructed synonymous subsets to obtain a sequence of reconstructed syntax symbols; wherein decoding the encoded result sequence to obtain at least one reconstructed synonymous subset based on the preset decoding interval through an arithmetic decoding algorithm comprises: transforming the encoded result sequence into a target codeword; constructing a reconstructed symbol sequence based on the sequence length; wherein, the number of symbols in the reconstructed symbol sequence equals to the sequence length; determining a second permutation order of symbols in the reconstructed symbol sequence; for each symbol in the reconstructed symbol sequence, obtaining at least one initial reconstructed synonymous subset corresponding to the symbol and a probability of each initial reconstructed synonymous subset; determining a target decoding interval corresponding to each symbol in the preset decoding interval based on the second permutation order, the probability of each initial reconstructed synonymous subset corresponding to each symbol and the target codeword through the arithmetic decoding algorithm; and for each symbol, determining a reconstructed synonymous subset based on the target decoding interval and initial reconstructed synonymous subsets. |
| Claim: | 6. The method according to claim 5 , wherein, determining a target decoding interval corresponding to each symbol in the preset decoding interval based on the second permutation order, the probability of each initial reconstructed synonymous subset corresponding to each symbol and the target codeword through an arithmetic decoding algorithm comprises: taking the preset decoding interval as a candidate decoding interval, taking a first symbol in the reconstructed symbol sequence according to the second permutation order as a target symbol, and performing at least one iteration operation in the preset decoding interval; wherein, each iteration operation comprises: dividing the candidate decoding interval into at least one initial decoding interval based on a probability of each initial reconstructed synonymous subset corresponding to the target symbol; wherein, each initial decoding interval has a one-to-one corresponding relationship with the probability of an initial reconstructed synonymous subset; selecting an initial decoding interval containing the target codeword from the at least one initial decoding interval as the target decoding interval corresponding to the target symbol, taking the target decoding interval as an updated candidate decoding interval and taking a next symbol of the target symbol according to the second permutation order as an updated target symbol for a next iteration; exiting the iteration operation, if there is no next symbol in the reconstructed symbol sequence according to the second permutation order; and obtaining the target decoding interval corresponding to each symbol. |
| Claim: | 7. The method according to claim 5 , wherein, before decoding the encoded result sequence to obtain at least one reconstructed synonymous subset based on the preset decoding interval through an arithmetic decoding algorithm, the method further comprises: determining whether the preset syntax symbols satisfy a second preset condition; wherein, the second preset condition comprises: multiple pieces of preset symbol information of any two preset syntax symbols are the same, the division methods of the initial synonymous subsets corresponding to the two preset syntax symbols are the same, and the probabilities of the initial synonymous subsets corresponding to the two preset syntax symbols are the same; in response to determining that the preset syntax symbols satisfy the second preset condition, decoding the encoded result sequence to obtain at least one reconstructed synonymous subset based on the preset decoding interval through an arithmetic decoding algorithm comprises: decoding the encoded result sequence according to the preset decoding interval through the arithmetic decoding algorithm to obtain a reconstructed synonymous subset sequence; wherein, the reconstructed synonymous subset sequence contains multiple reconstructed synonymous subsets. |
| Claim: | 8. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the arithmetic coding and decoding method based on the semantic source according to claim 1 . |
| Patent References Cited: | 2004/0008130 January 2004 Yang 2021/0028794 January 2021 Marpe |
| Primary Examiner: | Lima, Fabio S |
| Attorney, Agent or Firm: | Westbridge IP LLC |
| Dokumentencode: | edspgr.12192467 |
| Datenbank: | USPTO Patent Grants |
| Abstract: | Disclosed is an arithmetic encoding method based on a semantic source, which is applied to an encoder. In this method, a preset encoding interval of the semantic source and a syntax symbol sequence containing syntax symbols are obtained. For each syntax symbol of the syntax symbols, a target synonymous subset of the syntax symbol is determined from preset synonymous subsets of the syntax symbol. The target synonymous subset of the syntax symbol is encoded according to the preset encoding interval through an arithmetic encoding algorithm to obtain an encoded result sequence corresponding to the syntax symbol sequence. After obtaining a sequence length of the syntax symbol sequence, the sequence length and the encoded result sequence are sent to a decoder for decoding. |
|---|