CN112699660B - Data processing method, system and equipment - Google Patents
Data processing method, system and equipment Download PDFInfo
- Publication number
- CN112699660B CN112699660B CN201911013698.XA CN201911013698A CN112699660B CN 112699660 B CN112699660 B CN 112699660B CN 201911013698 A CN201911013698 A CN 201911013698A CN 112699660 B CN112699660 B CN 112699660B
- Authority
- CN
- China
- Prior art keywords
- data
- simplified
- dictionary
- simplification
- source 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.)
- Active
Links
- 238000003672 processing method Methods 0.000 title abstract description 30
- 238000000034 method Methods 0.000 claims abstract description 62
- 230000005540 biological transmission Effects 0.000 claims abstract description 40
- 238000012545 processing Methods 0.000 claims description 89
- 238000004891 communication Methods 0.000 claims description 56
- 230000008569 process Effects 0.000 claims description 11
- 238000012544 monitoring process Methods 0.000 claims description 3
- 230000003044 adaptive effect Effects 0.000 claims 3
- 238000010586 diagram Methods 0.000 description 17
- 238000013507 mapping Methods 0.000 description 15
- 230000006870 function Effects 0.000 description 9
- 230000003993 interaction Effects 0.000 description 5
- 230000006835 compression Effects 0.000 description 4
- 238000007906 compression Methods 0.000 description 4
- COCAUCFPFHUGAA-MGNBDDOMSA-N n-[3-[(1s,7s)-5-amino-4-thia-6-azabicyclo[5.1.0]oct-5-en-7-yl]-4-fluorophenyl]-5-chloropyridine-2-carboxamide Chemical compound C=1C=C(F)C([C@@]23N=C(SCC[C@@H]2C3)N)=CC=1NC(=O)C1=CC=C(Cl)C=N1 COCAUCFPFHUGAA-MGNBDDOMSA-N 0.000 description 4
- 238000011084 recovery Methods 0.000 description 4
- 230000011664 signaling Effects 0.000 description 4
- 230000006978 adaptation Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000006855 networking Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 230000006837 decompression Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002441 reversible effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 239000003550 marker Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/174—Redundancy elimination performed by the file system
- G06F16/1744—Redundancy elimination performed by the file system using compression, e.g. sparse files
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the application provides a data processing method, a system and equipment. The method comprises the following steps: acquiring a dictionary, wherein the dictionary contains at least one word entry, and the word entry comprises associated data elements and simplified characters; acquiring source data, wherein the source data comprises at least one data element; replacing the data elements of the hit entry in the source data with simplified characters in the hit entry by using the dictionary to obtain simplified data; and sending the simplified data to a receiver so that the receiver recovers the source data according to the dictionary. By adopting the technical scheme provided by the embodiments of the application, the data size of the source data can be greatly reduced, so that the data transmission quantity is reduced, and the time consumed by data transmission is shortened.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, system, and device.
Background
For some intelligent devices, because the devices have no networking capability, the intelligent devices can only be connected with the devices with networking capability, such as mobile phones, in a Bluetooth mode, and the network channels of the devices are used for acquiring data of a server (such as a cloud).
In general, the intelligent device and the mobile phone device adopt a BLE (Bluetooh Low Energy, bluetooth low energy technology) connection mode, the bandwidth is limited, and if more data is issued by the server, the longer the transmission time is required. For example, the cloud issues 8KB of data, and the bandwidth is only 4KB/s, so that the time for the data to pass from the mobile phone to the intelligent device is 2 s.
Disclosure of Invention
The embodiments of the present application provide a data processing method, system and device capable of solving or partially solving the problems existing in the prior art.
In one embodiment of the present application, a data processing method is provided. The method comprises the following steps:
acquiring a dictionary, wherein the dictionary contains at least one word entry, and the word entry comprises associated data elements and simplified characters;
Acquiring source data, wherein the source data comprises at least one data element;
Replacing the data elements of the hit entry in the source data with simplified characters in the hit entry by using the dictionary to obtain simplified data;
and sending the simplified data to a receiver so that the receiver recovers the source data according to the dictionary.
In another embodiment of the present application, a data processing method is also provided. The method comprises the following steps:
Splitting a plurality of data elements;
Configuring simplified characters for the split data elements meeting preset conditions to construct word entries containing associated data elements and the simplified characters;
Based on the obtained entry, a dictionary that can simplify the data to be transmitted is obtained.
In yet another embodiment of the present application, a data processing system is also provided. The data processing system includes:
A sender for obtaining a dictionary containing at least one word entry, the word entry comprising associated data elements and simplified characters; acquiring source data, wherein the source data comprises at least one data element; replacing the data elements of the hit entry in the source data with simplified characters in the hit entry by using the dictionary to obtain simplified data; transmitting the reduced data to a receiving party;
a receiving side, configured to receive reduced data sent by the sending side, where the reduced data contains reduced characters to be recovered; and replacing the simplified characters hitting the entry in the simplified data with the data elements in the hit entry by using the dictionary so as to recover the source data.
In yet another embodiment of the present application, a data processing method is also provided. The method comprises the following steps:
acquiring source data, wherein the source data comprises data elements;
based on the bandwidth of the communication link with the receiver, simplifying at least one data element in the source data to obtain simplified data;
And sending the simplified data to a receiving party so that the receiving party can carry out inverse processing on the simplified data to recover the source data.
In yet another embodiment of the present application, a data processing method is also provided. The method comprises the following steps:
acquiring source data, wherein the source data comprises at least one data element;
determining target data elements to be simplified in the source data;
simplifying the target data elements in the source data to obtain simplified data;
And sending the simplified data to a receiver, and carrying out inverse processing on the simplified data by the receiver to recover the source data.
In yet another embodiment of the present application, an electronic device is also provided. The electronic device includes: a memory, a processor, and a communication component; wherein,
The memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory for:
acquiring a dictionary, wherein the dictionary contains at least one word entry, and the word entry comprises associated data elements and simplified characters;
Acquiring source data, wherein the source data comprises at least one data element;
Replacing the data elements of the hit entry in the source data with simplified characters in the hit entry by using the dictionary to obtain simplified data;
And sending the simplified data to a receiver through the communication component so that the receiver recovers the source data according to the dictionary.
In yet another embodiment of the present application, an electronic device is also provided. The electronic device includes: a memory and a processor, wherein,
The memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory for:
Splitting a plurality of data elements;
Configuring simplified characters for the split data elements meeting preset conditions to construct word entries containing associated data elements and the simplified characters;
Based on the obtained entry, a dictionary that can simplify the data to be transmitted is obtained.
In yet another embodiment of the present application, an electronic device is also provided. The electronic device includes: a memory, a processor, and a communication component, wherein,
The memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory for:
acquiring source data, wherein the source data comprises data elements;
based on the bandwidth of the communication link with the receiver, simplifying at least one data element in the source data to obtain simplified data;
And sending the simplified data to a receiver through the communication component so that the receiver can carry out inverse processing on the simplified data to recover the source data.
In yet another embodiment of the present application, an electronic device is also provided. The electronic device includes: a memory, a processor, and a communication component, wherein,
The memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory for:
acquiring source data, wherein the source data comprises at least one data element;
determining target data elements to be simplified in the source data;
simplifying the target data elements in the source data to obtain simplified data;
And sending the simplified data to a receiver through the communication component, and carrying out inverse processing on the simplified data by the receiver so as to recover the source data.
According to the technical scheme provided by the embodiment of the application, at least one data element in the source data is replaced by the corresponding simplified character in the dictionary by utilizing the dictionary, so that the data size of the source data can be greatly reduced, the data transmission quantity is further reduced, and the time consumed by data transmission is shortened.
In another technical scheme provided by the embodiment of the application, a dictionary is created based on split data elements by splitting the data elements; the dictionary provides a simplifying basis for simplifying data, is beneficial to reducing the data size of the data to be transmitted, and further can shorten the time consumed by data transmission.
In still another technical solution provided by the embodiments of the present application, based on a bandwidth of a communication link with a receiving party, simplifying at least one data element in the source data to obtain simplified data; the data and bandwidth adaptation is simplified, the time consumed by data transmission is ensured to be within a short time, and the data recovery processing capacity of a receiving party can be relatively reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a data processing system according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a data processing system according to another embodiment of the present application;
FIG. 3 is a flow chart illustrating a data processing method according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a data processing method according to another embodiment of the present application;
FIG. 5 is a flowchart of a data processing method according to another embodiment of the present application;
Fig. 6 is a signaling interaction schematic diagram between a device end and a cloud end in a data processing method according to an embodiment of the present application;
FIG. 7 is a flowchart of a data processing method according to another embodiment of the present application;
FIG. 8 is a flowchart of a data processing method according to another embodiment of the present application;
FIG. 9 is a flowchart of a data processing method according to another embodiment of the present application;
FIG. 10 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a data processing apparatus according to another embodiment of the present application;
FIG. 12 is a schematic diagram of a data processing apparatus according to another embodiment of the present application;
FIG. 13 is a schematic diagram of a data processing apparatus according to another embodiment of the present application;
FIG. 14 is a schematic diagram of a data processing apparatus according to another embodiment of the present application;
fig. 15 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application provide a new solution for reducing the data size by means of a simplified processing of the data to be transmitted.
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present application with reference to the accompanying drawings.
In some of the flows described in the description of the application, the claims, and the figures described above, a number of operations occurring in a particular order are included, and the operations may be performed out of order or concurrently with respect to the order in which they occur. The sequence numbers of operations such as 101, 102, etc. are merely used to distinguish between the various operations, and the sequence numbers themselves do not represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types. Further, the following embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
FIGS. 1 and 2 are schematic diagrams illustrating the structure of a data processing system according to an embodiment of the present application. As shown in fig. 1 and 2, the data processing system includes:
A sender 101 for obtaining a dictionary containing at least one word entry, the word entry comprising associated data elements and simplified characters; acquiring source data, wherein the source data comprises at least one data element; replacing the data elements of the hit entry in the source data with simplified characters in the hit entry by using the dictionary to obtain simplified data; transmitting the reduced data to the receiving party 102;
A receiving side 102, configured to receive reduced data sent by the sending side 101, where the reduced data contains reduced characters to be recovered; and replacing the simplified characters hitting the entry in the simplified data with the data elements in the hit entry by using the dictionary so as to recover the obtained source data.
According to the technical scheme provided by the embodiment, at least one data element in the source data is replaced by the corresponding simplified character in the dictionary by utilizing the dictionary, so that the data size of the source data can be greatly reduced, the data transmission quantity is further reduced, and the time consumed by data transmission is shortened.
Further, the sender 101 may compress the reduced data before sending the reduced data, and then send the compressed reduced data to the receiver 102. After receiving the compressed simplified data, the receiver 102 decompresses the simplified data, and then resumes the simplified data.
The compression Algorithm in the prior art, such as LZMA (Lempel-Ziv-Markov chain-Algorithm), may be used for compressing the simplified data, which is not specifically limited in this embodiment.
The sender can be an entity server, a virtual server, a cloud service platform and the like which are deployed at a server side; the device may also be any device deployed on a client, such as a notebook computer, a desktop computer, a smart phone, a tablet computer, a smart wearable device (e.g., a smart watch), and the like.
Likewise, the receiver may be an entity server, a virtual server, a cloud service platform, etc. deployed at the server side; the device can also be any device which is deployed at a client, such as a notebook computer, a desktop computer, a smart phone, a tablet computer, a smart wearable device (such as a smart watch) and the like; it may also be a device that can establish a connection with other devices by bluetooth or the like, such as a smart band.
What needs to be explained here is: the sender and the receiver are defined according to the current roles; in fact, the device may be a sender or a receiver; assume that a communication connection is successfully established between device 1 and device 2; the device 1 wants to send data to the device 2, where the device 1 is the sender and the device 2 is the receiver. At the next moment, the device 2 wants to send data to the device 1, and the device 1 is the receiving party, and the device 2 is the sending party.
For example, the data processing system provided in this embodiment can be applied to the following scenarios:
Scene 1, the sender is cloud; the receiving party is a device end (such as a computer, a notebook computer, a smart phone, a smart wearable device and the like).
Scene 2, the sender is the server; the receiving party is a client;
scene 3, the sender is the client; the receiving party is a server;
Scene 4, the sender is a device with networking capability (such as a computer, a notebook computer, a smart phone, an intelligent wearable device and the like); the receiver is a device (such as a smart bracelet) connected with the sender through Bluetooth and the like.
The receiver and the sender can establish communication connection in a wireless network mode or a wired network mode. Optionally, the wireless network or wired network uses standard communication techniques and/or protocols. The network is typically the Internet, but may be any network including, but not limited to, a local area network (Local Area Network, LAN), metropolitan area network (Metropolitan Area Network, MAN), wide area network (Wide Area Network, WAN), mobile, wired or wireless network, private network, or any combination of virtual private networks.
Further, the system provided in this embodiment may further include a server. The server may be a sender, a receiver, or a cloud end connected to the sender, which is not limited in this embodiment.
The specific workflow of each component unit in the data processing system, such as the sender and the receiver, and the signaling interaction between the component units will be further described in the following embodiments.
Fig. 3 is a flow chart illustrating a data processing method according to an embodiment of the application. The execution subject of the method provided in this embodiment is the sender in the system embodiment described above. Specifically, as shown in fig. 3, the data processing method includes:
201. A dictionary is obtained, the dictionary containing at least one word entry, the word entry including associated data elements and simplified characters.
202. Source data is acquired, the source data comprising at least one data element.
203. And replacing the data elements of the hit entry in the source data with simplified characters in the hit entry by using the dictionary so as to obtain simplified data.
204. And sending the simplified data to a receiver so that the receiver recovers the source data according to the dictionary.
In 201 above, the dictionary may be characterized in the form shown in Table 1 below:
TABLE 1 dictionary
Data element | Simplified character | |
Word entry 1 | asrLogId | 0 |
Word entry 2 | attachmentCount | 1 |
…… | …… | …… |
Word entry N | version | 15 |
What needs to be explained here is: the simplified characters are numbers in the examples shown in table 1 above; in practical application, the simplified characters can be realized by adopting other characters besides numerals, and the embodiment is not limited in particular.
In 202 above, the source data may be data requested to be acquired by the receiving party, or may be data to be pushed to the receiving party by the sending party. The source data may be split into at least one data element. Taking structured data, such as JSON format data as an example, a plurality of Key Value Key-Value pairs exist in JSON format source data; key Value can be split out as data element in Key-Value pair; similarly, the Value may be split as a data element.
In 203 above, it is assumed that the source data includes a data element "attachmentCount"; the dictionary is shown in table 1 above. The data element "attachmentCount" in the source data hits term entry 2, whereby the data element "attachmentCount" in the source data can be replaced with the reduced character "1" in the hit term entry 2.
According to the technical scheme provided by the embodiment, at least one data element in the source data is replaced by the corresponding simplified character in the dictionary by utilizing the dictionary, so that the data size of the source data can be greatly reduced, the data transmission quantity is further reduced, and the time consumed by data transmission is shortened.
In a specific implementation, the step 204 "sending the reduced data to the receiving party" may include:
2041. Under the condition that the dictionary is not stored by the receiver, compressing the dictionary and the simplified data to obtain a compressed packet;
2042. and sending the compressed packet to the receiver.
Further, in the case that the dictionary is stored in the receiving party, the step 204 "sending the simplified data to the receiving party" may be specifically:
Compressing the simplified data to obtain compressed data;
And transmitting the compressed data to a receiving party.
In order to know whether the receiving party stores a dictionary, dictionary recording information can be added locally; the dictionary record information may store dictionary records associated with respective recipients. Wherein the dictionary record associated with the recipient may be a marker that characterizes whether the recipient has a dictionary stored locally. For example, when the mark symbol corresponding to the receiver a is "1", the receiver a is characterized in that a dictionary is locally stored in the receiver a; and when the corresponding mark symbol of the receiver B is '0', the dictionary is characterized in that the receiver B does not store locally. That is, the method provided in this embodiment may further include the following steps:
205. Dictionary record information is acquired.
206. And in the case that the dictionary record information is searched for that the dictionary record of the receiver is empty, determining that the receiver does not store the dictionary.
207. And adding dictionary records related to the receiver in the dictionary record information in the case that the compressed packet is confirmed to be successfully transmitted to the receiver.
Of course, in the concrete implementation, the receiver can also report the information whether the dictionary is stored locally or not by itself; thus, the sender can update the dictionary record related to the receiver in the dictionary record information according to the received information.
Further, the data processing method provided in this embodiment may further include the following steps:
208. a plurality of data to be fed back in response to a request of at least one recipient is acquired.
209. Creating the dictionary from the plurality of data.
In one implementation manner, the step 209 of creating the dictionary according to the plurality of data may include the following steps:
2091. and splitting the data elements of the plurality of data.
2092. The number of identical data elements is counted.
2093. And configuring simplified characters for the data elements with statistical results meeting preset conditions to construct word entries.
The preset condition may be that the statistical number is greater than or equal to a threshold value.
2094. And obtaining the dictionary based on the obtained entry.
In theory, a term can be constructed for all data elements, i.e. a simplified character is configured for the data element, regardless of whether it is a high frequency element, and then a term is constructed. Although this is feasible, the dictionary can become too bulky; firstly, in the process of simplifying data by using a dictionary and recovering data by using the dictionary, long time is consumed for inquiring word entries; secondly, the synchronous quantity of the sender and the receiver is overlarge in the dictionary synchronous process. Thus, it is not necessary to construct word entries for some data elements that occur only in one or two data, but rather, this embodiment constructs word entries for data elements that occur at a high frequency (i.e., occur in greater than or equal to a threshold number of data).
In another implementation manner, the step 209 of creating the dictionary according to the plurality of data may further include the following steps:
2095. simplified characters are configured for data elements having character lengths greater than a set value to construct word entries.
In addition to some data elements with high occurrence frequency, data elements with overlong character length can correspondingly construct a term. Because the data elements with overlong character length occupy a relatively large space, the data elements are replaced by simplified characters, and the data size can be greatly reduced.
Further, the method provided in this embodiment may further include the following steps:
210. in response to a request from a recipient, it is monitored whether there are newly added data elements that satisfy the condition of the build word entry.
After the dictionary is created, dynamically acquiring data according to the request of a receiver to monitor whether newly added data elements meeting the condition of constructing word entries exist. The new data element refers to that no entry corresponding to the new data element exists in the existing dictionary. Building term conditions may include, but is not limited to, at least one of:
The number of occurrences is greater than or equal to a threshold;
the character length is greater than the set point.
To facilitate understanding, for example, the foregoing "occurrence number" is described, for example, the requests sent by 3 receivers are received successively, and the data acquired by the 3 receivers request all contains a data element "commandName"; and the threshold is 3; then the data element "commandName" satisfies the build word entry condition.
211. And under the condition that the existence of the newly added data element is detected, configuring simplified characters for the newly added data element to construct a newly added word entry.
212. And adding the newly added word entries into the dictionary to obtain a new dictionary.
The dictionary can be created by a sender (such as a server, a cloud end and the like), and the dictionary provided by the sender can be cached or stored in a receiving end; the dictionary may correspond to an identification that uniquely characterizes its version, e.g., the dictionary has a version identification. Correspondingly, the method provided by the embodiment may further include the following steps:
213. a first version identification of the recipient dictionary is obtained.
214. And sending dictionary updating information to the receiver when the first version identifier is different from the second version identifier of the local dictionary, so that the receiver updates the dictionary corresponding to the first version identifier into the dictionary corresponding to the second version identifier.
After the receiving end and the sending end successfully establish network connection, the version identification of the dictionary which is locally cached or stored can be reported to the sending end. In practical applications, the dictionary of the sender may be dynamically updated through the steps 210-212; at this time, the sender can determine whether the dictionary version of the recipient falls behind based on the version identification of the recipient dictionary recorded locally. And when the judgment is lagging, sending dictionary updating information to the receiver.
The "dictionary update information" in 214 may be a full-scale dictionary, that is, the dictionary corresponding to the second version identifier is sent to the receiving party, so that the receiving party replaces the dictionary corresponding to the first version identifier stored locally with the dictionary corresponding to the second version identifier.
Or "dictionary update information" is updated incrementally. That is, the above 214 "send dictionary update information to the receiving side" includes:
2141. And comparing the dictionary corresponding to the first version identification with the dictionary corresponding to the second version identification to obtain a difference word entry.
2142. And generating dictionary update information based on the difference word entry.
Further, the method provided in this embodiment may further include the following steps:
215. Dictionary-recorded information is acquired, wherein the dictionary-recorded information contains dictionary-version information of at least one recipient.
216. And under the condition that the receiver is confirmed to successfully receive the dictionary updating information, updating the dictionary version information of the receiver in the dictionary record information into the second version identification.
Further, the data is structured data containing key value pairs; the data element is a key or a value in a key value.
In specific implementation, the user can also send custom simplified configuration information through the client. Namely, the method provided in this embodiment may further include the following steps:
217. receiving simplified configuration information sent by a user through a client, wherein the simplified configuration information contains simplified elements which are configured by the user for a data element in a self-defining way;
218. and replacing the data elements appointed by the simplified configuration information in the source data with the simplified elements configured by user definition.
It should be noted that, when the source data contains the simplified element of the user-defined configuration, the receiving party also needs to synchronize with the simplified configuration information, so that the receiving party can recover the corresponding data element.
In a specific embodiment, the technical solution provided in this example can also provide a dictionary suitable for different simplified program requirements. For example, the method provided in this embodiment may further include the following steps:
219. determining a simplification degree according to the bandwidth of a communication link between the receiver and the source data and the data size of the source data;
220. and acquiring a dictionary adapted to the degree of simplification.
In step 219, the time period required for transmitting the source data when the simplification process is performed may be calculated according to the bandwidth of the communication link and the data size of the source data. If the required time is too long (for example, exceeds a time threshold), the transmission time of the source data can be controlled within a set time (for example, a time length smaller than or equal to the time threshold), and the data size of the source data needs to be simplified under the current communication link bandwidth condition; the amount of simplification is taken as the degree of simplification.
In 220, the cloud or local dictionary corresponding to different degrees of simplification is stored in advance. For example, the number of terms contained in the dictionary corresponding to the low degree of simplification is smaller than the number of terms contained in the dictionary corresponding to the high degree of simplification. In practice, there may be an intersection of a dictionary corresponding to a low degree of simplification and a dictionary corresponding to a high degree of simplification. Taking the example that the data element contains a key and a corresponding value, it is assumed that two dictionaries with low simplification degree exist, and the dictionary corresponding to the low simplification degree only contains simplified word entries for the key and does not contain simplified word entries for the value; the dictionary corresponding to the high degree of simplification contains not only simplified word entries for key keys but also simplified word entries for value values. Thus, only the key of the data element in the source data can be simplified by using the dictionary corresponding to the low simplification degree; the dictionary corresponding to the high simplification degree can be used for simplifying the key of the data element in the source data, and the value of the data element in the source data can be simplified.
Fig. 4 is a schematic flow chart of a data processing method according to another embodiment of the present application. The execution subject of the method provided in this embodiment may be the receiver in the data processing system described above. Specifically, as shown in fig. 4, the data processing method includes:
301. And receiving the simplified data sent by the sender, wherein the simplified data contains simplified characters to be recovered.
302. Acquiring a dictionary; wherein the dictionary contains at least one word entry, the word entry including associated data elements and simplified characters.
303. And replacing the simplified characters hitting the entry in the simplified data with the data elements in the hit entry by using the dictionary so as to recover the obtained source data.
In the technical solution provided in this embodiment, since the sender sends simplified data that is simplified by using a dictionary, after receiving the simplified data, the simplified data can be recovered by using the same dictionary as the sender; the dictionary provides a simplification basis for simplifying the data, is helpful for reducing the data size of the data to be transmitted, and further can shorten the time consumed by data transmission.
In one possible technical solution, the step 301 of "receiving the simplified data sent by the sender" may include the following steps:
3011. And receiving the data packet sent by the sender.
3012. Decompressing the data packet.
3013. And acquiring the simplified data from the decompression result.
The "obtaining the dictionary" in step 302 may specifically include:
receiving the dictionary sent by the sender; or alternatively
Acquiring the dictionary stored locally; or alternatively
And receiving dictionary updating information sent by the sender, and updating the dictionary stored locally according to the dictionary updating information.
In step 303, the process of recovering the source data is actually the reverse of step 203 in the embodiment shown in fig. 2. The process of recovering the reduced character into a data element is: searching for target word entries (i.e., hit entries) containing the same simplified character based on the simplified character; the reduced character in the reduced data is then replaced with the data element in the target word entry.
Fig. 5 is a flow chart illustrating a data processing method according to an embodiment of the application. As shown in fig. 5, the data processing method includes:
401. And splitting the data elements of the plurality of data.
402. And configuring simplified characters for the split data elements meeting the preset conditions to construct word entries containing the associated data elements and the simplified characters.
403. Based on the obtained entry, a dictionary that can simplify the data to be transmitted is obtained.
In 401, the plurality of data may be data that at least one receiver requests to acquire in one period, or may be all data stored locally.
Further, the method provided in this embodiment may further include the following steps:
404. The number of identical data elements is counted.
405. The number of data elements greater than a threshold satisfies the preset condition.
Still further, the foregoing 405 may further be specifically: calculating the occurrence frequency of each data element based on the counted number of each data element; the data elements with the occurrence frequency larger than the first threshold value meet the preset condition.
Further, the method provided in this embodiment may further include the following steps:
406. The data elements with the character length larger than the set value meet the preset condition.
Still further, in the method provided in this embodiment, the entries in the dictionary may also be customized by the user. That is, the method provided in this embodiment may further include the following steps:
407. receiving setting information sent by a user through a client, wherein the setting information contains user-defined word items;
408. And storing the user-defined entries into the dictionary.
The technical solutions provided by the embodiments of the present application are described below by taking structured data as an example. Structured data, such as JSON format, is typically transmitted, with numerous key-value pairs present in the data. In order to facilitate understanding, the naming of the key is often long, and more space is occupied, so that the key cannot be simplified by the traditional compression algorithm. By adopting the technical scheme provided by the embodiments of the application, the keys are simplified on the basis of the traditional compression algorithm, and the keys can be further compressed, so that the purpose of further compression is achieved.
In this embodiment, the sender is a cloud end, and the receiver is a device end and is described as a scene. Fig. 6 shows a timing diagram of interaction between a cloud end and a device end. The realization of this scheme relies on equipment end and high in the clouds to carry out whole transformation, and its core principle is: the key part of the data to be issued by the cloud end is subjected to reduced representation, and the occupation ratio of the key in the total amount of returned data is reduced, so that the purpose of reducing source data is achieved; and storing the mapping association of the key on the equipment side, wherein the generation of the mapping association is controlled by the cloud. For ease of understanding, information on the mapping association relationship of keys (corresponding to the data elements mentioned in the above embodiments) and simplified characters will be stored here as a dictionary.
The following source data is assumed to be 1072bytes and JSON format data, and is instruction information issued to the device end by the cloud, wherein the instruction information comprises 16 primary keys and 3 secondary keys, and some keys have longer lengths, for example commandDomain. The source data is:
{"asrLogId":"","attachmentCount":0,"&&*%%$#":"X1","bizType":"XXYRS","commandDomain":"data","commandId":"***&%**%$#***",……,"version":"1.0"}
The dictionary may be characterized in the form shown in table 2 below:
TABLE 2
Word entry 1 | asrLogId | 0 |
Word entry 2 | attachmentCount | 1 |
Word entry 3 | bizType | 2 |
Word entry 4 | commandDomain | 3 |
Word entry 5 | commandId | 4 |
…… | …… | …… |
Word entry 15 | version | 15 |
The cloud uses the dictionary shown in table 2 to simplify the source data into the following simplified data: { "0", "1", "" 0"," "%o $ #" "X1", "2", "XXYRS", "3", "data", "" 4"," "%o $ #", … … "," 15":"1 "0" }
It can be seen that the simplified data is greatly reduced in data volume compared with the source data after the dictionary is utilized.
Referring to fig. 6, the signaling interaction flow between the cloud end and the device end is as follows:
s1, creating a dictionary by the cloud based on data acquired by at least one device side in a period of time.
S2, the equipment end sends a data acquisition request to the cloud end under the condition that the local dictionary is not available.
S3, the cloud acquires the first data requested by the equipment end, and simplifies at least one data element in the first data into simplified characters by utilizing the dictionary to obtain simplified data.
S4, the cloud terminal compresses the dictionary and the simplified data to obtain a compressed packet, and sends the compressed packet to the equipment terminal.
S5, after decompressing the compressed package, the equipment end stores a dictionary locally, and uses the dictionary to recover the simplified data to obtain first data.
And S6, the equipment end continuously sends a data acquisition request to the cloud end, and under the condition that the cloud dictionary is not updated, the cloud end utilizes the dictionary to simplify the second data requested by the equipment end, compresses the simplified second data and sends the compressed second data to the equipment end.
And S7, the equipment end continuously sends a data acquisition request to the cloud end, and under the condition that the cloud dictionary is updated, the cloud end utilizes the updated dictionary to simplify the third data requested by the equipment end, and compresses the simplified third data together with dictionary updating information and then sends the compressed third data to the equipment end.
The dictionary update information may include the updated dictionary, or may include only the difference between the updated dictionary and the device-side dictionary.
And S8, the equipment end updates the local dictionary according to the dictionary updating information, and recovers third data by using the updated dictionary.
In the technical solutions provided in the embodiments of the present application, the dictionary may be dynamically updated according to the data requested by each device side (the implementation of the dynamic update may be specifically referred to above); of course, if the fields in the communication protocol are all fixed, the mapping dictionary may be built up in advance, obviating the process of building and dynamic updating.
Another embodiment of the present application provides a data processing system. The system structure of the data processing system provided in this embodiment is similar to the system structure shown in fig. 1 and 2 described above. The difference is that: the way in which the sender simplifies the data is different. Specifically, the data processing system includes:
A sender, configured to obtain source data, where the source data includes a data element; based on the bandwidth of the communication link with the receiver, simplifying at least one data element in the source data to obtain simplified data; the simplified data is sent to a receiving party, so that the receiving party carries out inverse processing on the simplified data to recover the source data;
And the receiving party is used for receiving the simplified data sent by the sending party and carrying out inverse processing on the simplified data to recover the obtained source data.
Here, the reverse processing operation of the receiving side is performed based on a rule predetermined with the transmitting side.
According to the technical scheme provided by the embodiment, at least one data element in the source data is simplified based on the bandwidth of the communication link between the source data and the receiver so as to obtain simplified data; the data and bandwidth adaptation is simplified, the time consumed by data transmission is ensured to be within a short time, and the data recovery processing capacity of a receiving party can be relatively reduced.
The specific workflow of each component unit in the data processing system, such as the sender and the receiver, and the signaling interaction between the component units will be further described in the following embodiments.
Fig. 7 is a schematic flow chart of a data processing method according to another embodiment of the present application. As shown in fig. 7, the data processing method includes:
501. source data is acquired, wherein the source data comprises data elements.
502. At least one data element in the source data is reduced based on a bandwidth of the communication link with the recipient to obtain reduced data.
503. And sending the simplified data to a receiving party so that the receiving party can carry out inverse processing on the simplified data to recover the source data.
Further, the step 502 "performing simplification processing on at least one data element in the source data to obtain simplified data" based on the bandwidth of the communication link with the receiver, including:
5021. determining the simplification degree according to the bandwidth of the communication link between the receiver and the data size of the source data;
5022. and performing simplification processing on at least one data element in the source data according to a simplification scheme adapted to the degree of simplification so as to obtain simplified data.
For the contents of step 5021, reference is made to the corresponding description above, and the details are not repeated here.
The above simplification scheme may be the dictionary mentioned above, or may simplify rules for specific elements. The element simplification rule can be a preset simplification coding model; or a mapping rule. Wherein, the simplified coding model can be understood as: a general expression obtained by abstracting the coding logic; it may be a solution formula or a set of solution formulas, a process flow comprising one or more steps performed sequentially, or the like. That is, in the step 5022, the simplifying processing is performed on at least one data element in the source data according to the element simplifying rule adapted to the degree of simplification to obtain simplified data, which may specifically include:
When the element simplification rule is a simplified coding model, respectively taking the at least one data element as input of the simplified coding model, and executing the simplified coding model to obtain the simplified element corresponding to each data element;
And under the condition that the element simplification rule is a mapping rule, respectively acquiring simplified elements with mapping relations with all the data elements by utilizing the mapping rule.
Further, the method provided in this embodiment may further include the following steps:
504. Taking data elements belonging to high-frequency elements in the source data as objects to be simplified; and/or
505. And taking the data elements with the character length larger than a second threshold value in the source data as objects to be simplified.
Of course, the method provided in this embodiment may also be implemented by a simplified element of the user-defined configuration data element. That is, the method provided in this embodiment may further include the following steps:
506. Receiving simplified configuration information sent by a user through a client, wherein the simplified configuration information contains simplified elements which are configured by the user for a data element in a self-defining way;
507. And replacing the data elements appointed by the simplified configuration information in the source data with the simplified elements configured by user definition.
Taking the simplified data sent by the sender as an example, the simplified data is obtained by simplifying the source data by adopting element simplification rules, the data processing flow of the receiver is described. Fig. 8 is a schematic flow chart of a data processing method according to still another embodiment of the present application. As shown in fig. 8, the data processing method includes:
601. and receiving the simplified data sent by the sender.
602. And identifying simplified characters to be recovered in the simplified data.
603. And restoring the identified simplified characters into corresponding data elements by using inverse rules corresponding to the element simplification rules to obtain source data.
In 602, simplified characters may be shorter, such as numbers, combinations of numbers and letters, etc.; thus, a recognition policy for the reduced character may be determined based on the element reduction rule. For example, the simplified characters obtained by simplifying the data elements by the element simplification rules are numbers or a combination of numbers and letters; then an identification policy may be determined based on the characteristics of this reduced character. The reduced character is then recognized according to this recognition strategy. Or the simplified character is provided with a special identification bit, and whether the simplified character is the simplified character can be identified through the value of the identification bit; etc.
As in the above embodiment, the element simplification rule may be a simplified coding model or a mapping rule. Accordingly, the step 603 "restore the identified simplified character to the corresponding data element by using the inverse rule corresponding to the element simplified rule to obtain the source data" may specifically include:
When the element simplification rule is a simplified coding model and the inverse rule is a simplified decoding model corresponding to the simplified coding model, taking the simplified character as input of the simplified decoding model, and executing the simplified decoding model to obtain corresponding data elements;
And under the condition that the element simplification rule and the inverse rule are both mapping rules, acquiring the data elements with mapping relation with the simplified characters by utilizing the mapping rules.
Fig. 9 is a schematic flow chart of the data processing method according to another embodiment of the present application. As shown in fig. 9, the data processing method includes:
701. acquiring source data, wherein the source data comprises at least one data element;
702. Determining target data elements to be simplified in the source data;
703. simplifying the target data elements in the source data to obtain simplified data;
704. And sending the simplified data to a receiver, and carrying out inverse processing on the simplified data by the receiver to recover the source data.
The determining 702 "the target data element to be simplified in the source data" may include:
taking the data elements of the high-frequency elements in the source data as target data elements to be simplified; and/or
Taking the data elements with the character length larger than a second threshold value in the source data as target data elements to be simplified; and/or
And taking the data elements appearing in the dictionary in the source data as target data elements needing to be simplified.
The specific implementation process of 703 may refer to the schemes provided in the foregoing embodiments, and may refer to the corresponding content above, which is not described herein.
Fig. 10 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. As shown in fig. 10, the data processing apparatus includes: an acquisition module 11, a simplification module 12 and a transmission module 13. The obtaining module 11 is configured to obtain a dictionary, where the dictionary contains at least one word entry, and the word entry includes associated data elements and simplified characters; and obtaining source data, the source data comprising at least one data element. The simplification module 12 is configured to replace the data element of the hit entry in the source data with the simplified character in the hit entry by using the dictionary, so as to obtain simplified data. The sending module 13 is configured to send the reduced data to a receiving party, so that the receiving party recovers the source data according to the dictionary.
According to the technical scheme provided by the embodiment, at least one data element in the source data is replaced by the corresponding simplified character in the dictionary by utilizing the dictionary, so that the data size of the source data can be greatly reduced, the data transmission quantity is further reduced, and the time consumed by data transmission is shortened.
Further, the sending module 13 is further configured to: under the condition that the dictionary is not stored by the receiver, compressing the dictionary and the simplified data to obtain a compressed packet; and sending the compressed packet to the receiver.
Further, the data processing apparatus further includes:
the acquiring module 11 is further configured to acquire dictionary record information;
A determining module, configured to determine that the recipient does not store the dictionary when the dictionary record related to the recipient is queried in the dictionary record information to be empty;
And the adding module is used for adding dictionary records related to the receiver in the dictionary record information under the condition that the compressed packet is confirmed to be successfully sent to the receiver.
Further, the data processing apparatus further includes:
the acquiring module 11 is further configured to acquire a plurality of data that need to be fed back in response to a request of at least one receiver;
and the creating module is used for creating the dictionary according to the plurality of data.
Further, the creation module is further configured to:
Splitting the data elements of the plurality of data;
Counting the number of the same data elements;
Configuring simplified characters for data elements with statistical results meeting preset conditions to construct word entries;
and obtaining the dictionary based on the obtained entry.
Further, the data processing apparatus further includes:
the monitoring module is used for monitoring whether newly added data elements meeting the condition of constructing word entries exist in the process of responding to the request of the receiver;
the configuration module is used for configuring simplified characters for the newly added data elements under the condition that the newly added data elements are detected to exist, so as to construct newly added word entries;
And the adding module is used for adding the newly added word entries into the dictionary to obtain a new dictionary.
Further, the dictionary has a version identification; accordingly, in the data processing apparatus,
The acquiring module 11 is configured to acquire a first version identifier of the recipient dictionary;
The sending module 13 is configured to send dictionary update information to the receiving party when the first version identifier is different from the second version identifier of the local dictionary, so that the receiving party updates the dictionary corresponding to the first version identifier to the dictionary corresponding to the second version identifier.
Further, the sending module 13 is further configured to:
comparing the dictionary corresponding to the first version identification with the dictionary corresponding to the second version identification to obtain a difference word entry;
and generating dictionary update information based on the difference word entry.
Further, the data processing apparatus of this embodiment further includes:
The acquiring module 11 is further configured to acquire dictionary record information, where the dictionary record information contains dictionary version information of at least one receiver;
And the updating module is used for updating the dictionary version information of the receiver in the dictionary record information into the second version identification under the condition that the receiver is confirmed to successfully receive the dictionary updating information.
Further, the data is structured data containing key value pairs; the data element is a key or a value in a key value.
Further, the data processing apparatus provided in this embodiment may further include:
The receiving module is used for receiving simplified configuration information sent by a user through a client, wherein the simplified configuration information contains simplified elements which are configured by the user for a data element in a self-defining way;
the simplifying module 12 is further configured to replace a data element specified by the simplified configuration information in the source data with a simplified element configured by user definition.
Further, the obtaining module 11 is further configured to: determining a simplification degree according to the bandwidth of a communication link between the receiver and the source data and the data size of the source data; and acquiring a dictionary adapted to the degree of simplification.
What needs to be explained here is: the data processing device provided in the foregoing embodiments may implement the technical solutions described in the foregoing method embodiments, and the specific implementation principles of the foregoing modules or units may refer to corresponding contents in the foregoing method embodiments, which are not repeated herein.
Fig. 11 shows a schematic structural diagram of a data processing apparatus according to another embodiment of the present application. As shown in fig. 11, the data processing apparatus includes: a receiving module 21, an acquiring module 22 and a recovering module 23. The receiving module 21 is configured to receive reduced data sent by a sender, where the reduced data contains reduced characters to be recovered. The acquiring module 22 is used for acquiring a dictionary; wherein the dictionary contains at least one word entry, the word entry including associated data elements and simplified characters. The restoring module 23 is configured to replace the simplified character of the hit entry in the simplified data with a data element in the hit entry by using the dictionary, so as to restore the source data.
In the technical solution provided in this embodiment, since the sender sends simplified data that is simplified by using a dictionary, after receiving the simplified data, the simplified data can be recovered by using the same dictionary as the sender; the dictionary provides a simplification basis for simplifying the data, is helpful for reducing the data size of the data to be transmitted, and further can shorten the time consumed by data transmission.
Further, the obtaining module 22 is further configured to:
receiving the dictionary sent by the sender; or alternatively
Acquiring the dictionary stored locally; or alternatively
And receiving dictionary updating information sent by the sender, and updating the dictionary stored locally according to the dictionary updating information.
Further, the obtaining module 22 is further configured to:
Receiving a data packet sent by a sender;
decompressing the data packet;
And acquiring the simplified data from the decompression result.
What needs to be explained here is: the data processing device provided in the foregoing embodiments may implement the technical solutions described in the foregoing method embodiments, and the specific implementation principles of the foregoing modules or units may refer to corresponding contents in the foregoing method embodiments, which are not repeated herein.
Fig. 12 is a schematic structural diagram of a data processing apparatus according to another embodiment of the present application. As shown in fig. 12, the data processing apparatus includes: the splitting module 31 and the dictionary creating module 32. Wherein, the splitting module 31 is configured to split data elements of the plurality of data; the dictionary creating module 32 is configured to configure simplified characters with the split data elements satisfying a preset condition, so as to construct word entries containing associated data elements and simplified characters; based on the obtained entry, the dictionary capable of simplifying the data to be transmitted is obtained.
In the technical scheme provided by the embodiment, splitting data elements of a plurality of data, and then creating a dictionary based on the split data elements; the dictionary provides a simplifying basis for simplifying data, is beneficial to reducing the data size of the data to be transmitted, and further can shorten the time consumed by data transmission.
Further, the dictionary creation module 32 is further configured to: counting the number of the same data elements; the number of data elements greater than a threshold satisfies the preset condition. Or the dictionary creation module 32 is further configured to: counting the number of the same data elements; calculating the occurrence frequency of each data element based on the counted number of each data element; the data elements with the occurrence frequency larger than the first threshold value meet the preset condition.
Further, the dictionary creation module 32 is further configured to: the data elements with the character length larger than the second threshold value meet the preset condition.
Further, the data processing apparatus provided in this embodiment may further include:
the receiving module is used for receiving setting information sent by a user through a client, wherein the setting information contains user-defined word items;
And the adding module is used for storing the user-defined word entries into the dictionary.
What needs to be explained here is: the data processing device provided in the foregoing embodiments may implement the technical solutions described in the foregoing method embodiments, and the specific implementation principles of the foregoing modules or units may refer to corresponding contents in the foregoing method embodiments, which are not repeated herein.
A further embodiment of the present application provides a data processing apparatus. The structure of the data processing apparatus provided in this embodiment is similar to that shown in fig. 10 described above. Specifically, the data processing device includes: the device comprises an acquisition module, a simplification module and a sending module. The acquisition module is used for acquiring source data, wherein the source data comprises data elements. The simplification module is used for simplifying at least one data element in the source data based on the bandwidth of the communication link between the source data and the receiver so as to obtain simplified data. The sending module is used for sending the simplified data to a receiving party so that the receiving party can carry out inverse processing on the simplified data to recover the source data.
In the technical solution provided in this embodiment, based on the bandwidth of the communication link with the receiving party, simplification processing is performed on at least one data element in the source data to obtain simplified data; the data and bandwidth adaptation is simplified, the time consumed by data transmission is ensured to be within a short time, and the data recovery processing capacity of a receiving party can be relatively reduced.
Further, the simplification module is further configured to: determining the simplification degree according to the bandwidth of the communication link between the receiver and the data size of the source data; and performing simplification processing on at least one data element in the source data according to a simplification scheme adapted to the degree of simplification so as to obtain simplified data.
Further, the data processing apparatus provided in this embodiment further includes: the determining module is used for:
Taking data elements belonging to high-frequency elements in the source data as objects to be simplified; and/or
And taking the data elements with the character length larger than a second threshold value in the source data as objects to be simplified.
Further, the data processing apparatus provided in this embodiment may further include:
The receiving module is used for receiving simplified configuration information sent by a user through a client, wherein the simplified configuration information contains simplified elements which are configured by the user for a data element in a self-defining way;
The simplification module is further configured to replace a data element specified by the simplified configuration information in the source data with a simplified element configured by user definition.
What needs to be explained here is: the data processing device provided in the foregoing embodiments may implement the technical solutions described in the foregoing method embodiments, and the specific implementation principles of the foregoing modules or units may refer to corresponding contents in the foregoing method embodiments, which are not repeated herein.
Fig. 13 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. As shown in fig. 13, the data processing apparatus includes: a receiving module 41, an identifying module 42 and a recovering module 43. Wherein, the receiving module 41 is configured to receive the simplified data sent by the sender. The recognition module 42 is configured to recognize simplified characters to be recovered in the simplified data. The restoring module 43 is configured to restore the identified simplified character to a corresponding data element by using an inverse rule corresponding to the element simplification rule, so as to obtain source data.
In the technical scheme provided by the embodiment, because the sender sends the simplified data which is simplified by using the element simplification rule, after receiving the simplified data, the simplified data can be recovered by using the inverse rule corresponding to the element simplification rule; the element simplification rule provides a simplification basis for simplifying data, is beneficial to reducing the data size of the data to be transmitted, and further can shorten the time consumed by data transmission.
Further, the recovery module 43 is further configured to:
When the element simplification rule is a simplified coding model and the inverse rule is a simplified decoding model corresponding to the simplified coding model, taking the simplified character as input of the simplified decoding model, and executing the simplified decoding model to obtain corresponding data elements;
And under the condition that the element simplification rule and the inverse rule are both mapping rules, acquiring the data elements with mapping relation with the simplified characters by utilizing the mapping rules.
What needs to be explained here is: the data processing device provided in the foregoing embodiments may implement the technical solutions described in the foregoing method embodiments, and the specific implementation principles of the foregoing modules or units may refer to corresponding contents in the foregoing method embodiments, which are not repeated herein.
Fig. 14 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. As shown in fig. 14, the data processing apparatus includes: an acquisition module 61, a determination module 62, a simplification module 63 and a transmission module 64. Wherein the obtaining module 61 is configured to obtain source data, where the source data includes at least one data element; the determining module 62 is configured to determine a target data element to be simplified in the source data; the simplifying module 63 is configured to perform a simplifying process on the target data element in the source data to obtain simplified data; the sending module 64 is configured to send the reduced data to a receiving party, where the receiving party performs inverse processing on the reduced data to recover the source data.
Further, the determining module 62 is further configured to:
taking the data elements of the high-frequency elements in the source data as target data elements to be simplified; and/or
Taking the data elements with the character length larger than a second threshold value in the source data as target data elements to be simplified; and/or
And taking the data elements appearing in the dictionary in the source data as target data elements needing to be simplified.
What needs to be explained here is: the data processing device provided in the foregoing embodiments may implement the technical solutions described in the foregoing method embodiments, and the specific implementation principles of the foregoing modules or units may refer to corresponding contents in the foregoing method embodiments, which are not repeated herein.
Fig. 15 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 15, the electronic device includes: a memory 51, a processor 52, and a communication component 53; wherein,
The memory 51 is used for storing a program;
the processor 52 is coupled to the memory 51 for executing the program stored in the memory 51 for:
acquiring a dictionary, wherein the dictionary contains at least one word entry, and the word entry comprises associated data elements and simplified characters;
Acquiring source data, wherein the source data comprises at least one data element;
Replacing the data elements of the hit entry in the source data with simplified characters in the hit entry by using the dictionary to obtain simplified data;
The reduced data is sent to a recipient via the communication component 53 so that the recipient recovers the source data from the dictionary.
The memory 51 may be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on an electronic device. The memory 51 may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The processor 52 may realize other functions in addition to the above functions when executing the program in the memory 51, and the above description of the embodiments can be specifically referred to.
Further, as shown in fig. 15, the electronic device further includes: a display 54, a power supply component 55, an audio component 56, and other components. Only some of the components are schematically shown in fig. 15, which does not mean that the electronic device only comprises the components shown in fig. 15.
Another embodiment of the application provides an electronic device. The structure of the electronic device provided in this embodiment is similar to that of the electronic device described above, and may be shown in fig. 15. The electronic device includes: a memory and a processor, wherein,
The memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory for:
Splitting a plurality of data elements;
Configuring simplified characters for the split data elements meeting preset conditions to construct word entries containing associated data elements and the simplified characters;
Based on the obtained entry, a dictionary that can simplify the data to be transmitted is obtained.
Wherein the processor, when executing the program in the memory, may perform other functions in addition to the above functions, see in particular the description of the embodiments above.
Yet another embodiment of the present application provides an electronic device. The structure of the electronic device is similar to the electronic device embodiment described above, and can be seen in fig. 15 described above. The electronic device includes: a memory, a processor, and a communication component; wherein,
The memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory for:
acquiring source data, wherein the source data comprises data elements;
based on the bandwidth of the communication link with the receiver, simplifying at least one data element in the source data to obtain simplified data;
And sending the simplified data to a receiver through the communication component so that the receiver can carry out inverse processing on the simplified data to recover the source data.
Further, the processor may realize other functions in addition to the above functions when executing the program in the memory, and the foregoing description of the embodiments may be referred to specifically.
The application further provides electronic equipment. The structure of the electronic device is similar to the electronic device embodiment described above, and can be seen in fig. 15 described above. The electronic device includes: a memory, a processor, and a communication component, wherein,
The memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory for:
acquiring source data, wherein the source data comprises at least one data element;
determining target data elements to be simplified in the source data;
simplifying the target data elements in the source data to obtain simplified data;
And sending the simplified data to a receiver through the communication component, and carrying out inverse processing on the simplified data by the receiver so as to recover the source data.
Further, the processor may realize other functions in addition to the above functions when executing the program in the memory, and the foregoing description of the embodiments may be referred to specifically.
Accordingly, the embodiments of the present application also provide a computer-readable storage medium storing a computer program capable of implementing the steps or functions of the data processing method provided in the above embodiments when the computer program is executed by a computer.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application 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 scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (22)
1. A method of data processing, comprising:
acquiring a dictionary, wherein the dictionary contains at least one word entry, and the word entry comprises associated data elements and simplified characters;
Acquiring source data, wherein the source data comprises at least one data element;
Replacing the data elements of the hit entry in the source data with simplified characters in the hit entry by using the dictionary to obtain simplified data;
sending the simplified data to a receiver so that the receiver recovers the source data according to the dictionary;
Wherein, the dictionary acquisition includes: calculating the transmission time length required for transmitting the source data when the simplification processing is carried out according to the bandwidth of the communication link between the receiving party and the data size of the source data; calculating a simplification amount required for controlling the transmission time length within a set time length under the bandwidth condition of the current communication link, wherein the simplification amount is taken as a simplification degree; and acquiring a dictionary adapted to the degree of simplification.
2. The method of claim 1, wherein transmitting the reduced data to a recipient comprises:
Under the condition that the dictionary is not stored by the receiver, compressing the dictionary and the simplified data to obtain a compressed packet;
And sending the compressed packet to the receiver.
3. The method according to claim 1 or 2, further comprising:
acquiring a plurality of data which need to be fed back for responding to the request of at least one receiver;
creating the dictionary from the plurality of data.
4. A method according to claim 3, wherein creating the dictionary from the plurality of data comprises:
Splitting the data elements of the plurality of data;
Counting the number of the same data elements;
Configuring simplified characters for data elements with statistical results meeting preset conditions to construct word entries containing associated data elements and the simplified characters;
and obtaining the dictionary based on the obtained entry.
5. The method as recited in claim 4, further comprising:
In the process of responding to the request of the receiver, monitoring whether a new data element meeting the condition of constructing the word entry exists or not;
under the condition that the existence of the newly added data element is detected, configuring simplified characters for the newly added data element to construct a newly added word entry;
and adding the newly added word entries into the dictionary to obtain a new dictionary.
6. A method according to claim 1 or 2, wherein the source data is structured data comprising key-value pairs; the data element is a key or value in a key value.
7. The method according to claim 1 or 2, further comprising:
receiving simplified configuration information sent by a user through a client, wherein the simplified configuration information contains simplified elements which are configured by the user for a data element in a self-defining way;
and replacing the data elements appointed by the simplified configuration information in the source data with the simplified elements configured by user definition.
8. A method of data processing, comprising:
Splitting a plurality of data elements;
Configuring simplified characters for the split data elements meeting preset conditions to construct word entries containing associated data elements and the simplified characters;
Based on the obtained entry, obtaining a dictionary capable of simplifying data to be transmitted;
The dictionary has an adaptive simplification degree, and the simplification degree matched with the dictionary is determined in a manner that: according to the bandwidth of the communication link between the receiver and the source data and the data size of the source data, calculating the transmission time length required for transmitting the source data when the simplification processing is carried out; and calculating the simplification amount required for controlling the transmission time length in the set time length under the bandwidth condition of the current communication link, and taking the simplification amount as the simplification degree.
9. The method as recited in claim 8, further comprising:
Counting the number of the same data elements;
calculating the occurrence frequency of each data element based on the counted number of each data element;
the data elements with the occurrence frequency larger than the first threshold value meet the preset condition.
10. The method as recited in claim 8, further comprising:
The data elements with the character length larger than the second threshold value meet the preset condition.
11. The method according to any one of claims 8 to 10, further comprising:
Receiving setting information sent by a user through a client, wherein the setting information contains user-defined word items;
and storing the user-defined entries into the dictionary.
12. A data processing system, comprising:
A sender for obtaining a dictionary containing at least one word entry, the word entry comprising associated data elements and simplified characters; acquiring source data, wherein the source data comprises at least one data element; replacing the data elements of the hit entry in the source data with simplified characters in the hit entry by using the dictionary to obtain simplified data; transmitting the reduced data to a receiving party; wherein, the dictionary acquisition includes: calculating the transmission time length required for transmitting the source data when the simplification processing is carried out according to the bandwidth of the communication link between the receiving party and the data size of the source data; calculating a simplification amount required for controlling the transmission time length within a set time length under the bandwidth condition of the current communication link, wherein the simplification amount is taken as a simplification degree; acquiring a dictionary adapted to the degree of simplification;
a receiving side, configured to receive reduced data sent by the sending side, where the reduced data contains reduced characters to be recovered; and replacing the simplified characters hitting the entry in the simplified data with the data elements in the hit entry by using the dictionary so as to recover the source data.
13. The system of claim 12, further comprising:
the server is used for splitting the data elements of the plurality of data; configuring simplified characters for the split data elements meeting preset conditions to construct word entries containing associated data elements and the simplified characters; based on the obtained entry, a dictionary that can simplify the data to be transmitted is obtained.
14. A method of data processing, comprising:
acquiring source data, wherein the source data comprises data elements;
according to the bandwidth of the communication link between the receiver and the source data and the data size of the source data, calculating the transmission time length required for transmitting the source data when the simplification processing is carried out; calculating a simplification amount required for controlling the transmission time length within a set time length under the bandwidth condition of the current communication link, wherein the simplification amount is taken as a simplification degree;
According to a simplification scheme adapted to the degree of simplification, performing simplification processing on at least one data element in the source data to obtain simplified data;
And sending the simplified data to a receiving party so that the receiving party can carry out inverse processing on the simplified data to recover the source data.
15. The method of claim 14, further comprising at least one of the steps of:
Taking data elements belonging to high-frequency elements in the source data as objects to be simplified; and/or
And taking the data elements with the character length larger than a second threshold value in the source data as objects to be simplified.
16. The method as recited in claim 14, further comprising:
receiving simplified configuration information sent by a user through a client, wherein the simplified configuration information contains simplified elements which are configured by the user for a data element in a self-defining way;
and replacing the data elements appointed by the simplified configuration information in the source data with the simplified elements configured by user definition.
17. A method of data processing, comprising:
acquiring source data, wherein the source data comprises at least one data element;
determining target data elements to be simplified in the source data;
Simplifying target data elements in the source data by utilizing a dictionary to obtain simplified data; the dictionary obtaining mode comprises the following steps: calculating the transmission time length required for transmitting the source data when the simplification processing is carried out according to the bandwidth of the communication link between the receiving party and the data size of the source data; calculating a simplification amount required for controlling the transmission time length within a set time length under the bandwidth condition of the current communication link, wherein the simplification amount is taken as a simplification degree; acquiring a dictionary adapted to the degree of simplification;
And sending the simplified data to a receiver, and carrying out inverse processing on the simplified data by the receiver to recover the source data.
18. The method of claim 17, wherein determining the target data element in the source data to be reduced comprises:
taking the data elements of the high-frequency elements in the source data as target data elements to be simplified; and/or
Taking the data elements with the character length larger than a second threshold value in the source data as target data elements to be simplified; and/or
And taking the data elements appearing in the dictionary in the source data as target data elements needing to be simplified.
19. An electronic device, comprising: a memory, a processor, and a communication component; wherein,
The memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory for:
Acquiring a dictionary, wherein the dictionary contains at least one word entry, and the word entry comprises associated data elements and simplified characters; wherein, the dictionary acquisition includes: according to the bandwidth of the communication link between the receiver and the source data and the data size of the source data, calculating the transmission time length required for transmitting the source data when the simplification processing is carried out; calculating a simplification amount required for controlling the transmission time length within a set time length under the bandwidth condition of the current communication link, wherein the simplification amount is taken as a simplification degree; acquiring a dictionary adapted to the degree of simplification;
Acquiring source data, wherein the source data comprises at least one data element;
Replacing the data elements of the hit entry in the source data with simplified characters in the hit entry by using the dictionary to obtain simplified data;
And sending the simplified data to a receiver through the communication component so that the receiver recovers the source data according to the dictionary.
20. An electronic device, comprising: a memory and a processor, wherein,
The memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory for:
Splitting a plurality of data elements;
Configuring simplified characters for the split data elements meeting preset conditions to construct word entries containing associated data elements and the simplified characters;
based on the obtained entry, a dictionary capable of simplifying data to be transmitted is obtained, wherein the dictionary has an adaptive simplification degree, and the simplification degree adaptive to the dictionary is determined in the following manner: according to the bandwidth of the communication link between the receiver and the source data and the data size of the source data, calculating the transmission time length required for transmitting the source data when the simplification processing is carried out; and calculating the simplification amount required for controlling the transmission time length in the set time length under the bandwidth condition of the current communication link, and taking the simplification amount as the simplification degree.
21. An electronic device, comprising: a memory, a processor, and a communication component; wherein,
The memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory for:
acquiring source data, wherein the source data comprises data elements;
according to the bandwidth of the communication link between the receiver and the source data and the data size of the source data, calculating the transmission time length required for transmitting the source data when the simplification processing is carried out; calculating a simplification amount required for controlling the transmission time length within a set time length under the bandwidth condition of the current communication link, wherein the simplification amount is taken as a simplification degree;
According to a simplification scheme adapted to the degree of simplification, performing simplification processing on at least one data element in the source data to obtain simplified data;
And sending the simplified data to a receiver through the communication component so that the receiver can carry out inverse processing on the simplified data to recover the source data.
22. An electronic device, comprising: a memory, a processor, and a communication component; wherein,
The memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory for:
acquiring source data, wherein the source data comprises at least one data element;
determining target data elements to be simplified in the source data;
Simplifying target data elements in the source data by utilizing a dictionary to obtain simplified data; the dictionary obtaining mode comprises the following steps: calculating the transmission time length required for transmitting the source data when the simplification processing is carried out according to the bandwidth of the communication link between the receiving party and the data size of the source data; calculating a simplification amount required for controlling the transmission time length within a set time length under the bandwidth condition of the current communication link, wherein the simplification amount is taken as a simplification degree; acquiring a dictionary adapted to the degree of simplification;
And sending the simplified data to a receiver through the communication component, and carrying out inverse processing on the simplified data by the receiver so as to recover the source data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911013698.XA CN112699660B (en) | 2019-10-23 | 2019-10-23 | Data processing method, system and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911013698.XA CN112699660B (en) | 2019-10-23 | 2019-10-23 | Data processing method, system and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112699660A CN112699660A (en) | 2021-04-23 |
CN112699660B true CN112699660B (en) | 2024-08-06 |
Family
ID=75505202
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911013698.XA Active CN112699660B (en) | 2019-10-23 | 2019-10-23 | Data processing method, system and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112699660B (en) |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3566441B2 (en) * | 1996-01-30 | 2004-09-15 | シャープ株式会社 | Dictionary creation device for text compression |
US6100824A (en) * | 1998-04-06 | 2000-08-08 | National Dispatch Center, Inc. | System and method for data compression |
US6757647B1 (en) * | 1998-07-30 | 2004-06-29 | International Business Machines Corporation | Method for encoding regular expressions in a lexigon |
EP1228453A4 (en) * | 1999-10-22 | 2007-12-19 | Activesky Inc | An object oriented video system |
CN100334837C (en) * | 2003-12-24 | 2007-08-29 | 华为技术有限公司 | A method for assigning path bandwidth in bearing control layer |
CN103891150B (en) * | 2011-10-01 | 2017-02-15 | 英特尔公司 | System, method and equipment for dictionary compression |
CN105893337B (en) * | 2015-01-04 | 2020-07-10 | 伊姆西Ip控股有限责任公司 | Method and apparatus for text compression and decompression |
CN107704102B (en) * | 2017-10-09 | 2021-08-03 | 北京新美互通科技有限公司 | Text input method and device |
-
2019
- 2019-10-23 CN CN201911013698.XA patent/CN112699660B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN112699660A (en) | 2021-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101009516B (en) | A method, system and device for data synchronization | |
CN108696492B (en) | Method and device for processing IP message | |
CN103379140A (en) | Log processing rule synchronization method and relative device and system | |
CN114666212B (en) | Configuration data issuing method | |
CN111262876A (en) | Data processing method, device and equipment based on block chain and storage medium | |
US9633035B2 (en) | Storage system and methods for time continuum data retrieval | |
CN115408350A (en) | Log compression method, log recovery method, log compression device, log recovery device, computer equipment and storage medium | |
US12118129B2 (en) | Method, system, electronic device, and storage medium for storing and collecting temperature data | |
CN103079194B (en) | Service adaptation method, apparatus and system | |
CN109274720B (en) | Method and system for transmitting data | |
CN112699660B (en) | Data processing method, system and equipment | |
CN108460044B (en) | Data processing method and device | |
Sari et al. | The implementation of timestamp, bitmap and rake algorithm on data compression and data transmission from iot to cloud | |
CN113220651A (en) | Operation data compression method and device, terminal equipment and storage medium | |
CN109510627B (en) | Integer coding method, device and storage medium | |
CN116846600A (en) | File transmission method, apparatus, computer device, storage medium, and program product | |
CN114025024B (en) | Data transmission method and device | |
CN113204683B (en) | Information reconstruction method and device, storage medium and electronic equipment | |
CN113094397B (en) | Data storage and query response method and block execution method | |
CN112835896B (en) | Real-time database data hotspot balancing method, device, equipment and medium | |
KR20180108505A (en) | Method for transforming data for low volume transmission of meta model base protocol, and data transmitting system for low volume transmission of meta model base protocol | |
CN110134547B (en) | Middleware-based repeated data deleting method and related device | |
CN116708589B (en) | Method, device, computer equipment and storage medium for compressing packet header | |
CN106878054A (en) | A kind of method and device for business processing | |
CN112422525A (en) | Fault data transmission method, device, equipment and storage 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |