CN112818081A - Method and system for compressing and decompressing key value pair text and operating machine - Google Patents

Method and system for compressing and decompressing key value pair text and operating machine Download PDF

Info

Publication number
CN112818081A
CN112818081A CN202110209481.7A CN202110209481A CN112818081A CN 112818081 A CN112818081 A CN 112818081A CN 202110209481 A CN202110209481 A CN 202110209481A CN 112818081 A CN112818081 A CN 112818081A
Authority
CN
China
Prior art keywords
key
keys
text
characters
value pair
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202110209481.7A
Other languages
Chinese (zh)
Inventor
董胜伟
周庆亮
卢向前
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sany Heavy Industry Co Ltd
Original Assignee
Sany Heavy Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sany Heavy Industry Co Ltd filed Critical Sany Heavy Industry Co Ltd
Priority to CN202110209481.7A priority Critical patent/CN112818081A/en
Publication of CN112818081A publication Critical patent/CN112818081A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures
    • G06F16/328Management therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention provides a method, a system and an operating machine for compressing and decompressing key value texts, wherein the compression method comprises the following steps: acquiring keys in the target key value pair text; and converting the key into a replacing character according to a preset dictionary to obtain a compressed text, wherein the preset dictionary comprises the key and the replacing character corresponding to the key, the length of the replacing character is less than that of the key, and the replacing characters corresponding to different keys are different. The method replaces more complex keys with more simplified replacement characters aiming at the key-value pair text, realizes the compression of the key-value pair text, can reduce the space occupancy rate of a disk after the compression, and can also keep the key-value pair relation, so that the compressed text has certain readability.

Description

