CN112861475A - Encoding and decoding processing method, device, equipment and storage medium - Google Patents

Encoding and decoding processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112861475A
CN112861475A CN202011212247.1A CN202011212247A CN112861475A CN 112861475 A CN112861475 A CN 112861475A CN 202011212247 A CN202011212247 A CN 202011212247A CN 112861475 A CN112861475 A CN 112861475A
Authority
CN
China
Prior art keywords
string
bit
chinese character
character string
encoded data
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.)
Pending
Application number
CN202011212247.1A
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.)
Shenzhen Hexun Huagu Information Technology Co ltd
Original Assignee
Shenzhen Hexun Huagu Information Technology 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 Shenzhen Hexun Huagu Information Technology Co ltd filed Critical Shenzhen Hexun Huagu Information Technology Co ltd
Priority to CN202011212247.1A priority Critical patent/CN112861475A/en
Publication of CN112861475A publication Critical patent/CN112861475A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding

Abstract

The invention discloses an encoding processing method, a decoding processing method, a related device, computer equipment and a computer readable storage medium. The method comprises the following steps: acquiring encoded data; determining a data type of the encoded data; converting the encoded data into binary bit strings according to the data type of the encoded data; splitting the bit string according to preset digits in sequence from the initial bit of the bit string to split the bit string into a plurality of first target bit strings; adding Chinese character identification character strings of Unicode to each first target bit character string to obtain a plurality of corresponding second target bit character strings; and converting each second target bit string into a Chinese character to obtain a Chinese character string corresponding to the encoded data for pushing.

Description

