Character coding and decoding method and apparatus, and electronic device

A technology of electronic equipment and coding method, which is applied in the fields of electronic digital data processing, unstructured text data retrieval, special data processing applications, etc., and can solve the problem of occupying a lot of storage space.

Inactive Publication Date: 2016-04-27
KINGSOFT
View PDF5 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Of course, the encoding methods of other characters, such as Japanese and Korean, also take up a lot of storage space

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
  • Character coding and decoding method and apparatus, and electronic device
  • Character coding and decoding method and apparatus, and electronic device
  • Character coding and decoding method and apparatus, and electronic device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0074] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0075] Such as figure 1 As shown, a text encoding method provided by the embodiment of the present invention, figure 1 The shown method can be applied in an electronic device, where a word segmentation encoding library is stored in the electronic device, and the word segmentation encoding library includes a plurality of dictionary trees, each node in each dictionary tree contains a word and each dictionary tree The text contained in the root node of each dict...

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

Embodiments of the present invention provide a character coding and decoding method and apparatus, and an electronic device. The character coding method comprises the steps of finding a root node in a word segmentation coding database as a tree of the current word segmentation first word; finding the node where the next character is located in child nodes; using the next character as the current word segmentation tail word, and finding a new node where the new next character is located in new child nodes; if the new node is found, using the new next character as the current word segmentation tail word, and returning to execute the step of finding the node where the next character is located in the child nodes; and if the new node is not found, converting the word segmentation started from the current word segmentation first word and ended with the current word segmentation tail word into a code with a preset length, storing the code into a coding file, determining the next word of the current word segmentation tail word as the current word segmentation first word, and returning to execute the step of finding the root node as the tree of the current word segmentation first word. The word segmentation to be converted into text is found in the word segmentation coding database, and the found word segmentation is converted into the code with the preset length so as to reduce occupied storage space.

Description

technical field [0001] The invention relates to the field of computer application technology, in particular to a character encoding and decoding method, device and electronic equipment. Background technique [0002] With the development of science and technology, people write and store articles on paper less and less, and people use computers more to write and store articles. [0003] In a computer, for long-length texts, more storage space will be occupied when storing them. For Chinese, existing methods represent Chinese with binary codes, and each Chinese occupies at least two bytes. For example: The People's Republic of China, each Chinese character is coded in double bytes, which takes up 14 bytes. It can be seen that this method takes up a lot of storage space. Of course, the encoding methods of other characters, such as Japanese and Korean, also take up a lot of storage space. Contents of the invention [0004] The purpose of the embodiment of the present invent...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/3329G06F16/30G06F16/374
Inventor 潘洪安
Owner KINGSOFT
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products