Method and system for compressing and decompressing key value pair text and operating machine
Technical Field
The invention relates to the technical field of computers, in particular to a method, a system and an operation machine for compressing and decompressing a text by key values.
Background
When the working condition data of the excavator is transmitted, a large amount of bandwidth is occupied due to the large data volume, and data transmission stagnation caused by insufficient bandwidth is easy to occur; when working condition data is stored, the problem that the occupation of a disk and a memory is serious also occurs, and data needs to be compressed in order to save bandwidth and the occupation of the disk and the memory.
Generally, after data is compressed, readability is not available, and if the data is used, the data needs to be decompressed, so that high readability and low space occupancy cannot be achieved at the same time, and inconvenience is brought to the use of the data.
Key-value pairs are currently popular data formats, typically json (javascript Object notification) data formats and bson (binary verified Document format) data formats, and include keys and values corresponding to the keys, for example, "animal" is a key, and the corresponding values are "cat", "animal" and "cat" to form a key-value pair. Key-value text refers to the text in which data is stored in a key-value pair format.
The existing text compression method generally compresses the full text, and the readability does not exist any more although the compression rate is very high. If such methods are used for key-value pair text, no key-value pair relationships can be found in the compressed text.
Therefore, the conventional text compression method cannot be applied to key-value pair text.
Disclosure of Invention
The invention provides a method, a system and an operating machine for compressing and decompressing key-value-pair texts, which are used for solving the defect that the key-value-pair relation cannot be found after the key-value-pair texts are compressed by a traditional compression method in the prior art, and realizing the compression of the key-value-pair texts on the basis of keeping the key-value-pair relation.
The invention provides a method for compressing a key-value pair text, which comprises the following steps:
acquiring keys in the target key value pair text;
and converting the key into a replacing character according to a preset dictionary to obtain a compressed text, wherein the preset dictionary comprises the key and the replacing character corresponding to the key, the length of the replacing character is less than that of the key, and the replacing characters corresponding to different keys are different.
According to the compression method for the key-value pair text, provided by the invention, the preset dictionary is obtained by the following method:
and acquiring the replacement characters corresponding to the keys on the basis of English letters and/or numbers and on the basis of the principle of shortest length.
According to the method for compressing the key value to the text, which is provided by the invention, the replacement character corresponding to the key is obtained on the basis of the English letters and/or the numbers and on the basis of the shortest length, and the method comprises the following steps:
acquiring the replacement characters according to English letters, numbers and combination of the English letters and the numbers;
and sequentially distributing the replaced characters to the keys according to the sequence of the lengths of the replaced characters from small to large.
The invention provides a method for decompressing a key-value pair text, which comprises the following steps:
acquiring a compressed text;
and converting the replacing characters in the compressed text into keys according to a preset dictionary to obtain a target key value text, wherein the preset dictionary comprises the keys and the replacing characters corresponding to the keys, the length of the replacing characters is smaller than that of the keys, and the replacing characters corresponding to different keys are different.
According to the decompression method for the key-value pair text provided by the invention, the preset dictionary is obtained by the following method:
and acquiring the replacement characters corresponding to the keys on the basis of English letters and/or numbers and on the basis of the principle of shortest length.
According to the decompression method for the key value to the text provided by the invention, the method for acquiring the replacement character corresponding to the key based on the English letter and/or the number and based on the shortest length as a principle comprises the following steps:
acquiring the replacement characters according to the sequence of English letters, numbers and combination of the English letters and the numbers;
and sequentially distributing the replaced characters to the keys according to the sequence of the lengths of the replaced characters from small to large.
The invention provides a compression system for key-value pair texts, which comprises:
the acquisition module is used for acquiring keys in the target key value pair text;
and the compression module is used for converting the keys into the alternative characters according to a preset dictionary to obtain a compressed text, wherein the preset dictionary comprises the keys and the alternative characters corresponding to the keys, the length of the alternative characters is smaller than that of the keys, and the alternative characters corresponding to different keys are different.
The invention provides a decompression system for key-value pair texts, comprising:
the acquisition module is used for acquiring the compressed text;
and the decompression module is used for converting the replacing characters in the compressed text into keys according to a preset dictionary to obtain the decompressed text, wherein the preset dictionary comprises the keys and the replacing characters corresponding to the keys, the length of the replacing characters is smaller than that of the keys, and the replacing characters corresponding to different keys are different.
The invention provides a working machine, which comprises the compression system, wherein the compression system is arranged on the working machine;
and/or a decompression system as described above, the decompression system being provided to the work machine.
The present invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned methods for compressing key-value-to-text or one of the above-mentioned methods for decompressing key-value-to-text when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method for compressing key-value pair text or the method for decompressing key-value pair text as described in any of the above.
The method replaces more complex keys with more simplified replacement characters aiming at the key-value pair texts, realizes the compression of the key-value pair texts, can reduce the space occupancy rate of a disk after the compression, and can also reserve the key-value pair relation, so that the compressed texts have certain readability.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for compressing key-value pair text according to the present invention;
FIG. 2 is a flow chart of a method for decompressing key-value pair texts according to the present invention;
FIG. 3 is a flow chart of a method for compressing and decompressing key-value pair text according to the present invention;
FIG. 4 is a schematic structural diagram of a compression system for key-value pair text according to the present invention;
FIG. 5 is a schematic diagram of a decompression system for key-value pair text according to the present invention;
fig. 6 is a schematic physical structure diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
When compressing a text with a key value, the existing text compression method generally compresses the entire text content in order to pursue compression efficiency, so that the readability of the text with the key value is lost.
In view of the above problem, an embodiment of the present invention provides a method for compressing a key-value-to-text, and the inventive concept is to replace a more complex key character string with a simple character string, thereby compressing the key-value-to-text.
An embodiment of the present invention provides a method for compressing a text by key value, as shown in fig. 1, the method includes:
the embodiment of the invention mainly aims at the key value pair text, namely the data in the text is stored in the form of the key value pair.
The embodiment of the present invention is described by taking the key value pair text in table 1 as an example, and as shown in table 1, the table shows the corresponding key and the value corresponding to the key.
TABLE 1
Key with a key body Value of Key with a key body Value of Key with a key body Value of Key with a key body Value of
animal cat animal dog animal bird animal ant
people jack people lucy fruit apple fruit orange
time 210119 place Jaw money 50 what lunch
why birthday how party feel great transport bycar
110, obtaining keys in the target key value pair text;
firstly, extracting keys in a target key value pair text, wherein in general, the number of the keys is multiple, and the keys can be regarded as a character string with a longer length.
And 120, converting the key into a replacing character according to a preset dictionary to obtain a compressed text, wherein the preset dictionary comprises the key and the replacing character corresponding to the key, the length of the replacing character is smaller than that of the key, and the replacing characters corresponding to different keys are different.
Based on a preset dictionary, the preset dictionary comprises each key and a replacing character corresponding to the key, the key and the replacing character are in one-to-one correspondence, generally, the key is usually a relatively complex and long character, the replacing character is a relatively simple character, for the purpose of compression, the length of the replacing character must be smaller than that of the key, and in order to realize decompression, different keys cannot be confused with each other, and the replacing characters corresponding to different keys are different.
In a specific embodiment, the initial letter of the key is used as the corresponding replacement character, and the repetition is prevented by adding numbers to the following letters under the condition that the initial letter is the same, namely, the replacement character corresponding to animal is a, the replacement character corresponding to people is p1, the replacement character corresponding to free is f1, the replacement character corresponding to time is t1, the replacement character corresponding to place is p2, the replacement character corresponding to money is m, the replacement character corresponding to what is w1, the replacement character corresponding to why is w2, the replacement character corresponding to how is h, the replacement character corresponding to fel is f2, and the replacement character corresponding to transport is t 2.
To sum up, the embodiment of the present invention provides a method for compressing a key-value pair text, which replaces a complex key with a more simplified replacement character for the key-value pair text, so as to compress the key-value pair text, reduce the space occupancy rate of a disk after compression, and retain the key-value pair relationship, so that the compressed text has certain readability.
On the basis of the above embodiment, preferably, the preset dictionary is obtained by:
and acquiring the replacement characters corresponding to the keys on the basis of English letters and/or numbers and on the basis of the principle of shortest length.
In a specific embodiment, the setting manner of the preset dictionary can be further obtained by: based on 26 English letters, firstly, the 26 English letters are sequentially assigned to different keys as the replacement characters corresponding to the keys.
For example, the replacement character corresponding to animal is a, the replacement character corresponding to people is b, the replacement character corresponding to fruit is c, the replacement character corresponding to time is d, the replacement character corresponding to place is e, the replacement character corresponding to money is f, the replacement character corresponding to what is g, the replacement character corresponding to why is h, the replacement character corresponding to how is i, the replacement character corresponding to feel is j, and the replacement character corresponding to transport is k.
In another specific embodiment, the preset dictionary may be set as follows: based on the numbers, the numbers are sequentially distributed to different keys from small to large as the corresponding replacement characters of the keys.
For example, the replacement character corresponding to animal is 1, the replacement character corresponding to people is 2, the replacement character corresponding to fruit is 3, the replacement character corresponding to time is 4, the replacement character corresponding to place is 5, the replacement character corresponding to money is 6, the replacement character corresponding to what is 7, the replacement character corresponding to why is 8, the replacement character corresponding to how is 9, the replacement character corresponding to feel is 10, and the replacement character corresponding to transport is 11.
In another embodiment, the preset dictionary may be set as follows: combining 26 English letters and numbers to respectively combine the replacement characters with the lengths of 2, 3, 4 and 5, and sequentially allocating the replacement characters to different keys as the replacement characters corresponding to the keys according to the principle that the lengths of the combined replacement characters are from small to large.
The corresponding relation between the keys and the replacing characters is preset, so that the compressed text has certain readability.
On the basis of the foregoing embodiment, preferably, the obtaining, based on english alphabets and/or numbers, the substitute character corresponding to the key on the principle of shortest length includes:
acquiring the replacement characters according to English letters, numbers and combination of the English letters and the numbers;
and sequentially distributing the replaced characters to the keys according to the sequence of the lengths of the replaced characters from small to large.
In a specific embodiment, based on 26 english alphabets, firstly, sequentially allocating the 26 english alphabets to different keys as replacement characters corresponding to the keys; if any keys are not assigned, the numbers are assigned to different keys in sequence; if the number is distributed completely, 26 English letters and numbers are combined, the replacement characters with the length of 2 are firstly combined and are sequentially distributed to the rest replacement keys, if the other keys are not distributed, the replacement characters with the combination length of 3 are distributed to the rest keys, and the like, and the rest keys are sequentially distributed according to the sequence of the lengths of the replacement characters after combination from small to large.
In another embodiment, 26 English letters and numbers are combined, the replacement characters are formed in a combined mode from small to large in length, and the replacement characters are sequentially allocated to the keys.
The key value pair text of the embodiment of the invention is mainly suitable for the working condition data of the working machine, and the working machine comprises an excavator, a crane, a pile driver and the like, and the embodiment of the invention is not specifically limited to this. And acquiring working condition data of the operating machine through the pipe penetrating device, and storing the working condition data in a key value pair mode.
Experiments prove that the compression rate of the key value to the text can reach 50%, the compression requirement required by actual engineering is met, and the compressed text has certain readability.
An embodiment of the present invention provides a method for decompressing a key-value pair text, as shown in fig. 2, the method includes:
210, acquiring a compressed text;
220, converting the replacement characters in the compressed text into keys according to a preset dictionary, and acquiring a target key value text, wherein the preset dictionary comprises the keys and the replacement characters corresponding to the keys, the length of the replacement characters is smaller than that of the keys, and the replacement characters corresponding to different keys are different.
Receiving a compressed text, converting the replacement characters in the compressed text into keys based on a preset dictionary, and obtaining a target key value text, wherein the specific content and the specific obtaining mode of the preset dictionary are consistent with those in the embodiment of the compression method, and please refer to the embodiment for details, which is not described herein again.
On the basis of the above embodiment, preferably, the preset dictionary is obtained by:
and acquiring the replacement characters corresponding to the keys on the basis of English letters and/or numbers and on the basis of the principle of shortest length.
Specifically, the specific execution process of this embodiment is the same as that of the above embodiment, and please refer to the above embodiment for details, which is not described herein again.
On the basis of the foregoing embodiment, preferably, the obtaining, based on english alphabets and/or numbers, the substitute character corresponding to the key on the principle of shortest length includes:
acquiring the replacement characters according to the sequence of English letters, numbers and combination of the English letters and the numbers;
and sequentially distributing the replaced characters to the keys according to the sequence of the lengths of the replaced characters from small to large.
Specifically, the specific execution process of this embodiment is the same as that of the above embodiment, and please refer to the above embodiment for details, which is not described herein again.
An embodiment of the present invention further provides a method for compressing and decompressing a key-value pair text, as shown in fig. 3, the method includes:
the embodiment of the invention uses the method of replacing complex key values with simplified replacing characters to compress and decompress the key value pair texts formed by the working condition data of the excavator.
The specific compression steps are as follows:
step 1: extracting all keys of the text of the target key value pair of the existing excavator working condition data;
step 2: selecting simple and non-repetitive replacement characters and keys extracted in the step 1 to form a preset dictionary, wherein key values corresponding to different replacement characters are different;
and step 3: and in the target key value pair text, all keys are replaced by replacing characters by a preset dictionary to obtain a compressed text, so that the compression of the target key value pair text is completed.
The decompression method comprises the following steps:
after the compressed text is received, all the replacing characters are converted into corresponding key values by using a preset dictionary, and the compressed text can be decompressed into a target key value pair text.
The embodiment of the invention realizes the compression and decompression of the text by replacing the keys in the text with the key values according to the working condition data of the excavator, and has the advantages that the form of the key values is still reserved after compression, and the readability loss is small.
An embodiment of the present invention further provides a system for compressing a key-value pair text, as shown in fig. 4, the system includes an obtaining module 401 and a compressing module 402, where:
the obtaining module 401 is configured to obtain a key in the target key-value pair text;
the compressing module 402 is configured to convert the key into a substitute character according to a preset dictionary, and obtain a compressed text, where the preset dictionary includes the key and a substitute character corresponding to the key, the length of the substitute character is smaller than the length of the key, and the substitute characters corresponding to different keys are different.
The embodiment of the compression system corresponding to the above compression method is consistent with the above compression method, and please refer to the above compression method embodiment for details, which will not be described herein again.
An embodiment of the present invention further provides a decompression system for key-value pair text, as shown in fig. 5, the system includes an obtaining module 501 and a decompression module 502, where:
the obtaining module 501 is configured to obtain a compressed text;
the decompression module 502 is configured to convert the replacement characters in the compressed text into keys according to a preset dictionary, and obtain a decompressed text, where the preset dictionary includes the keys and the replacement characters corresponding to the keys, the length of the replacement characters is smaller than the length of the keys, and the replacement characters corresponding to different keys are different.
The present embodiment is an embodiment of a decompression system corresponding to the above decompression method, and the implementation manner of the embodiment is consistent with that of the above decompression method.
An embodiment of the present invention provides an electronic device, as shown in fig. 6, where the electronic device may include: a processor (processor)610, a communication Interface (Communications Interface)620, a memory (memory)630 and a communication bus 640, wherein the processor 610, the communication Interface 620 and the memory 630 communicate with each other via the communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a method for compression of key-value text or a method for decompression of key-value text, the method of compression comprising:
acquiring keys in the target key value pair text;
and converting the key into a replacing character according to a preset dictionary to obtain a compressed text, wherein the preset dictionary comprises the key and the replacing character corresponding to the key, the length of the replacing character is less than that of the key, and the replacing characters corresponding to different keys are different.
The decompression method comprises the following steps:
acquiring a compressed text;
and converting the replacing characters in the compressed text into keys according to a preset dictionary to obtain a target key value text, wherein the preset dictionary comprises the keys and the replacing characters corresponding to the keys, the length of the replacing characters is smaller than that of the keys, and the replacing characters corresponding to different keys are different.
In addition, the logic instructions in the memory 630 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform a method for compressing key-value-pair text or a method for decompressing key-value-pair text provided by the above methods, the compression method comprising:
acquiring keys in the target key value pair text;
and converting the key into a replacing character according to a preset dictionary to obtain a compressed text, wherein the preset dictionary comprises the key and the replacing character corresponding to the key, the length of the replacing character is less than that of the key, and the replacing characters corresponding to different keys are different.
The decompression method comprises the following steps:
acquiring a compressed text;
and converting the replacing characters in the compressed text into keys according to a preset dictionary to obtain a target key value text, wherein the preset dictionary comprises the keys and the replacing characters corresponding to the keys, the length of the replacing characters is smaller than that of the keys, and the replacing characters corresponding to different keys are different.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform a method for compressing or a method for decompressing key-value-pair text as provided in the above, the method comprising:
acquiring keys in the target key value pair text;
and converting the key into a replacing character according to a preset dictionary to obtain a compressed text, wherein the preset dictionary comprises the key and the replacing character corresponding to the key, the length of the replacing character is less than that of the key, and the replacing characters corresponding to different keys are different.
The decompression method comprises the following steps:
acquiring a compressed text;
and converting the replacing characters in the compressed text into keys according to a preset dictionary to obtain a target key value text, wherein the preset dictionary comprises the keys and the replacing characters corresponding to the keys, the length of the replacing characters is smaller than that of the keys, and the replacing characters corresponding to different keys are different.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A method for compressing key-value pair text, comprising:
acquiring keys in the target key value pair text;
and converting the key into a replacing character according to a preset dictionary to obtain a compressed text, wherein the preset dictionary comprises the key and the replacing character corresponding to the key, the length of the replacing character is less than that of the key, and the replacing characters corresponding to different keys are different.
2. A compression method for key-value pair text according to claim 1, characterized in that the preset dictionary is obtained by:
and acquiring the replacement characters corresponding to the keys on the basis of English letters and/or numbers and on the basis of the principle of shortest length.
3. The method for compressing key-value pair text according to claim 2, wherein the obtaining of the replacement character corresponding to the key based on the shortest length of the english alphabet and/or number comprises:
acquiring the replacement characters according to English letters, numbers and combination of the English letters and the numbers;
and sequentially distributing the replaced characters to the keys according to the sequence of the lengths of the replaced characters from small to large.
4. A method for decompression of key-value pair text, comprising:
acquiring a compressed text;
and converting the replacing characters in the compressed text into keys according to a preset dictionary to obtain a target key value text, wherein the preset dictionary comprises the keys and the replacing characters corresponding to the keys, the length of the replacing characters is smaller than that of the keys, and the replacing characters corresponding to different keys are different.
5. The decompression method for key-value pair text according to claim 4, wherein the preset dictionary is obtained by:
and acquiring the replacement characters corresponding to the keys on the basis of English letters and/or numbers and on the basis of the principle of shortest length.
6. The method for decompressing key-value pair text according to claim 5, wherein the obtaining of the replacement character corresponding to the key based on the english alphabet and/or number based on the shortest length comprises:
acquiring the replacement characters according to the sequence of English letters, numbers and combination of the English letters and the numbers;
and sequentially distributing the replaced characters to the keys according to the sequence of the lengths of the replaced characters from small to large.
7. A system for compressing key-value pair text, comprising:
the acquisition module is used for acquiring keys in the target key value pair text;
and the compression module is used for converting the keys into the alternative characters according to a preset dictionary to obtain a compressed text, wherein the preset dictionary comprises the keys and the alternative characters corresponding to the keys, the length of the alternative characters is smaller than that of the keys, and the alternative characters corresponding to different keys are different.
8. A decompression system for key-value pair text, comprising:
the acquisition module is used for acquiring the compressed text;
and the decompression module is used for converting the replacing characters in the compressed text into keys according to a preset dictionary to obtain the decompressed text, wherein the preset dictionary comprises the keys and the replacing characters corresponding to the keys, the length of the replacing characters is smaller than that of the keys, and the replacing characters corresponding to different keys are different.
9. A work machine comprising the compression system of claim 7, the compression system being disposed on the work machine;
and/or the decompression system of claim 8, provided to the work machine.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the steps of the method for compressing key-value pair text according to any of claims 1 to 3 or the steps of the method for decompressing key-value pair text according to any of claims 4 to 6.
11. A non-transitory computer readable storage medium, having stored thereon a computer program, wherein the processor when executing the program implements the steps of the method for compressing key-value pair text according to any one of claims 1 to 3 or the steps of the method for decompressing key-value pair text according to any one of claims 4 to 6.
CN202110209481.7A 2021-02-24 2021-02-24 Method and system for compressing and decompressing key value pair text and operating machine Withdrawn CN112818081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110209481.7A CN112818081A (en) 2021-02-24 2021-02-24 Method and system for compressing and decompressing key value pair text and operating machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110209481.7A CN112818081A (en) 2021-02-24 2021-02-24 Method and system for compressing and decompressing key value pair text and operating machine

