Check patentability & draft patents in minutes with Patsnap Eureka AI!

Decoding method and apparatus

A decoding method and algorithm technology, applied in the field of decoding methods and devices, can solve problems such as low accuracy rate and decoding error, and achieve the effect of improving accuracy rate

Active Publication Date: 2018-01-05
NEW H3C SECURITY TECH CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] In the case of multi-layered percent signs, decoding using the prior art method will lead to decoding errors, that is, when decoding using the prior art decoding method, the correct rate is low

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Decoding method and apparatus
  • Decoding method and apparatus
  • Decoding method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0107] Example 1: Decode %41

[0108] A1. Read the first character %, in the data stack: %, the number of characters: 2;

[0109] After reading %, it is pushed into the data stack, in the data stack: %, the first character is consistent with %, and the number of characters is updated to: 2, indicating that there are two remaining characters that have not been pushed into the data stack after % is pushed into the stack, no If the decoding condition is met, go to read the second character;

[0110] A2, read the second character 4, in the data stack: 4, %, character number sign: 1;

[0111] After reading 4, push it into the data stack, the data stack is: 4, %, the second character is inconsistent with %, and the number of characters is updated to: 1, indicating that there is one remaining unpushed into the data stack after % is pushed into the stack character, still cannot be decoded, go to read the third character;

[0112] A3. Read the third character 1, the data stack: empty,...

example 2

[0114] Example 2: Decode %4%31

[0115] B1, read the first character %, in the data stack: %, the number of characters: 2;

[0116] After reading %, push it into the data stack. In the data stack: %, the first character is the same as %, and the number of characters is updated to: 2, indicating that the remaining two data that have not been pushed into the stack after the % read in this step are pushed into the stack The characters on the stack do not meet the decoding conditions, go to read the second character;

[0117] B2, read the second character 4, in the data stack: 4, %, character quantity sign: 1;

[0118] After reading 4, push it into the data stack. In the data stack: 4, %, the second character is inconsistent with %, and the number of characters is updated to: 1, indicating that there is one remaining unpressed % after being read in B1. The characters entered into the data stack still cannot be decoded, and go to read the third character;

[0119] B3, read the t...

example 3

[0125] Example 3: Decode %%341

[0126] C1. Read the first character %, in the data stack: %, the number of characters: 2;

[0127] After reading %, push it into the data stack. In the data stack: %, the first character is the same as %, and the number of characters is updated to: 2, indicating that the remaining two data that have not been pushed into the stack after the % read in this step are pushed into the stack The characters on the stack do not meet the decoding conditions, go to read the second character;

[0128] C2. Read the second character %, in the data stack: %, %, character number sign: 2;

[0129] After reading %, push it into the data stack, in the data stack: %, %, the second character is the same as %, and the number of characters is updated to: 2, indicating that the remaining two unpressed after the % read in this step is pushed into the stack If the character entered into the data stack does not meet the decoding condition, go to read the third characte...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a decoding method and apparatus, and relates to the technical field of the Internet. The method comprises the following steps: obtaining a target character from data encoded by a preset encoding algorithm; pressing the target character in a preset data stack, and judging whether the target character is a first preset character; if not, performing 1 subtraction processing on a character number mark; when it is determined that the character number mark is equal to 0, performing pull processing on to-be-pulled characters in a data stack in sequence, wherein the to-be-pulled characters are characters from the character at the top of the stack to the first preset character in the data stack; decoding the to-be-pulled characters according to a preset decoding algorithm, wherein the preset decoding algorithm is matched with the encoding algorithm; determining whether to continue to decode the characters in the data stack; and if so, updating the character number mark to a first preset number. By application of the decoding scheme provided by the embodiment of the invention, the decoding correct rate is improved.

Description

technical field [0001] The present application relates to the technical field of the Internet, and in particular to a decoding method and device. Background technique [0002] With the rapid development and popularization of network technology, users need to transmit various data through the network, and the data transmitted through the network is usually data encoded in accordance with a certain protocol, for example, HTTP (HyperText Transfer Protocol, hypertext transfer protocol ). A URI (Uniform Resource Identifier, Uniform Resource Identifier) ​​field in HTTP is usually encoded using a percent sign. [0003] Take percent encoding as an example, its encoding algorithm is: start with the character "%", followed by two hexadecimal numbers, these hexadecimal numbers are the ASC-II code values ​​of the encoded characters. [0004] For example, 'A' = %41 [0005] In practical applications, after the terminal receives the data transmitted through the network, it needs to dec...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): H04N19/44H04N21/4402
Inventor 郑健
Owner NEW H3C SECURITY TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More