CN106817367A - A kind of data transmission method and system - Google Patents
A kind of data transmission method and system Download PDFInfo
- Publication number
- CN106817367A CN106817367A CN201710003165.8A CN201710003165A CN106817367A CN 106817367 A CN106817367 A CN 106817367A CN 201710003165 A CN201710003165 A CN 201710003165A CN 106817367 A CN106817367 A CN 106817367A
- Authority
- CN
- China
- Prior art keywords
- packet
- charging equipment
- preset
- escape
- charge data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 230000005540 biological transmission Effects 0.000 title claims abstract description 45
- 230000006835 compression Effects 0.000 claims abstract description 62
- 238000007906 compression Methods 0.000 claims abstract description 62
- 230000005611 electricity Effects 0.000 claims abstract description 60
- 230000009467 reduction Effects 0.000 claims description 18
- 230000006837 decompression Effects 0.000 claims description 10
- 229910002056 binary alloy Inorganic materials 0.000 claims 1
- 238000005538 encapsulation Methods 0.000 claims 1
- 230000008859 change Effects 0.000 abstract description 8
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013478 data encryption standard Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 210000004209 hair Anatomy 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- 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/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/565—Conversion or adaptation of application format or content
- H04L67/5651—Reducing the amount or size of exchanged application data
-
- 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/22—Parsing or analysis of headers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
A kind of data transmission method and system that the present invention is provided, charging equipment obtains charge data, and judge the byte number of the charge data whether more than preset byte number, if being more than, then the charging equipment is to the charge data subpackage, compression and encryption, and by subpackage, charge data after compression and encryption is packaged, obtain packet, and, the packet header that rule fills in the packet is filled according to preset, identification code in start bit and stop position in the packet header is carried out escape by the charging equipment according to preset escape rule, and send to server the packet after escape, the server receives the packet of charging equipment transmission, and the packet that will be received restores the charge data according to preset restoring method.Because the charge data in the packet have passed through subpackage, compression and encrypt, therefore change after the charge data avoided in the packet is trapped.And then the server is normally taken off the electricity charge.
Description
Technical field
The invention belongs to data fields, more particularly to a kind of data transmission method and system.
Background technology
In recent years, the environmental consciousness of people gradually strengthens, and increasing people tends to use electric automobile.With electronic
Automobile quantity increases, and the charging problems of electric automobile also become more and more important.
In existing charging method, user is right directly by charging equipment, such as charging pile, charger or movable charging vehicle
Electric automobile is charged.Electric automobile after charging is finished, send out by the charging expense that charging equipment directly to be paid user
Server is delivered to, charging expense is taken off by server.However, in data transmission procedure, the data of transmission are easy to be trapped
Or change, so as to cause charging expense normally to collect.
The content of the invention
The present invention provides a kind of data transmission method and system, it is intended to solve in data transmission procedure, due to transmission
The problem that data are easily trapped, decode or change and cause charging expense normally to collect.
A kind of data transmission method that the present invention is provided, including:Charging equipment obtains charge data, and judges the charging number
According to byte number whether be more than preset byte number, if being more than, the charging equipment to the charge data subpackage, compression and encrypt,
And be packaged the charge data after subpackage, compression and encryption, packet is obtained, and, filled according to preset rule of filling in
The packet header of the packet, the charging equipment enters the identification code in start bit and stop position in the packet header according to preset escape rule
Row escape, and the packet after escape is sent to server, the server receives the packet of charging equipment transmission,
And the packet that will be received restores the charge data according to preset restoring method.
A kind of data transmission system that the present invention is provided, the system includes:Charging equipment and server;
Whether charging equipment is used to obtain the charge data of electric automobile, and judge the byte number of the charge data more than pre-
Byte number is put, if charging equipment is used to be more than, to the charge data subpackage, compression and encryption, and by subpackage, compression and is encrypted
Charge data afterwards is packaged, and obtains packet, and, the packet header that rule fills in the packet is filled according to preset, charge
Equipment is used to for the identification code in start bit and stop position in the packet header to carry out escape according to preset escape rule, and by after escape
Packet send to server, server is used to receive the packet of charging equipment transmission, and the packet that will be received
The charge data is restored according to preset restoring method.
A kind of data transmission method and system that the present invention is provided, charging equipment obtains charge data, and judges the charging
Whether the byte number of data is more than preset byte number, if being more than, the charging equipment is to the charge data subpackage, compression and adds
It is close, and the charge data after subpackage, compression and encryption is packaged, packet is obtained, and, filled out according to preset rule of filling in
The packet header of the packet is write, the charging equipment is by the identification code in start bit and stop position in the packet header according to preset escape rule
Escape is carried out, and the packet after escape is sent to server, the server receives the data of charging equipment transmission
Bag, and the packet that will be received restores the charge data according to preset restoring method.The present invention compared with prior art,
Beneficial effect is:When the charging equipment sends to server the packet of subpackage, compression and encryption, due to the packet
In charge data have passed through subpackage, compression and encrypt, therefore change after the charge data avoided in the packet is trapped.
So, when the server receive the charging equipment transmission packet when, by preset restoring method to the packet also
Original goes out charge data, and then the server is normally taken off the electricity charge.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention.
Fig. 1 is that a kind of data transmission method that first embodiment of the invention is provided realizes schematic flow sheet;
Fig. 2 is that a kind of data transmission method that second embodiment of the invention is provided realizes schematic flow sheet;
Fig. 3 is a kind of structural representation of data transmission system that third embodiment of the invention is provided.
Specific embodiment
To enable that goal of the invention of the invention, feature, advantage are more obvious and understandable, below in conjunction with the present invention
Accompanying drawing in embodiment, is clearly and completely described to the technical scheme in the embodiment of the present invention, it is clear that described reality
It is only a part of embodiment of the invention to apply example, and not all embodiments.Based on the embodiment in the present invention, people in the art
The every other embodiment that member is obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
A kind of data transmission method provided in an embodiment of the present invention can apply to transmit all terminals or the service of data
Device.
Refer to Fig. 1, a kind of data transmission method that Fig. 1 is provided for first embodiment of the invention realizes that flow is illustrated
Figure, the data transmission method shown in Fig. 1 is mainly included the following steps that:
Whether S101, charging equipment obtain charge data, and judge the byte number of the charge data more than preset byte number.
The charging equipment is the equipment that electricity is provided to the electric automobile, such as charger and charging pile.The charge data is
The data that the charging equipment is produced during the charging electric vehicle, the charge data is cached in the charging equipment after producing.This fills
Electric data include the electric automobile charge capacity obtained when charging and the charging expense to be paid.The preset byte number is
The byte number for pre-setting.If the byte number of the charge data is more than the preset byte number, step S102 is performed.
S102, the charging equipment to the charge data subpackage, compression and encrypt, and by subpackage, compression and encryption after fill
Electric data are packaged, and obtain packet, and, fill in the packet header that rule fills in the packet according to preset.
The preset rule of filling in is the rule in the packet header for filling in the packet set in advance.
S103, the charging equipment carry out the identification code in start bit and stop position in the packet header according to preset escape rule
Escape, and the packet after escape is sent to server.
The preset escape rule is the rule of the escape identification code set in advance.The identification code is used to identify the packet
It is charge data.
S104, the server receive the packet of charging equipment transmission, and the packet that will be received is according to pre-
Put restoring method and restore the charge data.
The preset restoring method is that the packet by server reception for pre-setting restores the charge data
Method.The preset restoring method includes the method that the identification code is carried out escape reduction, by the number of the subpackage, compression and encryption
The method that packet splicing, decompression and decryption are carried out according to bag.
In the embodiment of the present invention, charging equipment obtains the charge data of electric automobile, and judges the byte of the charge data
Number whether be more than preset byte number, if being more than, the charging equipment to the charge data subpackage, compression and encrypt, and by subpackage,
Charge data after compression and encryption is packaged, and obtains packet, and, fill in the packet according to preset rule of filling in
Identification code in start bit and stop position in the packet header is carried out escape by packet header, the charging equipment according to preset escape rule, and
The packet after escape is sent to server, the server receives the packet of charging equipment transmission, and will receive
To the packet restore the charge data according to preset restoring method.As described above, working as the charging equipment by subpackage, compression
Packet with encryption is sent during to server, because the charge data in the packet have passed through subpackage, compression and encrypt, because
This charge data avoided in the packet is changed after being trapped.So, sent when the server receives the charging equipment
Packet when, charge data is restored to the packet by preset restoring method, and then allow the server normal
Take off the electricity charge.
Refer to Fig. 2, a kind of data transmission method that Fig. 2 is provided for second embodiment of the invention realizes that flow is illustrated
Figure, the data transmission method shown in Fig. 2 is mainly included the following steps that:
S201, charging equipment obtain the charge data of electric automobile, and judge whether the byte number of the charge data is more than
Preset byte number.
The charging equipment is the equipment that electricity is provided to the electric automobile, such as charger and charging pile.The charge data is
The data that the charging equipment is produced during the charging electric vehicle, the charge data includes filling that the electric automobile is obtained when charging
Power consumption and the charging expense to be paid.The preset byte number is the byte number for pre-setting.In actual applications, when this fills
When the byte number of electric data is more than the preset byte number, the charge data is important charge data, i.e., in the charge data
Charging expense is not 0.
In actual applications, before the charging equipment obtains charge data, the identification code of electric automobile is obtained, and this is known
Other code is sent to server, and the server receives the identification code of the electric automobile, and by the identification code of the electric automobile with prestore
Identification code in the server is compared, when the charging equipment finds and the electric automobile in the identification code for prestoring
During identification code identical identification code, the server sends response message to the charging equipment, is authenticated with to the electric automobile.
So, confirm that the electric automobile is, by the server admin, to be easy to server to take off the electric automobile and fill by said process
The electric expense to be paid.
If the byte number of the charge data is more than the preset byte number, step S102 is performed;If the word of the charge data
Joint number is less than the preset byte number, then directly be packaged the charge data by the charging equipment, generates packet, and this is counted
Sent to the server according to bag.In actual applications, charging expense is that 0 data are unessential data, and charging expense is not 0
Data be important data.
S202, the charging equipment to the charge data subpackage, compression and encrypt, and by subpackage, compression and encryption after fill
Electric data are packaged, and obtain packet, and, fill in the packet header that rule fills in the packet according to preset.
Every 1126 each byte in the charge data can be divided into a bag by the charging equipment, can also be by the charging number
Every 1472 bytes are divided into a bag in.The charging equipment can be using RAR (Roshal Archive) compressions to the charging
Data are compressed, it is also possible to the charge data is compressed using GZIP (GunZip) compression methods.The charging equipment can
The charge data is encrypted, may be used also with using data encryption standards (Data Encryption Standard, DES) algorithm
The charge data is encrypted with using MD5 (Message-Digest Algorithm 5) algorithm.
Further, according to it is preset fill in rule and fill in packet header of the packet be specially:The charging equipment would indicate that point
In one byte of the message digit that the binary number of bag, compression and encryption inserts the packet header.
Further, the charging equipment would indicate that the binary number of subpackage, compression and encryption inserts the message digit in the packet header
A byte in, specifically include:
The charging equipment would indicate that the binary number of compression inserts 0-1 of target byte, would indicate that the two of encryption enter
Number processed inserts 2-4 of the target byte, would indicate that the binary number of subpackage inserts the 5th of the target byte.
One embodiment of the present of invention, as shown in table 1, table 1 is 8 positions (Bit) of the target byte, wherein, Bit0-
Binary number " 10 " in Bit1 represents compression, and the binary number " 100 " in Bit2-Bit4 represents encryption, and in Bit5 two enter
Number " 1 " processed represents subpackage, Bit6-Bit7 without.
Table 1
The residing time period determines electricity price code when the charging equipment is according to the charging electric vehicle, and by the electricity price code
It is respectively filled in multiple bytes of the message digit.
The electricity price code is multiple bytes in actual applications, so, when the electricity price code is inserted into the message digit, the electricity
Valency code occupies the multiple bytes in the message digit.
Different charge periods, the price of charge capacity is different, and the electricity price code is used to identify different charge periods
The unit price of charging.In actual applications, the unit price of the charging electric vehicle can be collected according to the price for charging per hour,
Such as X units/hour, it is also possible to collected according to every price for charging 100 coulombs, such as X units/hundred coulombs.The electricity price code includes
Electricity price code and electricity price code during peak during paddy, wherein, electricity price code is different when electricity price code is from the peak during paddy, e.g., sets
Electricity price code when 0X23 is peak, sets electricity price code when 0X22 is paddy.
Further, the residing time period determines electricity price code when the charging equipment is according to the charging electric vehicle, specifically
Including:
If the residing time period is preset peak period during the charging electric vehicle, it is determined that electricity price code is the electricity during peak
Valency code.
If the residing time period is preset low-valley interval during the charging electric vehicle, it is determined that electricity price code is the electricity during paddy
Valency code.
The preset peak period and the preset low-valley interval can in the light of actual conditions be configured, it is assumed that 0 in one day:
00-17:00 is low-valley interval, and the electric automobile charges at this moment, electricity price code 0X22 when the electricity price code is paddy, then by 0X22
It is defined as electricity price code.Assuming that 17 in one day:00-:24:00 is preset peak period, and the electric automobile charges at this moment, the electricity
Electricity price code 0X23 when valency code is peak, then be defined as electricity price code by 0X23.
The check code as check code, and is inserted the check bit in the packet header by the electricity price code by the charging equipment, with
And, using the electricity price code as the identification code, and the identification code inserted into the start bit and the stop position.
The check code is used to verify the unit price of charge capacity in the charge data.The identification code is used to identify the packet
Charge data.
If the electricity price code is 0X22, using 0X22 as the check code and the identification code, and 0X22 is inserted into the verification
In position, the start bit and the stop position.If the electricity price code is 0X23, using 0X23 as the check code and the identification code, and
During 0X23 inserted into the check bit, the start bit and the stop position.
S203, the charging equipment carry out the identification code in start bit and stop position in the packet header according to preset escape rule
Escape, and the packet after escape is sent to server.
Further, the charging equipment is regular according to preset escape by the identification code in start bit and stop position in the packet header
Escape is carried out, is specifically included:
Preset numeral is added after charging equipment identification code respectively in the start bit and the stop position, after obtaining escape
Identification code to be restored.
The preset numeral is the numeral for pre-setting.The identification code to be restored is the identification code for treating escape reduction.Assuming that should
Preset numeral is 0X01, and the identification code is 0X22, then will add 0X01 after 0X22, and the identification code to be restored after the escape is
0X2201.Assuming that the preset numeral is 0X2, the identification code is 0X22, then will add 0X02 after 0X22, to be restored after the escape
Identification code be 0X2202.
S204, the server receive the packet of charging equipment transmission.
S205, the server carry out escape reduction according to preset escape also meta-rule to the identification code to be restored, and judge
Whether the start bit is identical with identification code in the stop position after escape reduction.
The preset escape also meta-rule is the escape for pre-setting also meta-rule, and the preset escape also meta-rule is preset with this
Escape rule is corresponding.If for example, the preset escape rule is that preset numeral is added after identification code, the preset escape is reduced
Rule is to leave out the preset numeral from the identification code to be restored.Illustrate, it is assumed that the preset numeral is 0X01, the mark to be restored
Knowledge code is 0X2201, then 0X2201 is left out into 0X01, and the identification code after escape reduction is 0X22.Assuming that the preset numeral is
0X02, the identification code to be restored is 0X2202, then 0X2202 is left out into 0X02, and the identification code after the escape is 0X22.
If the start bit is identical with the identification code in the stop position after escape reduction, step S206 is performed.If escape is also
The start bit is different from the identification code in the stop position after original, then the packet is not processed.So, when the server connects
When receiving packet, can be selected comprising charging by judging whether the check code in the start bit and the stop position is identical
The packet of data is processed, and greatly saves the time, improves efficiency.
S206, the server judge whether the check code and the electricity price code are identical.
The server is by judging that whether the check code is identical with the electricity price code, determines charge capacity in the charge data
Unit price.
If the check code is identical with the electricity price code, step S207 is performed.If the check code and the electricity price code not phase
Together, then the server is unpacked to the packet, to restore the charge data.
Generally, when the check code and the electricity price code are differed, packet splicing, decompression are not carried out to the packet and is decrypted.
Because the data that the check code and the electricity price code are differed are charge data not by subpackage, compression and encryption, i.e. word
Joint number is less than the charge data of the preset byte number, for example, charging expense is 0 charge data.So, even if in transmitting procedure
In the charge data be trapped or change, be the packet to be unpacked, is glued when taking off charging expense due to the server
Taken off according to the charging expense in charge data after bag, decompression and decryption, so will not be caused to the process of the expense of taking off
Any influence.
S207, the server are unpacked to the packet, and according to the binary number of the expression subpackage, compression and encryption
Packet splicing, decompression are carried out to the packet and is decrypted, to restore the charge data.
It should be noted that the expression subpackage, compression and encryption binary number include expression subpackage binary number,
The binary number for representing decompression and the binary number for representing decryption.As shown in Table 1 above, subpackage, compression and encryption are represented
Binary number is 101001, wherein, the binary number " 10 " in Bit0-Bit1 represents compression, the binary number in Bit2-Bit4
" 100 " represent encryption, and the binary number " 1 " in Bit5 represents subpackage.
Alternatively, the server according to represent subpackage binary number, using with the subpackage being pre-stored in the charging equipment
The corresponding packet splicing method of method carries out packet splicing to the packet.The server according to represent encryption binary number, using with it is pre-
The corresponding decryption method of encryption method being stored in the server is decrypted to the packet.The server compresses according to expression
Binary number, the packet is decrypted using decryption method corresponding with the encryption method being pre-stored in the server.
In actual applications, after the packet escape is restored the charge data by the server, according to filling in the charge data
The expense of the charging is directly taken off in the electricity charge.In the embodiment of the present invention, charging equipment obtains the charge data of electric automobile, and sentences
Whether the byte number of the disconnected charge data is more than preset byte number, if being more than, the charging equipment is to the charge data subpackage, pressure
Contracting and encryption, and the charge data after subpackage, compression and encryption is packaged, packet is obtained, and, filled according to preset
Rule fills in the packet header of the packet, and the charging equipment is by the identification code in start bit and stop position in the packet header according to preset turn
Adopted rule carries out escape, and the packet after escape is sent to server, and the server receives charging equipment transmission
The packet, the server carries out escape reduction according to preset escape also meta-rule to the identification code to be restored, and judges escape
Whether the start bit identical with identification code in the stop position after reduction, if identical, the server judge the check code with should
Whether electricity price code identical, if identical, the server is unpacked to the packet, and according to the expression subpackage, compression and
The binary number of encryption carries out packet splicing, decompression to the packet and decrypts, to restore the charge data.As described above, work as should
Charging equipment sends during to server the packet of subpackage, compression and encryption, because the charge data in the packet passes through
Subpackage, compression and encrypt, therefore change after the charge data avoided in the packet is trapped.So, when the server
When receiving the packet of charging equipment transmission, charge data is restored to the packet by preset restoring method, entered
And the server is normally taken off the electricity charge.
Fig. 3 is referred to, Fig. 3 is the structural representation of the data transmission system that third embodiment of the invention is provided, in order to just
In explanation, the part related to the embodiment of the present invention is illustrate only.The data transmission system of Fig. 3 examples can be the He of earlier figures 1
The executive agent of the data transmission method that embodiment illustrated in fig. 2 is provided.The data transmission system of Fig. 3 examples, mainly includes:Charge
Equipment 301 and server 302.Each functional module describes in detail as follows above:
Charging equipment 301, for obtaining the charge data of electric automobile, and judges whether the byte number of the charge data is big
In preset byte number.
Charging equipment 301, if being additionally operable to be more than, to the charge data subpackage, compression and encrypt, and by subpackage, compression
It is packaged with the charge data after encryption, obtains packet, and, fill in the bag that rule fills in the packet according to preset
Head.
Charging equipment 301, is additionally operable to the identification code in start bit and stop position in the packet header according to preset escape rule
Escape is carried out, and the packet after escape is sent to server.
Server 302, the packet for receiving charging equipment transmission, and the packet that will be received are gone back according to preset
Former method restores the charge data.
Details is not use up in the embodiment of the present invention, refer to the first embodiment and second embodiment shown in Fig. 1 and Fig. 2,
Will not be repeated here.
In the embodiment of the present invention, charging equipment 301 is used to obtain the charge data of electric automobile, and judges the charge data
Byte number whether be more than preset byte number, if charging equipment 301 is additionally operable to be more than, to the charge data subpackage, compression and
Encryption, and the charge data after subpackage, compression and encryption is packaged, packet is obtained, and, fill in rule according to preset
The packet header of the packet is filled in, charging equipment 301 is additionally operable to the identification code in start bit and stop position in the packet header according to pre-
Putting escape rule carries out escape, and the packet after escape is sent to server, and server 302 is used to receive charging equipment
301 packets for sending, and the packet that will be received restores the charge data according to preset restoring method.As described above,
When the charging equipment sends to server the packet of subpackage, compression and encryption, due to the charge data in the packet
Have passed through subpackage, compression and encrypt, therefore change after the charge data avoided in the packet is trapped.So, when the clothes
When business device receives the packet of charging equipment transmission, charging number is restored to the packet by preset restoring method
According to, and then the server is normally taken off the electricity charge.
Fig. 3 is referred to, Fig. 3 is the structural representation of the data transmission system that fourth embodiment of the invention is provided, in order to just
In explanation, the part related to the embodiment of the present invention is illustrate only.The data transmission system of Fig. 3 examples can be the He of earlier figures 1
The executive agent of the data transmission method that embodiment illustrated in fig. 2 is provided.The data transmission system of Fig. 3 examples, mainly includes:Charge
Equipment 301 and server 302.Each functional module describes in detail as follows above:
Charging equipment 301, for obtaining the charge data of electric automobile, and judges whether the byte number of the charge data is big
In preset byte number.
Charging equipment 301, if being additionally operable to be more than, to the charge data subpackage, compression and encrypt, and by subpackage, compression
It is packaged with the charge data after encryption, obtains packet, and, fill in the bag that rule fills in the packet according to preset
Head.
Charging equipment 301, is additionally operable to the identification code in start bit and stop position in the packet header according to preset escape rule
Escape is carried out, and the packet after escape is sent to server.
Server 302, the packet for receiving charging equipment transmission, and the packet that will be received are gone back according to preset
Former method restores the charge data.
Further, charging equipment 301, are additionally operable to would indicate that the binary number of subpackage, compression and encryption inserts the packet header
Message digit a byte in, the residing time period determines electricity price code during according to the charging electric vehicle, and by the electricity price
Code inserts multiple bytes of the message digit.
Charging equipment 301, is additionally operable to the electricity price code as check code, and the check code is inserted the verification in the packet header
In position, and using the electricity price code as the identification code, and the identification code inserted into the start bit and the stop position.
Further, charging equipment 301, are additionally operable to would indicate that the binary number of compression inserts 0-1 of target byte,
Would indicate that the binary number of encryption inserts 2-4 of the target byte, would indicate that the binary number of subpackage inserts the target word
The 5th of section.
Further, charging equipment 301, add after being additionally operable to the identification code respectively in the start bit and the stop position
Preset numeral, obtains the identification code to be restored after escape.
Further, server 302, are additionally operable to carry out escape to the identification code to be restored according to preset escape also meta-rule
Reduction, and whether the start bit is identical with identification code in the stop position after judging escape reduction.
Server 302, if being additionally operable to identical, judges whether the check code is identical with the electricity price code.
Server 302, if being additionally operable to identical, unpacks to the packet, and according to the expression subpackage, compression and adds
Close binary number carries out packet splicing, decompression to the packet and decrypts, to restore the charge data.
Details is not use up in the embodiment of the present invention, refer to the first embodiment and second embodiment shown in Fig. 1 and Fig. 2,
Will not be repeated here.
In the embodiment of the present invention, charging equipment 301 is used to obtain the charge data of electric automobile, and judges the charge data
Byte number whether be more than preset byte number, if charging equipment 301 is additionally operable to be more than, to the charge data subpackage, compression and
Encryption, and the charge data after subpackage, compression and encryption is packaged, packet is obtained, and, fill in rule according to preset
The packet header of the packet is filled in, charging equipment 301 is additionally operable to the identification code in start bit and stop position in the packet header according to pre-
Putting escape rule carries out escape, and the packet after escape is sent to server, and server 302 sets for receiving the charging
Standby 301 packets for sending, the server is treated according to the regular corresponding preset escape also meta-rule of the preset escape to this
Reduction identification code carries out escape reduction, and judges whether the start bit after escape reduction is identical with identification code in the stop position,
If server 302 is additionally operable to identical, judge whether the check code is identical with the electricity price code, if server 302 is additionally operable to phase
Together, then the packet is unpacked, and the packet is glued according to the expression subpackage, compression and the binary number encrypted
Bag, decompression and decryption, to restore the charge data.As described above, when the charging equipment by subpackage, compression and encryption data
Bag is sent during to server, because the charge data in the packet have passed through subpackage, compression and encrypt, therefore avoids the number
Changed after being trapped according to the charge data in bag.So, when the server receives the packet of charging equipment transmission, lead to
Cross preset restoring method and charge data is restored to the packet, and then the server is normally taken off the electricity charge.
In multiple embodiments provided herein, it should be understood that disclosed system, apparatus and method, can be with
Realize by another way.For example, device embodiment described above is only schematical, for example, the module
Divide, only a kind of division of logic function there can be other dividing mode when actually realizing, such as multiple module or components
Can combine or be desirably integrated into another system, or some features can be ignored, or do not perform.It is another, it is shown or
The coupling each other for discussing or direct-coupling or communication linkage can be the indirect couplings of device or module by some interfaces
Close or communication linkage, can be electrical, mechanical or other forms.
The module that is illustrated as separating component can be or may not be it is physically separate, it is aobvious as module
The part for showing can be or may not be physical module, you can with positioned at a place, or can also be distributed to multiple
On mixed-media network modules mixed-media.Some or all of module therein can be according to the actual needs selected to realize the mesh of this embodiment scheme
's.
In addition, during each functional module in each embodiment of the invention can be integrated in a processing module, it is also possible to
It is that modules are individually physically present, it is also possible to which two or more modules are integrated in a module.Above-mentioned integrated mould
Block can both be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.
If the integrated module is to realize in the form of software function module and as independent production marketing or use
When, can store in a computer read/write memory medium.Based on such understanding, technical scheme is substantially
The part for being contributed to prior art in other words or all or part of the technical scheme can be in the form of software products
Embody, the computer software product is stored in a storage medium, including some instructions are used to so that a computer
Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the invention
Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
It should be noted that for foregoing each method embodiment, in order to simplicity is described, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should know, the present invention not by described by sequence of movement limited because
According to the present invention, some steps can sequentially or simultaneously be carried out using other.Secondly, those skilled in the art should also know
Know, embodiment described in this description belongs to preferred embodiment, and involved action and module might not all be this hairs
Necessary to bright.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion described in detail in certain embodiment
Point, may refer to the associated description of other embodiments.
It is more than the description to data transmission method provided by the present invention and system, for those skilled in the art,
According to the thought of the embodiment of the present invention, will change in specific embodiments and applications, to sum up, this specification
Content should not be construed as limiting the invention.
Claims (10)
1. a kind of data transmission method, it is characterised in that methods described includes:
Whether charging equipment obtains the charge data of electric automobile, and judge the byte number of the charge data more than preset byte
Number;
If being more than, the charging equipment is to the charge data subpackage, compression and encrypts, and by after subpackage, compression and encryption
Charge data be packaged, obtain packet, and, fill in packet header of the packet according to preset rule of filling in;
Identification code in start bit and stop position in the packet header is carried out escape by the charging equipment according to preset escape rule,
And send to server the packet after escape;The server receives the packet that the charging equipment sends, and will connect
The packet for receiving restores the charge data according to preset restoring method.
2. method according to claim 1, it is characterised in that described to fill in packet after encapsulation according to preset rule of filling in
Packet header, specifically include:
The charging equipment would indicate that the binary number of subpackage, compression and encryption inserts a byte of the message digit in the packet header
In, the residing time period determines electricity price code during according to the charging electric vehicle, and the electricity price code is respectively filled in into institute
State multiple bytes of message digit;
The electricity price code as check code, and the check code is inserted the check bit in the packet header by the charging equipment
In, and using the electricity price code as the identification code, and the identification code is inserted into the start bit and the stop position
In.
3. method according to claim 2, it is characterised in that the charging equipment would indicate that subpackage, compression and encryption
Binary number is inserted in a byte of the message digit in the packet header, is specifically included:
The charging equipment would indicate that the binary number of compression inserts 0-1 of target byte, would indicate that the binary system of encryption
Number inserts 2-4 of the target byte, would indicate that the binary number of subpackage inserts the 5th of the target byte.
4. method according to claim 1 and 2, it is characterised in that the charging equipment by start bit in the packet header and
Identification code in stop position carries out escape according to preset escape rule, specifically includes:
Preset numeral is added after the charging equipment identification code respectively in the start bit and the stop position, is obtained
Identification code to be restored after escape.
5. method according to claim 4, it is characterised in that the packet that will be received according to preset restoring method also
Original goes out the charge data, specifically includes:
The server carries out escape reduction to the identification code to be restored according to the preset reduction escape rule, and judges to turn
Whether the start bit is identical with identification code in the stop position after justice reduction;
If identical, the server judges whether the check code is identical with the electricity price code;
If identical, the server is unpacked to the packet, and according to the two of the expression subpackage, compression and encryption
System number carries out packet splicing, decompression to the packet and decrypts, to restore the charge data.
6. a kind of data transmission system, it is characterised in that the system includes:Charging equipment and server;
The charging equipment, for obtaining the charge data of electric automobile, and judges whether the byte number of the charge data is big
In preset byte number;
The charging equipment, if being additionally operable to be more than, to the charge data subpackage, compression and encrypt, and by subpackage, compression and
Charge data after encryption is packaged, and obtains packet, and, fill in the bag that rule fills in the packet according to preset
Head;
The charging equipment, is additionally operable to enter the identification code in start bit and stop position in the packet header according to preset escape rule
Row escape, and the packet after escape is sent to server;
The server, for receiving the packet that the charging equipment sends, and the packet that will be received is gone back according to preset
Former method restores the charge data.
7. system according to claim 6, it is characterised in that
The charging equipment, is additionally operable to would indicate that the binary number of subpackage, compression and encryption inserts the message digit in the packet header
In one byte, the residing time period determines electricity price code during according to the charging electric vehicle, and the electricity price code is filled out
Enter multiple bytes of the message digit;
The charging equipment, is additionally operable to the electricity price code as check code, and the check code is inserted into the packet header
In check bit, and using the electricity price code as the identification code, and the identification code is inserted into the start bit and described
In stop position.
8. system according to claim 7, it is characterised in that
The charging equipment, is additionally operable to would indicate that the binary number of compression inserts 0-1 of target byte, would indicate that encryption
Binary number inserts 2-4 of the target byte, would indicate that the binary number of subpackage inserts the 5th of the target byte
Position.
9. the system according to claim 6 or 7, it is characterised in that
The charging equipment, preset number is added after being additionally operable to the identification code respectively in the start bit and the stop position
Word, obtains the identification code to be restored after escape.
10. system according to claim 9, it is characterised in that
The server, is additionally operable to carry out escape reduction to the identification code to be restored according to preset escape also meta-rule, and sentence
Whether the start bit is identical with identification code in the stop position after disconnected escape reduction;
The server, if being additionally operable to identical, judges whether the check code is identical with the electricity price code;
The server, if being additionally operable to identical, unpacks to the packet, and according to the expression subpackage, compression and
The binary number of encryption carries out packet splicing, decompression to the packet and decrypts, to restore the charge data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710003165.8A CN106817367A (en) | 2017-01-03 | 2017-01-03 | A kind of data transmission method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710003165.8A CN106817367A (en) | 2017-01-03 | 2017-01-03 | A kind of data transmission method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106817367A true CN106817367A (en) | 2017-06-09 |
Family
ID=59109446
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710003165.8A Pending CN106817367A (en) | 2017-01-03 | 2017-01-03 | A kind of data transmission method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106817367A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109150406A (en) * | 2018-09-20 | 2019-01-04 | 丁顺敏 | A kind of data packet subpackage method of byte stream communication |
CN111144159A (en) * | 2019-12-11 | 2020-05-12 | 中国电子科技集团公司第三十研究所 | One-way transmission system based on two-dimensional code |
CN113593126A (en) * | 2021-08-04 | 2021-11-02 | 特瓦特能源科技有限公司 | Charging pile big data transmission system and method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101242426A (en) * | 2007-02-06 | 2008-08-13 | 华为技术有限公司 | Method, system and device for establishing secure connection at transmission layer |
CN101645883A (en) * | 2008-08-08 | 2010-02-10 | 比亚迪股份有限公司 | Data transmitting method, a data sending method and a data receiving method |
CN101741629A (en) * | 2008-11-11 | 2010-06-16 | 英业达股份有限公司 | Communication encryption method supporting remote monitoring system |
CN105657037A (en) * | 2016-02-04 | 2016-06-08 | 金龙联合汽车工业(苏州)有限公司 | New energy vehicle and charging facility data acquisition method |
CN106254355A (en) * | 2016-08-10 | 2016-12-21 | 武汉信安珞珈科技有限公司 | The security processing of a kind of the Internet protocol data bag and system |
-
2017
- 2017-01-03 CN CN201710003165.8A patent/CN106817367A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101242426A (en) * | 2007-02-06 | 2008-08-13 | 华为技术有限公司 | Method, system and device for establishing secure connection at transmission layer |
CN101645883A (en) * | 2008-08-08 | 2010-02-10 | 比亚迪股份有限公司 | Data transmitting method, a data sending method and a data receiving method |
CN101741629A (en) * | 2008-11-11 | 2010-06-16 | 英业达股份有限公司 | Communication encryption method supporting remote monitoring system |
CN105657037A (en) * | 2016-02-04 | 2016-06-08 | 金龙联合汽车工业(苏州)有限公司 | New energy vehicle and charging facility data acquisition method |
CN106254355A (en) * | 2016-08-10 | 2016-12-21 | 武汉信安珞珈科技有限公司 | The security processing of a kind of the Internet protocol data bag and system |
Non-Patent Citations (1)
Title |
---|
胡学钢 等: "《计算机网络》", 31 May 2014 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109150406A (en) * | 2018-09-20 | 2019-01-04 | 丁顺敏 | A kind of data packet subpackage method of byte stream communication |
CN109150406B (en) * | 2018-09-20 | 2021-05-25 | 丁顺敏 | Data packet subpackaging method for byte stream communication |
CN111144159A (en) * | 2019-12-11 | 2020-05-12 | 中国电子科技集团公司第三十研究所 | One-way transmission system based on two-dimensional code |
CN113593126A (en) * | 2021-08-04 | 2021-11-02 | 特瓦特能源科技有限公司 | Charging pile big data transmission system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106375287B (en) | Charging method of new energy automobile | |
US10326291B2 (en) | Quick charging method, power adapter and mobile terminal | |
CN105516139A (en) | Network data transmission method, device and system | |
CN106817367A (en) | A kind of data transmission method and system | |
WO2008069403A1 (en) | Apparatus and method for protecting rfid data | |
CN105009541A (en) | Low bit-rate coding method and device | |
CN114257972B (en) | Embedded 5G communication system and method for power terminal | |
CN111934873A (en) | Bidding file encryption and decryption method and device | |
CN102833709B (en) | A kind of sending method, mobile terminal, server and system of note | |
CN106161224B (en) | Method for interchanging data, device and equipment | |
CN110048833B (en) | Electric power service encryption method and device based on quantum satellite key network | |
CN109348434A (en) | A kind of sending method of scene information, sending device and terminal device | |
CN114257562B (en) | Instant messaging method, device, electronic equipment and computer readable storage medium | |
CN108347629A (en) | Video file processing method, device, server and storage medium | |
CN106815761A (en) | E-voucher center card processing method, device and system | |
CN105430635A (en) | Card-changing method, device and system for mobile terminal, and mobile terminal | |
CN111416702B (en) | Data transmission method, data transmission system and computer readable storage medium | |
CN104602048B (en) | A kind of method of calibration and Conditional Access Module based on Conditional Access Module | |
CN111414341B (en) | Data normalization description method in Internet of things environment | |
CN114339739A (en) | Intelligent management system of wireless communication protocol | |
CN114785805A (en) | Data transmission method and device, electronic equipment and storage medium | |
CN109150867B (en) | Network information transmission encryption/decryption device and encryption/decryption method | |
CN112926072A (en) | Real-time data transmission method and system and file access concurrency control method | |
CN106060801A (en) | Data communication method, device and system based on Wi-Fi device | |
CN105120425A (en) | M2M identification method and apparatus, internet of things terminal and M2M identification system |
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 | ||
AD01 | Patent right deemed abandoned | ||
AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20240220 |