Publications (1)

Publication Number Publication Date
CN112818081A true CN112818081A (en) 2021-05-18

Family

ID=75865608

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110209481.7A Withdrawn CN112818081A (en) 2021-02-24 2021-02-24 Method and system for compressing and decompressing key value pair text and operating machine

Country Status (1)

Country Link
CN (1) CN112818081A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327301A (en) * 2022-03-08 2022-04-12 北京金山云网络技术有限公司 Data processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020152219A1 (en) * 2001-04-16 2002-10-17 Singh Monmohan L. Data interexchange protocol
US20090271181A1 (en) * 2008-04-24 2009-10-29 International Business Machines Corporation Dictionary for textual data compression and decompression
US20160197621A1 (en) * 2015-01-04 2016-07-07 Emc Corporation Text compression and decompression
CN110851433A (en) * 2018-07-27 2020-02-28 武汉斗鱼网络科技有限公司 Key optimization method for key value storage system, storage medium, electronic device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020152219A1 (en) * 2001-04-16 2002-10-17 Singh Monmohan L. Data interexchange protocol
US20090271181A1 (en) * 2008-04-24 2009-10-29 International Business Machines Corporation Dictionary for textual data compression and decompression
US20160197621A1 (en) * 2015-01-04 2016-07-07 Emc Corporation Text compression and decompression
CN105893337A (en) * 2015-01-04 2016-08-24 伊姆西公司 Method and equipment for text compression and decompression
CN110851433A (en) * 2018-07-27 2020-02-28 武汉斗鱼网络科技有限公司 Key optimization method for key value storage system, storage medium, electronic device and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327301A (en) * 2022-03-08 2022-04-12 北京金山云网络技术有限公司 Data processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN116506073B (en) Industrial computer platform data rapid transmission method and system
EP2802078B1 (en) Data compression and decompression method between digital unit and radio unit in cloud radio access network
CN103346800B (en) A kind of data compression method and device
US9806741B1 (en) Character conversion
CN107565971A (en) A kind of data compression method and device
CN107561564A (en) A kind of compression implementation method of big-dipper satellite information transfer
CN110518917A (en) LZW data compression method and system based on Huffman coding
CN112818081A (en) Method and system for compressing and decompressing key value pair text and operating machine
CN106919882A (en) A kind of method that two-dimentional digital content switchs to pure digi-tal symbolic coding
CN101534124A (en) Compression algorithm for short natural language
US20080082694A1 (en) Data file transmission method and device
CN103605730A (en) XML (extensible markup language) compressing method and device based on flexible-length identification codes
EP2712089A1 (en) Method for compressing texts and associated equipment
US9544252B2 (en) Compressing and decompressing electronic messages in message threads
CN111629020A (en) Remote input method, device, PC (personal computer) terminal, android device and system
US8488894B2 (en) Method and system for dot-matrix font data compression and decompression
CN111680497B (en) Session recognition model training method and device
EP2113845A1 (en) Character conversion method and apparatus
CN112383888A (en) Short message system, method and equipment
CN111130554B (en) File compression method and device, electronic equipment and readable storage medium
CN111859859A (en) Dot matrix word stock conversion method
US9300322B2 (en) Encoding of plain ASCII data streams
CN107209672B (en) Information processing apparatus and information processing method
CN107977468A (en) A kind of transmission method and system of sparse type data file
CN111914513A (en) RDP window title character recognition method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20210518

WW01 Invention patent application withdrawn after publication