Encoding and decoding processing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for encoding and decoding.
Background
The push method is a push method of information of applications based on an android system, which is commonly released by various domestic organizations, and provides a push method based on a bottom layer signaling channel by utilizing the high reliability of the signaling level channel, thereby realizing more reliable and more power-saving push service.
The inventor realizes that when the information is pushed by using the 'must-do', there is a certain limit to the length of the pushed data, and in some application scenarios, when some information needs to be tracked, it is inconvenient due to the limit of the length of the information, and the length of the extra information needs to be reduced to enable the 'must-do' to carry more information as much as possible.
To solve the above problems, a new information encoding method applied to the must-reach is needed to compress the size of the pushed information.
Disclosure of Invention
The invention provides an encoding and decoding processing method, device, equipment and storage medium, which are used for providing a new data processing mode applied to must pushing so as to effectively compress pushed data.
An encoding processing method, comprising:
acquiring encoded data;
determining a data type of the encoded data;
converting the encoded data into binary bit strings according to the data type of the encoded data;
splitting the bit string from the initial bit of the bit string according to preset bits in sequence to split the bit string into a plurality of first target bit strings;
adding Chinese character identification character strings of Unicode to each first target bit character string to obtain a plurality of corresponding second target bit character strings;
and converting each second target bit string into a Chinese character to obtain a Chinese character string corresponding to the encoded data for pushing.
Further, the converting the encoded data into a binary bit string according to the data type of the encoded data includes:
if the data type of the coded data is the unique mark msgid of the push message of the push service background, directly converting the coded data into a binary bit string;
if the data type of the encoded data is the push service application information identifier appkey, converting the encoded data into 16-system data, and converting the 16-system data into a binary bit string.
Further, the splitting the bit string according to a preset number of bits in sequence from the start bit of the bit string to split the bit string into a plurality of first target bit strings includes:
and splitting the bit string into a plurality of first target bit strings by sequentially splitting the bit string according to 14 bits from the initial bit of the bit string.
Further, the adding a chinese character identification string of unicode to each first target bitstring to obtain a plurality of corresponding second target bitstrings includes:
and adding 0x4e00 to each target bit string to obtain a plurality of corresponding second target bit strings.
A decoding processing method, comprising:
acquiring a decoded Chinese character string, wherein the Chinese character string is obtained by the encoding processing method of any one of claims 1 to 4;
transcoding the Chinese character string into Unicode code;
subtracting the Chinese character identification character string of the unicode from each character in the unicode code, and converting the character identification character string into a bit character string;
and performing inverse conversion processing on the bit string according to the original data type corresponding to the Chinese character string to obtain original data of the Chinese character string.
Further, the performing inverse transform processing on the bit string according to the original data type corresponding to the chinese character string to obtain the original data of the chinese character string includes:
if the original data type corresponding to the Chinese character string is the unique identifier msgid of a push message of a push service background, converting the bit character string into a character string corresponding to the msgid so as to obtain the original data of the Chinese character string;
if the original data type corresponding to the Chinese character string is a push service application information identifier appkey, converting the bit character string into 16-system data, and correspondingly converting the 16-system data into a character string corresponding to the appkey so as to obtain the original data of the Chinese character string.
An encoding processing apparatus comprising:
the acquisition module is used for acquiring encoded data;
a determining module for determining a data type of the encoded data;
a first conversion module, configured to convert the encoded data into a binary bit string according to a data type of the encoded data;
the splitting module is used for sequentially splitting the bit string according to preset bits from the initial bit of the bit string to split the bit string into a plurality of first target bit strings;
and the second conversion module is used for adding a Chinese character identification character string of a uniform code unicode to each first target bit character string to obtain a plurality of corresponding second target bit character strings, converting each second target bit character string into a Chinese character, and obtaining the Chinese character string corresponding to the encoded data for pushing.
A decoding processing apparatus comprising:
the acquisition module is used for acquiring a decoded Chinese character string, wherein the Chinese character string is obtained by the encoding processing method;
the first conversion module is used for transcoding the Chinese character string into a Unicode code;
the second conversion module is used for converting each character in the unicode code into a bit string after subtracting the Chinese character identification string of the unicode;
and the reverse conversion module is used for performing reverse conversion processing on the bit string according to the original data type corresponding to the Chinese character string so as to obtain the original data of the Chinese character string.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the encoding processing method or the decoding processing method described above when executing the computer program.
A computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the above-described encoding processing method or decoding processing method.
In the coding processing method, coded data is obtained firstly; determining a data type of the encoded data; converting the encoded data into binary bit strings according to the data type of the encoded data; splitting the bit string according to preset digits in sequence from the initial bit of the bit string to split the bit string into a plurality of first target bit strings; adding Chinese character identification character strings of Unicode to each first target bit character string to obtain a plurality of corresponding second target bit character strings; and converting each second target bit string into a Chinese character to obtain a Chinese character string corresponding to the encoded data for pushing. In the invention, the data type of the coded data is split and is correspondingly converted into Chinese characters for information push, so that the size of the information is effectively compressed, the length of extra information can be reduced, and the coded data can be pushed out with more information as much as possible.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flow chart of an encoding method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a decoding processing method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of an encoding apparatus according to an embodiment of the present invention;
FIG. 4 is a block diagram of a decoding apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, 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.
The embodiment of the invention provides an encoding processing method and a corresponding decoding processing method, wherein in the encoding processing method, encoded data is acquired firstly; determining a data type of the encoded data; converting the encoded data into binary bit strings according to the data type of the encoded data; splitting the bit string from the initial bit of the bit string according to preset bits in sequence to split the bit string into a plurality of first target bit strings; adding Chinese character identification character strings of Unicode to each target bit character string to obtain a plurality of corresponding second target bit character strings; and finally, converting each second target bit string into a Chinese character to obtain a Chinese character string corresponding to the encoded data for pushing.
The decoding processing method comprises the steps of firstly obtaining a decoded Chinese character string and transcoding the Chinese character string into a Unicode code, wherein the decoding processing method is used for decoding the Chinese character string obtained by the decoding processing method; subtracting the Chinese character identification character string of the unicode from each character in the unicode code, and converting the character identification character string into a bit character string; and performing inverse conversion processing on the bit string according to the original data type corresponding to the Chinese character string to obtain original data of the Chinese character string.
The method is applied to the field of information push application, in particular to a push scene based on 'must push'. It should be noted that, according to the data type of the encoded data, converting the encoded data into a binary bit string means that the processing of converting the encoded data into the binary bit string is somewhat different according to the data type of the encoded data, and in the embodiment of the present invention, the encoded data includes, but is not limited to, information related to a push service background when pushing an application vendor system of each terminal (e.g., a mobile phone), for example, a push message unique identifier (msgid) and a push service application information identifier (appkey) of the push service background, which is not limited specifically. Whether the encoding and decoding processing methods mentioned in the present invention need to be adopted or not can be selected as needed. It should be noted that, when pushing an application manufacturer system of each terminal (e.g., a mobile phone) by using a push service background, except for using msgid and appkey, a target user identifier (uid) of an application related to the push service background, a request identifier (requestId) in a push interface of each manufacturer, and the like are also involved, which are not specifically exemplified.
The following describes the encoding processing method and the corresponding decoding processing method in detail, taking the two types of encoded data, msgid and appkey, as examples.
As shown in fig. 1, there is provided an encoding processing method, including the steps of:
s10: encoded data is acquired.
S20: a data type of the encoded data is determined.
S30: and converting the encoded data into binary bit strings according to the data type of the encoded data.
For steps S10-S30, in the scenario of using the twiddle, limited by the limitation of the signaling channel of the twiddle, when the msgid or appkey needs to be tracked, in order to ensure that the above identifier can be transmitted, the msgid or appkey needs to be compressed, first, the pushed data, that is, the encoded data, needs to be obtained first, and the encoded data is converted into a binary bit string according to the data type of the encoded data.
And if the data type of the coded data is msgid of the long shaping 64 character string, directly converting the msgid into a binary bit string. It can be understood that msgid is a long shaping uint64 string, 20 characters in total, and if the uint64 string is "5577006791947779410", the bit string obtained after binary conversion is:
“0100110101100101100000100010000100000111111111001111110101010010”。
if the data type of the encoded data is appkey, converting appkey into 16-ary data, for example, by hex. It can be understood that appkey is a 24-character string, such as "fdcc 21ed0e1cffc0238026f 6", and the invention needs to convert 24 characters into 16-system data and then correspondingly converts the data into a binary bit string.
S40: and splitting the bit string from the initial bit of the bit string according to preset bits in sequence to split the bit string into a plurality of first target bit strings.
After the processing of steps S10-S30, a plurality of bits of binary data, i.e., the bit string mentioned above, are obtained. In an embodiment, the splitting the bit string from the start bit of the bit string according to a preset number of bits sequentially to split the bit string into a plurality of first target bit strings means: and splitting the bit string into a plurality of first target bit strings by sequentially splitting the bit string according to 14 bits from the initial bit of the bit string.
Taking msgid as "5577006791947779410", the corresponding bit string is as follows:
0100110101100101100000100010000100000111111111001111110101010010;
starting from the initial bit of the bit string, splitting bits (bits) according to 14 bits, forming a Chinese character by every 14 bits, splitting the bit string according to 14 bits in sequence, supplementing 0 when the bits are not enough, and finally splitting a plurality of first target bit strings into the following parts:
01001101011001;
01100000100010;
00010000011111;
11110011111101;
01010010000000。
after the appkey correspondence is converted into the bit string, the processing method of the appkey correspondence bit string is the same as the processing method of the msgid, which is not illustrated here.
S50: and adding a Chinese character identification character string of the Unicode to each first target bit character string to obtain a plurality of corresponding second target bit character strings.
In one embodiment, a chinese character of unicode (unicode) identifies a string, which is referred to as 0x4e00, and each target string is added with 0x4e00 to obtain a plurality of corresponding second target strings. It should be noted that the chinese character identification character string may also be one of the character strings in the interval 0x4e00-0x9fa5 of unicode chinese character encoding, and is not specifically limited, as long as after the first target bit character string is added with the chinese character identification character string, the chinese character corresponding to the second target bit character is within the visible range of the chinese character, that is, after the first target bit character string is added with the chinese character identification character string, according to unicode chinese character encoding, the first target bit character string and the chinese character identification character string can be converted into the chinese character.
S60: and converting each second target bit string into a Chinese character to obtain a Chinese character string corresponding to the encoded data for pushing.
Adding 0x4e00 to each first target bit string to obtain a plurality of corresponding second target bit strings, and converting each second target bit string into a Chinese character by using unicode coding to obtain a Chinese character string corresponding to the coded data for pushing.
Illustratively, according to the above embodiment, assuming that the encoded data is msgid, which is specifically "18446744073709551615", and the length is 20 characters, after the encoding processing method provided by the embodiment of the present invention, the final encoding result is a chinese character string " " with the length changed to 5 characters, and thus, the encoding processing method provided by the present invention effectively compresses the characters tentatively used by msgid, and can be applied to the scenario of information encoding that must be reached.
Assuming that the encoded data is appkey, specifically, "fdcc 21ed0e1cffc0238026f 6", with a length of 24 characters, after the encoding processing method provided by the embodiment of the present invention, the final result after encoding is the chinese character string "china barge ", with a length of 7 characters, it can be seen that the appkey is effectively compressed by the encoding processing method provided by the present invention, and the temporarily used characters can be applied to the scenario of information encoding that must be reached.
In the coding processing method, coded data is obtained firstly; determining a data type of the encoded data; converting the encoded data into binary bit strings according to the data type of the encoded data; splitting the bit string according to preset digits in sequence from the initial bit of the bit string to split the bit string into a plurality of first target bit strings; adding Chinese character identification character strings of Unicode to each first target bit character string to obtain a plurality of corresponding second target bit character strings; and converting each second target bit string into a Chinese character to obtain a Chinese character string corresponding to the encoded data for pushing. In the invention, the data type of the coded data is split and is correspondingly converted into Chinese characters for information push, so that the characters occupied by the data are effectively compressed, the length of extra data can be reduced, and the data can be pushed out with more information as much as possible.
It should be noted that, in an embodiment, the chinese character string obtained by encoding may be used to push data according to a pushing requirement or a scenario. If the 'must-reach' is used, the data to be pushed, such as the msgid or appkey code, is compressed and pushed by using the encoding processing method.
Referring to fig. 2, in an embodiment, a decoding processing method corresponding to the encoding processing method embodiment is provided, which includes the following steps:
s101: the decoded chinese character string is obtained.
The Chinese character string is obtained by the encoding processing.
S102: and transcoding the Chinese character string into Unicode code.
For example, for the Chinese character string " imitations", after being transcoded into Unicode, it becomes "\\ u8dff \ u8dff \ u8dff \ u8dff \ u4 eff".
The Chinese character string 'Gong barge ' is transcoded into Unicode and then is changed into '\\ u8d73\ u501e \ u8238\ u6aff \ u7e08\ u8602\ u54f 6'.
S103: and subtracting the Chinese character identification character string of the unicode from each character in the unicode code, and converting the character identification character string into a bit character string.
For example, if the chinese character string used in encoding is 0x4e00, then each character in the unicode encoding is converted into a bit string after subtracting 0x4e 00.
For example, "\ u8dff \ u8dff \ u8dff \ u8dff \ u4 eff" converts u8dff, u4eff, minus 0x4e00, respectively, into a bit string.
For example, "u 8d73\ u501e \ u8238\ u6aff \ u7e08\ u8602\ u54f 6", u8d73, u501e, u8238, u6aff, u7e08, u8602, u54f6 minus 0x4e00 are converted into bit strings.
S104: and performing inverse conversion processing on the bit string according to the original data type corresponding to the Chinese character string to obtain original data of the Chinese character string.
If the original data type corresponding to the Chinese character string is msgid of a long shaping uint64 character string, directly converting the bit character string into a uint64 character string; and if the original data type corresponding to the Chinese character string is appkey, converting the bit character string into 16-system data, and correspondingly encoding the 16-system data into appkey.
For example, if a certain msgid is set, the chinese character string obtained by the encoding processing method is " -imitated", and after the decoding processing by the decoding processing method, msgid "18446744073709551615" corresponding to the chinese character string " -imitated" is obtained, that is, the original data corresponding to the chinese character string is restored.
For example, let an appkey, the chinese character string obtained by the encoding method is "china barge ", and after the decoding processing by the decoding processing method, the appkey "fdcc 21ed0e1cffc0238026f 6" corresponding to the chinese character string "china barge " is obtained, that is, the original data corresponding to the chinese character string is restored.
In an embodiment, the encoding processing method and the decoding processing method are deployed in a cloud, for example, in a private cloud.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, an encoding processing apparatus is provided, and the encoding processing apparatus corresponds to the encoding processing method in the above embodiment one to one. As shown in fig. 3, the encoding processing apparatus includes an obtaining module 101, a determining module 102, a first converting module 103, a splitting module 104, a splicing module 105, and a second converting module 106. The functional modules are explained in detail as follows:
an obtaining module 101, configured to obtain encoded data;
a determining module 102, configured to determine a data type of the encoded data;
a first conversion module 103, configured to convert the encoded data into a binary bit string according to a data type of the encoded data;
a splitting module 104, configured to split the bit string sequentially according to a preset number of bits from an initial bit of the bit string, so as to split the bit string into a plurality of first target bit strings;
a second conversion module 105, configured to add a chinese character identification character string of unicode to each first target bit string to obtain a plurality of corresponding second target bit strings, and convert each second target bit string into a chinese character to obtain a chinese character string corresponding to the encoded data for pushing.
Further, the first conversion module 103 is specifically configured to:
if the data type of the coded data is the unique mark msgid of the push message of the push service background, directly converting the coded data into a binary bit string;
if the data type of the encoded data is the push service application information identifier appkey, converting the encoded data into 16-system data, and converting the 16-system data into a binary bit string.
Further, the splitting module 104 is specifically configured to:
and splitting the bit string into a plurality of first target bit strings by sequentially splitting the bit string according to 14 bits from the initial bit of the bit string.
The splicing module 105 is specifically configured to:
adding 0x4e00 to each first target bit string to obtain a plurality of corresponding second target bit strings.
Referring to fig. 4, a decoding processing apparatus is provided, which includes:
an obtaining module 201, configured to obtain a decoded chinese character string, where the chinese character string is obtained by a coding processing method;
a first conversion module 202, configured to transcode the chinese character string into a unicode code;
the second conversion module 203 is configured to subtract the chinese character identification string of unicode from each character in the unicode code, and convert the character identification string into a bit string;
the reverse module 204 is configured to perform reverse conversion processing on the bit string according to the original data type corresponding to the chinese character string, so as to obtain original data of the chinese character string.
The inversion module is specifically configured to:
if the original data type corresponding to the Chinese character string is the unique identifier msgid of a push message of a push service background, converting the bit character string into a character string corresponding to the msgid so as to obtain the original data of the Chinese character string;
if the original data type corresponding to the Chinese character string is a push service application information identifier appkey, converting the bit character string into 16-system data, and correspondingly converting the 16-system data into a character string corresponding to the appkey so as to obtain the original data of the Chinese character string.
For specific limitations of the encoding processing apparatus, reference may be made to the above limitations on the encoding processing method, and for specific limitations of the decoding processing apparatus, reference may be made to the above limitations on the decoding processing method, which is not described herein again. Each module in the encoding processing device or the decoding processing device may be wholly or partially implemented by software, hardware, or a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The computer program is executed by a processor to implement an encoding processing method or a decoding processing method.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring encoded data;
determining a data type of the encoded data;
converting the encoded data into binary bit strings according to the data type of the encoded data;
splitting the bit string from the initial bit of the bit string according to preset bits in sequence to split the bit string into a plurality of first target bit strings;
adding Chinese character identification character strings of Unicode to each first target bit character string to obtain a plurality of corresponding second target bit character strings;
and converting each second target bit string into a Chinese character to obtain a Chinese character string corresponding to the encoded data for pushing.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a decoded Chinese character string, wherein the Chinese character string is obtained by the encoding processing method;
transcoding the Chinese character string into Unicode code;
subtracting the Chinese character identification character string of the unicode from each character in the unicode code, and converting the character identification character string into a bit character string;
and performing inverse conversion processing on the bit string according to the original data type corresponding to the Chinese character string to obtain original data of the Chinese character string.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring encoded data;
determining a data type of the encoded data;
converting the encoded data into binary bit strings according to the data type of the encoded data;
splitting the bit string from the initial bit of the bit string according to preset bits in sequence to split the bit string into a plurality of first target bit strings;
adding Chinese character identification character strings of Unicode to each first target bit character string to obtain a plurality of corresponding second target bit character strings;
and converting each second target bit string into a Chinese character to obtain a Chinese character string corresponding to the encoded data for pushing.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a decoded Chinese character string, wherein the Chinese character string is obtained by the encoding processing method;
transcoding the Chinese character string into Unicode code;
subtracting the Chinese character identification character string of the unicode from each character in the unicode code, and converting the character identification character string into a bit character string;
and performing inverse conversion processing on the bit string according to the original data type corresponding to the Chinese character string to obtain original data of the Chinese character string.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; 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; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. An encoding processing method, comprising:
acquiring encoded data;
determining a data type of the encoded data;
converting the encoded data into binary bit strings according to the data type of the encoded data;
splitting the bit string from the initial bit of the bit string according to preset bits in sequence to split the bit string into a plurality of first target bit strings;
adding Chinese character identification character strings of Unicode to each first target bit character string to obtain a plurality of corresponding second target bit character strings;
and converting each second target bit string into a Chinese character to obtain a Chinese character string corresponding to the encoded data for pushing.
2. The encoding processing method according to claim 1, wherein said converting the encoded data into a binary bit string according to a data type of the encoded data comprises:
if the data type of the coded data is the unique mark msgid of the push message of the push service background, directly converting the coded data into a binary bit string;
if the data type of the encoded data is the push service application information identifier appkey, converting the encoded data into 16-system data, and converting the 16-system data into a binary bit string.
3. The encoding processing method of claim 1, wherein the splitting the bit string into a plurality of first target bit strings by sequentially splitting the bit string by a preset number of bits from a start bit of the bit string comprises:
and splitting the bit string into a plurality of first target bit strings by sequentially splitting the bit string according to 14 bits from the initial bit of the bit string.
4. The encoding processing method of claim 1, wherein adding a unicode chinese character identifier string to each of the first target bit strings to obtain a corresponding plurality of second target bit strings comprises:
adding 0x4e00 to each first target bit string to obtain a plurality of corresponding second target bit strings.
5. A decoding processing method, comprising:
acquiring a decoded Chinese character string, wherein the Chinese character string is obtained by the encoding processing method of any one of claims 1 to 4;
transcoding the Chinese character string into Unicode code;
subtracting the Chinese character identification character string of the unicode from each character in the unicode code, and converting the character identification character string into a bit character string;
and performing inverse conversion processing on the bit string according to the original data type corresponding to the Chinese character string to obtain original data of the Chinese character string.
6. The decoding processing method according to claim 5, wherein said performing inverse transform processing on the bit string according to the original data type corresponding to the chinese character string to obtain the original data of the chinese character string comprises:
if the original data type corresponding to the Chinese character string is the unique identifier msgid of a push message of a push service background, converting the bit character string into a character string corresponding to the msgid so as to obtain the original data of the Chinese character string;
if the original data type corresponding to the Chinese character string is a push service application information identifier appkey, converting the bit character string into 16-system data, and correspondingly converting the 16-system data into a character string corresponding to the appkey so as to obtain the original data of the Chinese character string.
7. An encoding processing apparatus characterized by comprising:
the acquisition module is used for acquiring encoded data;
a determining module for determining a data type of the encoded data;
a first conversion module, configured to convert the encoded data into a binary bit string according to a data type of the encoded data;
the splitting module is used for sequentially splitting the bit string according to preset bits from the initial bit of the bit string to split the bit string into a plurality of first target bit strings;
and the second conversion module is used for adding a Chinese character identification character string of a uniform code unicode to each first target bit character string to obtain a plurality of corresponding second target bit character strings, converting each second target bit character string into a Chinese character, and obtaining the Chinese character string corresponding to the encoded data for pushing.
8. A decoding processing apparatus, characterized by comprising:
an obtaining module, configured to obtain a decoded chinese character string, where the chinese character string is obtained by the encoding processing method according to any one of claims 1 to 4;
the first conversion module is used for transcoding the Chinese character string into a Unicode code;
the second conversion module is used for converting each character in the unicode code into a bit string after subtracting the Chinese character identification string of the unicode;
and the reverse conversion module is used for performing reverse conversion processing on the bit string according to the original data type corresponding to the Chinese character string so as to obtain the original data of the Chinese character string.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the encoding processing method according to any one of claims 1 to 4 or the steps of the decoding processing method according to any one of claims 5 to 6 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of an encoding method according to any one of claims 1 to 4 or the steps of a decoding method according to any one of claims 5 to 6.
CN202011212247.1A 2020-11-03 2020-11-03 Encoding and decoding processing method, device, equipment and storage medium Pending CN112861475A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011212247.1A CN112861475A (en) 2020-11-03 2020-11-03 Encoding and decoding processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011212247.1A CN112861475A (en) 2020-11-03 2020-11-03 Encoding and decoding processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112861475A true CN112861475A (en) 2021-05-28

