CN110290099A - Data transmission method, communication equipment and the device with store function - Google Patents
Data transmission method, communication equipment and the device with store function Download PDFInfo
- Publication number
- CN110290099A CN110290099A CN201810226259.6A CN201810226259A CN110290099A CN 110290099 A CN110290099 A CN 110290099A CN 201810226259 A CN201810226259 A CN 201810226259A CN 110290099 A CN110290099 A CN 110290099A
- Authority
- CN
- China
- Prior art keywords
- data
- transmission
- transmission data
- compressed
- communication equipment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
- H04L49/9057—Arrangements for supporting packet reassembly or resequencing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/04—Protocols for data compression, e.g. ROHC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/06—Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/06—Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
- H04W28/065—Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information using assembly or disassembly of packets
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/30—Services specially adapted for particular environments, situations or purposes
- H04W4/38—Services specially adapted for particular environments, situations or purposes for collecting sensor information
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a kind of data transmission method, communication equipment and with the device of store function, which includes: that the first communication equipment judges whether the default characteristic information of data to be transmitted exceeds preset range;If default characteristic information exceeds preset range, data to be transmitted is compressed according to preset algorithm, obtains compressed transmission data;Whether the data length for judging compressed transmission data is more than preset range;If data length is more than preset range, compressed transmission data are split into at least two son transmission data, and the transmission data of sub- transmission data are successively sent to the second communication equipment;So that the second communication equipment is by sub- transmission Data Synthesis data to be transmitted.By the data transmission method, alternative compresses data, and the probability of channel congestion, improves efficiency of transmission when reducing data transmission.
Description
Technical field
The present invention relates to field of data transmission, more particularly to a kind of data transmission method, communication equipment and have storage
The device of function.
Background technique
(Supervisory Control And Data Acquisition, data acquisition control SCADA system with monitoring
System), it is widely used in traffic, the energy, circuit, the industries such as water process.SCADA system includes upper computer and lower computer.It is the next
The data of acquisition are sent to host computer by machine, that is, remote terminal control system, slave computer.Since slave computer is sent to host computer
Data are largely the values of register or sensor, and data volume is larger, and the efficiency of data transmission is slower.
Summary of the invention
The invention mainly solves the technical problem of providing a kind of data transmission method, communication equipment and there is store function
Device, selectivity data are compressed, reduce data transmission when channel congestion probability, improve efficiency of transmission.
In order to solve the above technical problems, first aspect present invention provides a kind of data transmission method, the transmission side data
Method includes: that the first communication equipment judges whether the default characteristic information of data to be transmitted exceeds preset range;If described default
Characteristic information exceeds preset range, compresses to the data to be transmitted according to preset algorithm, obtains compressed transmission number
According to;Whether the data length for judging the compressed transmission data is more than preset range;If the data length is more than institute
Preset range is stated, the compressed transmission data are split into at least two son transmission data, and by the sub- transmission data
Transmission data be successively sent to the second communication equipment;So that second communication equipment will be described in the sub- transmission Data Synthesis
Data to be transmitted.
With reference to first aspect, in the first possible embodiment of first aspect, first communication equipment judges institute
Whether the repetitive rate for stating data information included by data to be transmitted exceeds preset value;If included by the data to be transmitted
The repetitive rate of data information exceeds the preset value, compresses, is compressed according to preset algorithm to the data to be transmitted
Transmission data afterwards.
With reference to first aspect, in second of possible embodiment of first aspect, first communication equipment judges institute
Whether the data length for stating data to be transmitted is more than the preset length;If the data length is more than the preset range,
The data to be transmitted is compressed according to preset algorithm, obtains compressed transmission data.
With reference to first aspect or in second of possible embodiment of first aspect, the third in first aspect may be real
It applies in mode, the preset length is 255 bytes.
With reference to first aspect, the first of first aspect is into second of possible embodiment, the 4th of first aspect the
In kind possible embodiment, if the default characteristic information exceeds preset range, by zlib algorithm to the number to be transmitted
According to being compressed.
With reference to first aspect, in the 5th kind of possible embodiment of first aspect, if the data length is more than institute
Preset range is stated, the compressed transmission data are split, obtains at least two son transmission data;Respectively to the son
It transmits data and adds data frame header information, wherein the number of the sub- transmission data after adding the data frame header information
According to of length no more than preset range;The sub- transmission data after the data frame header information will be added sequentially successively to send out
It send to second communication equipment.
The 5th kind of possible embodiment with reference to first aspect, described in the 6th kind of possible embodiment of first aspect
Data frame header information includes that the number information, the number of the sub- transmission data, compression of the compressed transmission data are special
The data length of reference breath and the sub- transmission data.
In order to solve the above technical problems, second aspect of the present invention provides a kind of data transmission method, the transmission side data
Method includes: that the second communication equipment receives at least two son transmission data that the first communication equipment is sent;Wherein, the sub- transmission
Data are that first communication equipment is split to obtain after the data length for detecting data to be transmitted is more than preset range
's;At least two son transmission data are synthesized, transmission data are obtained;And judge whether the transmission data are default
Characteristic information exceeds preset range, and according to the compressed data of preset algorithm;If the transmission data are compressed number
According to being decompressed to the transmission data according to the inverse operation of the preset algorithm.
In conjunction with second aspect, in the first possible embodiment of second aspect, the number of the sub- transmission data is obtained
According to frame header information, number information, the sub- transmission data of the transmission data are obtained from the data frame header information
Number, compressive features information and the sub- transmission data data length;According to the data frame header information to described
At least two son transmission data are synthesized, and transmission data are obtained;And judge whether the transmission data are default characteristic information
Beyond preset range, and according to the compressed data of preset algorithm.
In order to solve the above technical problems, third aspect present invention provides a kind of communication equipment, the communication equipment includes depositing
Reservoir, processor and computer program that is being stored on the memory and can running on the processor, the place
The first of realization first aspect or first aspect to the data of the 6th kind of possible embodiment when device executes described program are managed to pass
Step in transmission method.
In order to solve the above technical problems, it includes storage that fourth aspect present invention, which provides communication equipment described in a kind of communication equipment,
Device, processor and computer program that is being stored on the memory and can running on the processor, the processing
Device realizes the step of data transmission in the method for the first possible embodiment of second aspect or second aspect when executing described program
Suddenly.
In order to solve the above technical problems, fifth aspect present invention provides a kind of device with store function, store thereon
Have a program data, described program data can be performed realize first aspect or first aspect the first to the 6th kind may be real
Apply the step in the method for the first possible embodiment of mode or second aspect or second aspect.
The beneficial effects of the present invention are: being different from the prior art, the first communication equipment judges the default spy of data to be transmitted
Whether reference breath exceeds preset range;If default characteristic information exceeds preset range, to data to be transmitted according to preset algorithm
It is compressed, obtains compressed transmission data;Whether the data length for judging compressed transmission data is more than preset range;
If data length is more than preset range, compressed transmission data are split into at least two sons and transmit data, and by sub- biography
The transmission data of transmission of data are successively sent to the second communication equipment;So that the second communication equipment is then to be passed by sub- transmission Data Synthesis
Transmission of data.
The compressed transmission data of the present invention occupy little space, and information content is more than uncompressed, also, according to be transmitted
The feature dynamic select of data whether compressed data, fractionation transmission can also be carried out to compressed data with dynamic select, reduce
The probability of channel congestion, improves efficiency of transmission when data transmission.
Detailed description of the invention
Fig. 1 is the structural schematic diagram that data transmission system of the present invention unifies embodiment;
Fig. 2 is the flow diagram of one embodiment of data transmission method of the present invention;
Fig. 3 is the flow diagram of another embodiment of data transmission method of the present invention;
Fig. 4 is the structural schematic diagram of one embodiment of communication equipment of the present invention;
Fig. 5 is the structural schematic diagram of another embodiment of communication equipment of the present invention;
Fig. 6 present invention has the structural schematic diagram of one embodiment of device of store function.
Specific embodiment
The present invention provides a kind of data transmission method, communication equipment and the device with store function, of the invention to make
Purpose, technical solution and technical effect definitely, it is clear, the present invention is described in more detail below, it should be understood that herein
Described specific implementation regulations for explaining only the invention, are not intended to limit the present invention.
The data transmission method of present embodiment includes: the default characteristic information that the first communication equipment judges data to be transmitted
Whether preset range is exceeded;If default characteristic information exceeds preset range, data to be transmitted is pressed according to preset algorithm
Contracting, obtains compressed transmission data;Whether the data length for judging compressed transmission data is more than preset range;If number
It is more than preset range according to length, compressed transmission data is split into at least two sons and transmit data, and by sub- transmission data
Transmission data be successively sent to the second communication equipment;So that the second communication equipment is then by sub- transmission Data Synthesis number to be transmitted
According to.
In order to clearly illustrate the data transmission method in above embodiment, referring to Fig. 1, Fig. 1 is that data of the present invention pass
The structural schematic diagram of defeated one embodiment of system.
In the present embodiment, data transmission system includes slave computer 10, the first communication equipment 11, the second communication equipment 12
And host computer 13, wherein slave computer 10 and the first communication equipment 11 couple, and host computer 13 and the second communication equipment 12 couple,
First communication equipment 11 and the second communication equipment 12 couple.
Wherein, slave computer 10 is sent to the first communication equipment 11 for acquiring data, and by collected data, and first is logical
Letter equipment 11 sends the data to host computer 13 by the second communication equipment 12.Meanwhile host computer 13 can also lead to related data
It crosses the second communication equipment 12 and the first communication equipment 11 is sent to slave computer 10.That is, the data transmission system of present embodiment
It is two-way communication.Wherein, the first communication equipment 11 and the second communication equipment 12 may each be gateway or Data transmission radio, be used for transmission
Data.
In a specific application scenarios, data transmission system is SCADA system, wherein slave computer 10 is SCADA system
Remote terminal control system in system;Host computer 13 is the monitoring system in SCADA system.
In the present embodiment, slave computer 10 and at least one sensor couple, for acquiring data, and will be collected
Data are sent to the first communication equipment 11, and the first communication equipment 11 is sent to host computer 13 by the second communication equipment 12 again;On
Position machine 13 is used to receive the data information of slave computer 10, and sends control by the first communication equipment 11 and the second communication equipment 12
Instruction is given to slave computer 10.
In actual use, SCADA system is widely used in traffic, the energy, circuit, the industries such as water process, the first communication
Equipment 11 and the second communication equipment 12 pass through private network communication.Wherein private network communication is carried out data transmission using dedicated network, for example,
Satellite communication, railway system's private network, public security system private network and military private network etc..It is dedicated accordingly according to application scenarios corresponding selection
Network.
In private network communication, using TETRA (Trans European Trunked Radio, pan-European trunked radio) into
The transmission of row data.But TETRA short message maximum length is 255 bytes.If needing reserved 4 bytes to fill out with 4TL short message type
Write short message header information;If needing reserved 2 bytes to fill in short message header information with simple short message type, no matter so it adopts
Which kind of transmitted with short message type, the maximum length of short message does not all exceed 255 bytes, and the data information amount transmitted every time is smaller.
And the data of slave computer 10 and host computer 13 transmission of SCADA system are likely to more than 255 words in practical applications
Section, and slave computer 10 be sent to host computer 13 data be largely register or sensor value, have many phases in message
Same data.One side data volume is big, and on the other hand the range of data transmission is restricted every time, the efficiency for causing data to be transmitted
It is relatively slow.In order to solve foregoing problems, provide a kind of data transmission method, can by data to be transmitted according to preset algorithm into
It is being transmitted after row compression, efficiency of transmission can be improved.
For clear explanation data transmission method, referring to Fig. 2, Fig. 2 is one embodiment party of data transmission method of the present invention
The flow diagram of formula.In conjunction with Fig. 1, the data transmission method of present embodiment is from the angle of the first communication equipment 11
's.
201: the first communication equipments judge whether the default characteristic information of data to be transmitted exceeds preset range.
In the present embodiment, the first communication equipment judges whether the default characteristic information of data to be transmitted exceeds default model
It encloses.In one of them embodiment, the first communication equipment judges the repetitive rate of data information included by data to be transmitted
Whether exceed preset value, if exceeding preset value, data to be transmitted is compressed according to preset algorithm.Wherein, preset value
It can be specific value, for example, 30%, 40% or 50%;It may be numberical range, such as 20%~40%, do not do herein
It is specific to limit.
In another embodiment, the first communication equipment judges whether the data length of data to be transmitted is more than default length
Degree compresses data to be transmitted according to preset algorithm if exceeding preset length.Wherein, preset length with for
Specific value, for example, preset length is 255 bytes.
202: if default characteristic information exceeds preset range, data to be transmitted being compressed according to preset algorithm, is obtained
To compressed transmission data.
In the present embodiment, if default characteristic information exceeds preset range, to data to be transmitted according to preset algorithm
It is compressed, obtains compressed transmission data.Wherein, preset algorithm can be zlib algorithm, or other algorithms,
Here, being not specifically limited.
In one of them embodiment, if the repetitive rate of data information included by data to be transmitted is beyond default
Value, data to be transmitted is compressed according to preset algorithm, obtains compressed transmission data.
In another embodiment, if data length is more than preset range, to data to be transmitted according to preset algorithm
It is compressed, obtains compressed transmission data.
Optionally, if the repetitive rate of data information included by data to be transmitted exceeds preset value, and data length
Also above preset range, data to be transmitted is compressed according to preset algorithm, obtains compressed transmission data.
203: whether the data length for judging compressed transmission data is more than preset range.
In a specific embodiment, when the amount of data is large, compressed data may exceed preset length
Angle value.Therefore, the first communication equipment also judges whether the data length of compressed transmission data is more than preset range.Wherein,
Preset range is 255 bytes.
204: if data length is more than preset range, compressed transmission data being split into at least two son transmission numbers
According to, and the transmission data of sub- transmission data are successively sent to the second communication equipment;So that the second communication equipment is then by sub- transmission
Data Synthesis data to be transmitted.
In the present embodiment, if data length is more than preset range, compressed transmission data are split at least
Two son transmission data, and the transmission data of sub- transmission data are successively sent to the second communication equipment;So that the second communication is set
It is standby then by sub- transmission Data Synthesis data to be transmitted.
Specifically, if data length is more than preset range, compressed transmission data is split, obtain at least two
Height transmits data, and antithetical phrase transmission data add data frame header information respectively, wherein after addition data frame header information
The data length of son transmission data is no more than preset range;Sequentially successively by the son transmission data after addition data frame header information
It is sent to the second communication equipment.
Wherein, data frame header information includes number information, the number of sub- transmission data, the pressure of compressed transmission data
The data length of contracting characteristic information and son transmission data.
The effect of data frame header information is specifically described below.
The number information of compressed transmission data is split rear corresponding sequence for identifying compressed transmission data
Number, the son transmission data sequence number having the same in the compressed transmission data, i.e., number information having the same.At it
In an embodiment in, occupy the space of a byte, increase to 0xFF, then again since 0x00 from 0x00.
The number of son transmission data transmits the total number of data for identifying the son for including in compressed transmission data, with
And every height transmits the corresponding serial number of data.In one of them embodiment, the number of sub- transmission data occupies a word
The space of section, the total number of the high 4 son transmission data for indicating to include in compressed transmission data, low 4 indicate current son
Transmit the corresponding serial number of data.
Compressive features information for identify the sub- transmission data whether compressed packet, in one of them embodiment,
Compressive features information occupy a byte space, if data frame is uncompressed, the compressive features information be correspondingly arranged for
0xFF.If data frame has compressed, which is correspondingly arranged as 0x00.In other embodiments, it can also set
Other numerical value are set to, only need that whether the sub- transmission data can be distinguished by compressed.
The data length of son transmission data is used to identify the length of data frame in the sub- transmission data.
In a specific application scenarios, compressed transmission data are split as two son transmission data, need point
Piece is transmitted, and due to the two sub- transmission data number informations having the same, the second communication equipment is closed to data
At when, can be determined according to number information, different son transmission data be split by same compressed transmission data and
It obtains.If number information is identical, come from same compressed transmission data.
Second communication equipment determines successively putting in order for son transmission data further according to the number of sub- transmission data, meanwhile,
It can determine that the son after the corresponding compressed transmission data of the sub- transmission data are split is transmitted according to the number of sub- transmission data
The number of data transmits data to avoid certain height is omitted, and causes the information of synthesis is incomplete to happen.
It is decompressed finally, the second communication equipment determines the need for antithetical phrase transmission data according to compressive features information, with
Synthesize data to be transmitted.
It is different from the prior art, the first communication equipment of present embodiment judges that the default characteristic information of data to be transmitted is
It is no to exceed preset range;If default characteristic information exceeds preset range, data to be transmitted is compressed according to preset algorithm,
Obtain compressed transmission data;Whether the data length for judging compressed transmission data is more than preset range;If data
Length is more than preset range, and compressed transmission data are split at least two sons and transmit data, and by sub- transmission data
Transmission data are successively sent to the second communication equipment;So that the second communication equipment is then by sub- transmission Data Synthesis data to be transmitted.
The compressed transmission data of present embodiment occupy little space, and information content is more than uncompressed, also, according to
Transmit data feature dynamic select whether compressed data, fractionation transmission can also be carried out to compressed data with dynamic select,
The probability of channel congestion, improves efficiency of transmission when reducing data transmission.
Referring to Fig. 3, Fig. 3 is the flow diagram of another embodiment of data transmission method of the present invention.In conjunction with Fig. 1, originally
The data transmission method of embodiment is the angle from the second communication equipment 12.
301: the second communication equipments receive at least two son transmission data that the first communication equipment is sent;Wherein, sub- transmission
Data are that the first communication equipment is split after the data length for detecting data to be transmitted is more than preset range.
In the present embodiment, the second communication equipment receives at least two son transmission numbers that the first communication equipment is sent
According to;Wherein, sub- transmission data are that the first communication equipment is laggard more than preset range in the data length for detecting data to be transmitted
Row fractionation obtains.
Wherein, every height transmission data include the transmission number information of data, the number of sub- transmission data, compressive features letter
The data length of breath and son transmission data.
302: at least two son transmission data being synthesized, transmission data are obtained;And judge to transmit whether data are pre-
If characteristic information exceeds preset range, and according to the compressed data of preset algorithm.
In the present embodiment, the second communication equipment synthesizes at least two son transmission data, obtains transmission data;
And judge to transmit whether data are default characteristic information beyond preset range, and according to the compressed data of preset algorithm.
Specifically, the data frame header information for obtaining son transmission data obtains transmission data from data frame header information
Number information, the number of sub- transmission data, compressive features information and son transmission data data length.
At least two son transmission data are synthesized according to data frame header information, and judge to transmit whether data are pre-
If characteristic information exceeds preset range, and according to the compressed data of preset algorithm.Wherein, preset algorithm is zlib algorithm.
303: if transmission data are compressed data, transmission data being solved according to the inverse operation of preset algorithm
Pressure.
In the present embodiment, if data information is compressed data, to transmission data according to the inverse of preset algorithm
Operation is decompressed.
Specific decompression procedure is as follows:
In a specific application scenarios, the second communication equipment determines different according to the number information judgement of transmission data
Son transmission data whether be split as same compressed data to be transmitted obtained from.If number information is identical, come
From same compressed data to be transmitted.
Second communication equipment determines successively putting in order for son transmission data further according to the number of sub- transmission data, meanwhile,
It can determine that the son after the corresponding compressed transmission data of the sub- transmission data are split is transmitted according to the number of sub- transmission data
The number of data transmits data to avoid certain height is omitted, and causes the information of synthesis is incomplete to happen.
It is decompressed finally, the second communication equipment determines the need for antithetical phrase transmission data according to compressive features information, with
Synthesize data to be transmitted.
It is different from the prior art, the first communication equipment of present embodiment judges that the default characteristic information of data to be transmitted is
It is no to exceed preset range;If default characteristic information exceeds preset range, data to be transmitted is compressed according to preset algorithm,
Obtain compressed transmission data;Whether the data length for judging compressed transmission data is more than preset range;If data
Length is more than preset range, and compressed transmission data are split at least two sons and transmit data, and by sub- transmission data
Transmission data are successively sent to the second communication equipment;So that the second communication equipment is by sub- transmission Data Synthesis data to be transmitted.
The compressed transmission data of present embodiment occupy little space, and information content is more than uncompressed, also, according to
Transmit data feature dynamic select whether compressed data, fractionation transmission can also be carried out to compressed data with dynamic select,
The probability of channel congestion, improves efficiency of transmission when reducing data transmission.
It is the structural schematic diagram of one embodiment of communication equipment of the present invention refering to Fig. 4, Fig. 4.In the present embodiment, it communicates
Equipment 40 includes processor 401 and memory 402.Wherein, processor 401 and memory 402 couple.
Computer program is stored on memory 402, processor 401 executes the computer program and realizes following any implementations
The data transmission method of mode.
In the present embodiment, processor 401 judges whether the default characteristic information of data to be transmitted exceeds preset range.
In one of them embodiment, processor 401 judges whether the repetitive rate of data information included by data to be transmitted surpasses
Preset value out compresses data to be transmitted according to preset algorithm if exceeding preset value.Wherein, preset value can be
Specific value, for example, 30%, 40% or 50%;It may be numberical range, such as 20%~40%, do not do specific limit herein
It is fixed.
In another embodiment, processor 401 judges whether the data length of data to be transmitted is more than preset length,
If exceeding preset length, data to be transmitted is compressed according to preset algorithm.Wherein, preset length is to be specific
Numerical value, for example, preset length is 255 bytes.
In the present embodiment, if default characteristic information exceeds preset range, to data to be transmitted according to preset algorithm
It is compressed, obtains compressed transmission data.Wherein, preset algorithm can be zlib algorithm, or other algorithms,
Here, being not specifically limited.
In one of them embodiment, if the repetitive rate of data information included by data to be transmitted is beyond default
Value, data to be transmitted is compressed according to preset algorithm, obtains compressed transmission data.
In another embodiment, if data length is more than preset range, to data to be transmitted according to preset algorithm
It is compressed, obtains compressed transmission data.
Optionally, if the repetitive rate of data information included by data to be transmitted exceeds preset value, and data length
Also above preset range, data to be transmitted is compressed according to preset algorithm, obtains compressed transmission data.
In a specific embodiment, when the amount of data is large, compressed data may exceed preset length
Angle value.Therefore, processor 401 also judges whether the data length of compressed transmission data is more than preset range.Wherein, it presets
Range be 255 bytes.
In the present embodiment, if data length is more than preset range, compressed transmission data are split into
At least two son transmission data, and the transmission data of sub- transmission data are successively sent to the second communication equipment;So that second is logical
Believe equipment then by sub- transmission Data Synthesis data to be transmitted.
Specifically, if data length is more than preset range, compressed transmission data is split, obtain at least two
Height transmits data, and antithetical phrase transmission data add data frame header information respectively, wherein after addition data frame header information
The data length of son transmission data is no more than preset range;Sequentially successively by the son transmission data after addition data frame header information
It is sent to the second communication equipment.
Wherein, data frame header information includes number information, the number of sub- transmission data, the pressure of compressed transmission data
The data length of contracting characteristic information and son transmission data.
The effect of data frame header information is specifically described below.
The number information of compressed transmission data is split rear corresponding sequence for identifying compressed transmission data
Number, the sub- transmission data sequence number having the same in the compressed transmission data, i.e., number information having the same.?
In one of embodiment, the space of a byte is occupied, is increased from 0x00 to 0xFF, then again since 0x00.
The number of son transmission data transmits the total number of data for identifying the son for including in compressed transmission data, with
And every height transmits the corresponding serial number of data.In one of them embodiment, the number of sub- transmission data occupies a word
The space of section, the total number of the high 4 son transmission data for indicating to include in compressed transmission data, low 4 indicate current son
Transmit the corresponding serial number of data.
Compressive features information for identify the sub- transmission data whether compressed packet, in one of them embodiment,
Compressive features information occupy a byte space, if data frame is uncompressed, the compressive features information be correspondingly arranged for
0xFF.If data frame has compressed, which is correspondingly arranged as 0x00.In other embodiments, it can also set
Other numerical value are set to, only need that whether the sub- transmission data can be distinguished by compressed.
The data length of son transmission data is used to identify the length of data frame in the sub- transmission data.
In a specific application scenarios, compressed transmission data are split as two son transmission data, need point
Piece is transmitted, and due to the two sub- transmission data number informations having the same, the second communication equipment is closed to data
At when, can be judged to determine whether different son transmission data are split by same compressed transmission data according to number information
Obtained from point.If number information is identical, come from same compressed transmission data.
Second communication equipment determines successively putting in order for son transmission data further according to the number of sub- transmission data, meanwhile,
It can determine that the son after the corresponding compressed transmission data of the sub- transmission data are split is transmitted according to the number of sub- transmission data
The number of data transmits data to avoid certain height is omitted, and causes the information of synthesis is incomplete to happen.
It is decompressed finally, the second communication equipment determines the need for antithetical phrase transmission data according to compressive features information, with
Synthesize data to be transmitted.
It is different from the prior art, the first communication equipment of present embodiment judges that the default characteristic information of data to be transmitted is
It is no to exceed preset range;If default characteristic information exceeds preset range, data to be transmitted is compressed according to preset algorithm,
Obtain compressed transmission data;Whether the data length for judging compressed transmission data is more than preset range;If data
Length is more than preset range, and compressed transmission data are split at least two sons and transmit data, and by sub- transmission data
Transmission data are successively sent to the second communication equipment;So that the second communication equipment is then by sub- transmission Data Synthesis data to be transmitted.
The compressed transmission data of present embodiment occupy little space, and information content is more than uncompressed, also, according to
Transmit data feature dynamic select whether compressed data, fractionation transmission can also be carried out to compressed data with dynamic select,
The probability of channel congestion, improves efficiency of transmission when reducing data transmission.
It is the structural schematic diagram of another embodiment of communication equipment of the present invention refering to Fig. 5, Fig. 5.In the present embodiment, lead to
Believe that equipment 50 includes processor 501 and memory 502.Wherein, processor 501 and memory 502 couple.
Computer program is stored on memory 502, processor 501 executes the computer program and realizes following any implementations
The data transmission method of mode.
In the present embodiment, processor 501 receives at least two son transmission data that the first communication equipment is sent;Its
In, sub- transmission data are that the first communication equipment is split after the data length for detecting data to be transmitted is more than preset range
It obtains.
Wherein, every height transmission data include the transmission number information of data, the number of sub- transmission data, compressive features letter
The data length of breath and son transmission data.
In the present embodiment, processor 501 synthesizes at least two son transmission data, obtains transmission data;And
Judge to transmit whether data are default characteristic information beyond preset range, and according to the compressed data of preset algorithm.
Specifically, the data frame header information for obtaining son transmission data obtains transmission data from data frame header information
Number information, the number of sub- transmission data, compressive features information and son transmission data data length.
At least two son transmission data are synthesized according to data frame header information, and judge to transmit whether data are pre-
If characteristic information exceeds preset range, and according to the compressed data of preset algorithm.Wherein, preset algorithm is zlib algorithm.
In the present embodiment, if data information is compressed data, to transmission data according to the inverse of preset algorithm
Operation is decompressed.
Specific decompression procedure is as follows:
In a specific application scenarios, processor 501 is determined according to the number information of sub- transmission data, different sons
Transmitting data is obtained from being split as same compressed transmission data.If number information is identical, come from same pressure
Transmission data after contracting.
Processor 501 determines successively putting in order for son transmission data further according to the number of sub- transmission data, meanwhile, it can
The son transmission number after the corresponding compressed transmission data of the sub- transmission data are split is determined according to the number of sub- transmission data
According to number, transmit data to avoid certain height is omitted, and the information of synthesis is caused incomplete to happen.
It is decompressed finally, processor 501 determines the need for antithetical phrase transmission data according to compressive features information, with synthesis
Data to be transmitted.
It is different from the prior art, the first communication equipment of present embodiment judges that the default characteristic information of data to be transmitted is
It is no to exceed preset range;If default characteristic information exceeds preset range, data to be transmitted is compressed according to preset algorithm,
Obtain compressed transmission data;Whether the data length for judging compressed transmission data is more than preset range;If data
Length is more than preset range, and compressed transmission data are split at least two sons and transmit data, and by sub- transmission data
Transmission data are successively sent to the second communication equipment;So that the second communication equipment is by sub- transmission Data Synthesis data to be transmitted.
The compressed transmission data of present embodiment occupy little space, and information content is more than uncompressed, also, according to
Transmit data feature dynamic select whether compressed data, fractionation transmission can also be carried out to compressed data with dynamic select,
The probability of channel congestion, improves efficiency of transmission when reducing data transmission.
Refering to Fig. 6, Fig. 6 present invention has the structural schematic diagram of one embodiment of device of store function.
In the present embodiment, at least one program data 601 is stored in the device 60 with store function.Program number
According to 601 for executing the data transmission method in any of the above-described embodiment.
Wherein, it is either mobile hard to can be storage chip, hard disk in communication equipment for the device 60 with store function
The tool of other read-write storages such as disk or flash disk, CD, can also be server etc., is not specifically limited herein.
The aforementioned detailed description of data transmission method, it is no longer superfluous herein to talk.
It is different from the prior art, the first communication equipment of present embodiment judges that the default characteristic information of data to be transmitted is
It is no to exceed preset range;If default characteristic information exceeds preset range, data to be transmitted is compressed according to preset algorithm,
Obtain compressed transmission data;Whether the data length for judging compressed transmission data is more than preset range;If data
Length is more than preset range, and compressed transmission data are split at least two sons and transmit data, and by sub- transmission data
Transmission data are successively sent to the second communication equipment;So that the second communication equipment is by sub- transmission Data Synthesis data to be transmitted.
The compressed transmission data of present embodiment occupy little space, and information content is more than uncompressed, also, according to
Transmit data feature dynamic select whether compressed data, fractionation transmission can also be carried out to compressed data with dynamic select,
The probability of channel congestion, improves efficiency of transmission when reducing data transmission.
In several embodiments provided herein, it should be understood that disclosed method and apparatus can pass through it
Its mode is realized.Device embodiments described above are only schematical, for example, the division of module or unit, only
Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied
Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed
Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or logical of device or unit
Letter connection can be electrical property, mechanical or other forms.
Unit may or may not be physically separated as illustrated by the separation member, shown as a unit
Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks
On unit.It can select some or all of unit therein according to the actual needs to realize the mesh of present embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.If integrated unit with
The form of SFU software functional unit is realized and when sold or used as an independent product, can store computer-readable at one
In storage medium.
Based on this understanding, the technical solution of the application substantially in other words the part that contributes to existing technology or
The all or part of person's technical solution can be embodied in the form of software products, which is stored in one
In a storage medium, including some instructions are used so that computer equipment (it can be personal computer, server, or
Network equipment etc.) or processor (processor) execute each embodiment method of the application all or part of the steps.And it is preceding
The storage medium stated includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-OnlyMemory), random access memory
The various media that can store program code such as (RAM, Random Access Memory), magnetic or disk.
The above is only presently filed embodiments, are not intended to limit the scope of the patents of the application, all to utilize the application
Equivalent structure or equivalent flow shift made by specification and accompanying drawing content is applied directly or indirectly in other relevant technologies
Field similarly includes in the scope of patent protection of the application.
Claims (12)
1. a kind of data transmission method, which is characterized in that the data transmission method includes:
First communication equipment judges whether the default characteristic information of data to be transmitted exceeds preset range;
If the default characteristic information exceeds preset range, the data to be transmitted is compressed according to preset algorithm, is obtained
To compressed transmission data;
Whether the data length for judging the compressed transmission data is more than preset range;
If the data length is more than the preset range, the compressed transmission data are split into at least two sons and are passed
Transmission of data, and the transmission data of the sub- transmission data are successively sent to the second communication equipment;So that second communication is set
It is standby by data to be transmitted described in the sub- transmission Data Synthesis.
2. data transmission method according to claim 1, which is characterized in that first communication equipment judges number to be transmitted
According to default characteristic information whether exceed preset range the step of specifically include:
First communication equipment judges whether the repetitive rate of data information included by the data to be transmitted exceeds preset value;
If the default characteristic information exceeds preset range, the data to be transmitted is pressed according to preset algorithm
The step of contracting, obtaining compressed transmission data specifically includes:
If the repetitive rate of data information included by the data to be transmitted exceeds the preset value, to the data to be transmitted
It is compressed according to preset algorithm, obtains compressed transmission data.
3. data transmission method according to claim 1, which is characterized in that first communication equipment judges number to be transmitted
According to default characteristic information whether exceed preset range the step of specifically include:
First communication equipment judges whether the data length of the data to be transmitted is more than the preset length;
If the default characteristic information exceeds preset range, the data to be transmitted is pressed according to preset algorithm
The step of contracting, obtaining compressed transmission data specifically includes:
If the data length is more than the preset range, the data to be transmitted is compressed according to preset algorithm, is obtained
To compressed transmission data.
4. data transmission method according to claim 1 or 3, which is characterized in that the preset length is 255 bytes.
5. data transmission method according to claim 1-3, which is characterized in that if the default feature
Information exceeds preset range, compresses to the data to be transmitted according to preset algorithm, obtains compressed transmission data
Step specifically includes:
If the default characteristic information exceeds preset range, the data to be transmitted is compressed by zlib algorithm.
6. data transmission method according to claim 1, which is characterized in that if the data length is more than described
The compressed transmission data are split at least two son transmission data by preset range, and by the sub- transmission data
Transmission data are successively sent to the second communication equipment;So that second communication equipment by described in the sub- transmission Data Synthesis to
The step of transmitting data specifically includes:
If the data length is more than the preset range, the compressed transmission data are split, are obtained at least
Two son transmission data;
Data frame header information is added to the sub- transmission data respectively, wherein the institute after adding the data frame header information
The data length for stating sub- transmission data is no more than the preset range;
The sub- transmission data after the data frame header information will be added and be sequentially successively sent to second communication equipment.
7. data transmission method according to claim 6, which is characterized in that the data frame header information includes the pressure
The number information of transmission data after contracting, the number of the sub- transmission data, compressive features information and the sub- transmission data
Data length.
8. a kind of data transmission method, which is characterized in that the data transmission method includes:
Second communication equipment receives at least two son transmission data that the first communication equipment is sent;Wherein, the sub- transmission number
It is split according to being first communication equipment after the data length for detecting data to be transmitted is more than preset range;
At least two son transmission data are synthesized, transmission data are obtained;And judge whether the transmission data are pre-
If characteristic information exceeds preset range, and according to the compressed data of preset algorithm;
If the transmission data are compressed data, the transmission data are carried out according to the inverse operation of the preset algorithm
Decompression.
9. data transmission method according to claim 8, which is characterized in that described by at least two sons transmission data
It is synthesized, obtains transmission data;And judge whether the transmission data are default characteristic information beyond preset range, and according to
The step of preset algorithm compressed data, specifically includes:
The data frame header information for obtaining the sub- transmission data, obtains the transmission data from the data frame header information
Number information, the number of the sub- transmission data, compressive features information and the sub- transmission data data length;
At least two son transmission data are synthesized according to the data frame header information, obtain transmission data;And sentence
Whether the transmission data of breaking are default characteristic information beyond preset range, and according to the compressed data of preset algorithm.
10. a kind of communication equipment, which is characterized in that the communication equipment includes memory, processor and is stored in described deposit
Computer program that is on reservoir and can running on the processor realizes that right is wanted when the processor executes described program
Seek the step in 1-7 in any data transmission method.
11. a kind of communication equipment, which is characterized in that the communication equipment includes memory, processor and is stored in described deposit
Computer program that is on reservoir and can running on the processor realizes that right is wanted when the processor executes described program
Seek the step in 8-9 in any data transmission method.
12. a kind of device with store function, is stored thereon with program data, which is characterized in that described program data can
It is performed the step realized in claim 1-7 or claim 8-9 in any data transmission method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810226259.6A CN110290099A (en) | 2018-03-19 | 2018-03-19 | Data transmission method, communication equipment and the device with store function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810226259.6A CN110290099A (en) | 2018-03-19 | 2018-03-19 | Data transmission method, communication equipment and the device with store function |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110290099A true CN110290099A (en) | 2019-09-27 |
Family
ID=68001064
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810226259.6A Pending CN110290099A (en) | 2018-03-19 | 2018-03-19 | Data transmission method, communication equipment and the device with store function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110290099A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112597082A (en) * | 2020-12-18 | 2021-04-02 | 龙芯中科技术股份有限公司 | Bus data transmission method and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102571572A (en) * | 2011-12-28 | 2012-07-11 | 中国人民解放军国防科学技术大学 | Short message satellite communication-based data transmission method and device |
CN102694554A (en) * | 2011-01-19 | 2012-09-26 | 三星电子株式会社 | Data compression devices, operating methods thereof, and data processing apparatuses including the same |
CN102843341A (en) * | 2011-06-22 | 2012-12-26 | 阿里巴巴集团控股有限公司 | Data transmitting method and device and data receiving method and device |
CN103188247A (en) * | 2011-12-31 | 2013-07-03 | 深圳市金蝶友商电子商务服务有限公司 | Method and system of data transmission |
CN105847101A (en) * | 2015-01-15 | 2016-08-10 | 上海通用汽车有限公司 | Data transmission method based on vehicle bus |
-
2018
- 2018-03-19 CN CN201810226259.6A patent/CN110290099A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102694554A (en) * | 2011-01-19 | 2012-09-26 | 三星电子株式会社 | Data compression devices, operating methods thereof, and data processing apparatuses including the same |
CN102843341A (en) * | 2011-06-22 | 2012-12-26 | 阿里巴巴集团控股有限公司 | Data transmitting method and device and data receiving method and device |
CN102571572A (en) * | 2011-12-28 | 2012-07-11 | 中国人民解放军国防科学技术大学 | Short message satellite communication-based data transmission method and device |
CN103188247A (en) * | 2011-12-31 | 2013-07-03 | 深圳市金蝶友商电子商务服务有限公司 | Method and system of data transmission |
CN105847101A (en) * | 2015-01-15 | 2016-08-10 | 上海通用汽车有限公司 | Data transmission method based on vehicle bus |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112597082A (en) * | 2020-12-18 | 2021-04-02 | 龙芯中科技术股份有限公司 | Bus data transmission method and electronic equipment |
CN112597082B (en) * | 2020-12-18 | 2023-02-24 | 龙芯中科技术股份有限公司 | Bus data transmission method and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108828409A (en) | A kind of fault detection system based on edge calculations | |
CN107295036B (en) | Data sending method and data merging equipment | |
CN107809337A (en) | A kind of daily record method for uploading and device | |
CN102571820B (en) | For transmitting the method for data, compression service device and terminal | |
CN105187167B (en) | A kind of voice data communication method and device | |
CN105391573B (en) | User based on intelligent terminal perceives monitoring analysis system | |
CN106162528A (en) | LoRa signal and Bluetooth signal modular converter, conversion method and sender unit | |
CN106537959B (en) | Method for encoding and decoding frames in a telecommunication network | |
CN101262499B (en) | A remote monitoring system | |
CN109861712A (en) | A kind of method, terminal and computer storage medium reducing electromagnetic absorption ratio SAR | |
CN110290099A (en) | Data transmission method, communication equipment and the device with store function | |
CN104901849A (en) | Internet behavior data collection method and system therefor | |
CN101729879A (en) | Method for realizing real-time video transmission based on MIMO-OFDM system | |
CN106452483A (en) | Method and apparatus for information interaction | |
CN104702596B (en) | A kind of Information hiding based on data packet length and the method and system of transmission | |
CN103020157A (en) | High-reliability real-time file generation method spanning physical isolation | |
CN105262491A (en) | Data compression method, data compression system, data decompression method, data decompression system and communication equipment | |
CN104038307A (en) | Data stream transmission system and method | |
CN108173791A (en) | The blind authentication method of physical layer and system of time-varying fading channels based on smoothing technique | |
CN110109803A (en) | A kind of user behavior report method and system | |
CN114666776A (en) | Data transmission method, device, equipment and readable storage medium | |
CN111131249B (en) | Data processing method and device | |
KR20210145833A (en) | Base station device, terminal device, communication method, and communication system | |
CN108200604A (en) | Data transmission method and device | |
CN112584435A (en) | Wide-band and narrow-band integrated communication transmission method and device and electronic equipment |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190927 |
|
RJ01 | Rejection of invention patent application after publication |