Family

ID=75995433

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011212247.1A Pending CN112861475A (en) 2020-11-03 2020-11-03 Encoding and decoding processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112861475A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023051319A1 (en) * 2021-09-30 2023-04-06 深圳智慧林网络科技有限公司 Data sending method, apparatus and device based on multi-data alignment, data receiving method, apparatus and device based on multi-data alignment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100141486A1 (en) * 2008-12-04 2010-06-10 Industrial Technology Research Institute Data encoding and decoding methods and computer readable medium thereof
US20120030375A1 (en) * 2010-07-29 2012-02-02 Sap Ag Codepage-independent binary encoding method
CN110737908A (en) * 2019-10-12 2020-01-31 京东数字科技控股有限公司 Encryption method and apparatus, decryption method and apparatus, electronic device, and medium
CN110958024A (en) * 2019-12-13 2020-04-03 深圳市道通智能航空技术有限公司 Serial port data encoding method and device, embedded device and communication system
CN111131376A (en) * 2019-10-22 2020-05-08 国网新疆电力有限公司信息通信公司 Image segmentation transmission method, system, terminal and server under extreme network environment
CN111222306A (en) * 2020-01-06 2020-06-02 广州虎牙科技有限公司 Data processing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100141486A1 (en) * 2008-12-04 2010-06-10 Industrial Technology Research Institute Data encoding and decoding methods and computer readable medium thereof
US20120030375A1 (en) * 2010-07-29 2012-02-02 Sap Ag Codepage-independent binary encoding method
CN110737908A (en) * 2019-10-12 2020-01-31 京东数字科技控股有限公司 Encryption method and apparatus, decryption method and apparatus, electronic device, and medium
CN111131376A (en) * 2019-10-22 2020-05-08 国网新疆电力有限公司信息通信公司 Image segmentation transmission method, system, terminal and server under extreme network environment
CN110958024A (en) * 2019-12-13 2020-04-03 深圳市道通智能航空技术有限公司 Serial port data encoding method and device, embedded device and communication system
CN111222306A (en) * 2020-01-06 2020-06-02 广州虎牙科技有限公司 Data processing method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023051319A1 (en) * 2021-09-30 2023-04-06 深圳智慧林网络科技有限公司 Data sending method, apparatus and device based on multi-data alignment, data receiving method, apparatus and device based on multi-data alignment

Similar Documents

Publication Publication Date Title
CN104537109A (en) Method for hiding car owner information and contacting car owners
WO2021115142A1 (en) Serial data encoding method and apparatus, and embedded device and communication system
CN112165331A (en) Data compression method and device, data decompression method and device, storage medium and electronic equipment
CN109062906B (en) Translation method and device for program language resources
CN111090582A (en) Error code positioning method and device, storage medium and electronic equipment
CN112398726B (en) Receipt information processing method, system and storage medium for push message
CN112861475A (en) Encoding and decoding processing method, device, equipment and storage medium
CN115396192A (en) User identity verification method and device, computer equipment and storage medium
CN112911024B (en) Method and system for collecting data of Internet of things, electronic device and storage medium
CN112214250A (en) Application program assembly loading method and device
CN111291300B (en) Webpage data processing method and device, webpage system and server
CN114337678A (en) Data compression method, device, equipment and storage medium
CN113314128B (en) Delayed access method, device and system for voice service and related products
CN109195139B (en) Data transmission method, device, platform and medium for M2M management platform and eSIM card
CN108762762B (en) Session information management method, device, equipment and computer storage medium
CN111090451A (en) Service configuration method, device and storage medium
CN106569939B (en) Control script program multi-country character analysis system and multi-country character analysis method
CN112416619A (en) Interface configuration method, equipment, terminal and storage medium
CN110633564B (en) File generation method and device
US7451153B2 (en) Method and apparatus for symmetrical filename encoding
CN111708795A (en) Object identification generation method, object identification updating device, computer equipment and medium
CN102487526B (en) Protocol conformance test method and system thereof
CN112104441B (en) Method, device and system for encoding and decoding service data packet
CN111355634B (en) Network interface testing method
CN113688601B (en) Watermark generation method and device based on form, electronic equipment and computer medium

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