CN106385305A - Power line carrier communication method - Google Patents

Power line carrier communication method Download PDF

Info

Publication number
CN106385305A
CN106385305A CN201610817858.6A CN201610817858A CN106385305A CN 106385305 A CN106385305 A CN 106385305A CN 201610817858 A CN201610817858 A CN 201610817858A CN 106385305 A CN106385305 A CN 106385305A
Authority
CN
China
Prior art keywords
data
error
bale
packet
bag
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610817858.6A
Other languages
Chinese (zh)
Inventor
娴锋尝
海波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Haibo Intelligent Technology Co Ltd
Original Assignee
Sichuan Haibo Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Haibo Intelligent Technology Co Ltd filed Critical Sichuan Haibo Intelligent Technology Co Ltd
Priority to CN201610817858.6A priority Critical patent/CN106385305A/en
Publication of CN106385305A publication Critical patent/CN106385305A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • H04B3/542Systems for transmission via power distribution lines the information being in digital form
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0078Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/08Arrangements for detecting or preventing errors in the information received by repeating transmission, e.g. Verdan system

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

The invention discloses a power line carrier communication method, and relates to a field of power line carrier communication. The method comprises following steps: a sender divides long data into short data to form a group of data packages, the sender sends the group of data packages in sequence according to a preset interval time, a receiver receives the data packages and confirms the correctness of the data by adopting methods including length check, check value check and package number continuity check, the method solves technical problems of short communication time, difficult transmission, strong channel disturbance and error-prone data in power line carrier communication, and the accuracy and integrity of transmission data can be guaranteed. The method comprises advantages of simpleness, high reliability and low error rate.

Description

Power-line carrier communication method
Technical field
The present invention relates to a kind of method of data communication, especially a kind of method of carrier communication.
Background technology
In order to complete to communicate in the alternating current of 220V/50Hz, carrier communication module can select when interference is minimum Communicated, that is, when the just profound ripple zero passage of voltage before and after 1.5ms about time communicated, its baud rate is 1200bps.Because being the waveform of 50Hz, every 10ms just can communicate 3.3ms about the time, that is, 1 second only 1/3 when Between in communication, baud rate is 1200bps mono- second at most communication 1200/10=120 byte, and 1/3 time is exactly 120/3=40 Byte per second.It can be seen that we at most send 40 bytes in one second, if we will send long data, occupied carrier network for a long time, If having a lot of other-ends also to initiate communication request in period, communication failure certainly will be caused.
Content of the invention
The technical problem to be solved is short for above-mentioned carrier communication call duration time, the technology being easily disturbed Problem, provides a kind of simple to operate, reliability is high, the bit error rate is low power-line carrier communication method.
The technical solution adopted for the present invention to solve the technical problems is:A kind of power-line carrier communication method, including:
S1:Sender, according to default time interval, sends one group of packet successively, and the structure of described packet includes: Bale No.+data text+check value;
S2:Recipient receives packet, determines whether last packet of this group, if then entering step S4;If It is not then to enter next step;
S3:Recipient carries out length check to packet, if size error, sends error bag, repeating transmission is made a start in request should Bag;If length is correct, enter next step;
S4:Recipient carries out check value verification to packet, if check value mistake, sends error bag, asks sender Retransmit this bag;If check value is correct, enter next step;
S5:Recipient carries out Bale No. seriality verification to packet, if Bale No. is discontinuous, sends error bag, request is sent out The Shang Yibao of this bag retransmits in the side of sending;If Bale No. is continuous, enter next step;
S6:Judge whether to finish receiving this group packet, if it is not, being then failure to actuate;If so, then receive and terminate.
Here, recipient, it is ensured that the correctness of data transfer and integrity by the way of three kinds of verifications, adopts here With the verification of Bale No. seriality, certain data-bag lost that sender sends not only can be solved the problems, such as, can also solve to connect After debit receives error data bag, send error bag to sender, sender confiscates error bag, continue to send new data packets Situation, recipient find receive packet Bale No. discontinuously may proceed to send Bale No. error bag, request sender's transmission on One packet is it is ensured that the integrity of data receiver.
More preferably, the Bale No. of packet be 1 byte, data text be 6 bytes, check value is 1 byte.
Here, long data to be sent is divided into the data composition packet being a group with 6 bytes, adds 1 byte Bale No., for representing which subpackage this is, along with the check value of 1 byte, just form a complete packet It is 8 bytes.The transmission time of 8 bytes is about 200ms.The success rate sending than not subpackage by calculating in one second improves 5 times.
More preferably, the check value of packet is the check value of this all byte of packet Bale No. data text.
More preferably, default time interval is 200ms.
Transmission time due to 8 bytes is about 200ms, and time interval is preset as 200ms by us, can be to greatest extent Raising communication efficiency.
More preferably, the structure of error bag includes:Error Bale No.+error flag+check value, Bale No. is 1 byte, error mark Will is 1 byte, and check value is 1 byte.
More preferably, error flag byte includes data 01,02 and 03,01 and represents that CRC is wrong, and 02 represents size error, 03 representative Bale No. is discontinuous.
Here the error flag of error bag is divided into three kinds, sender can be allowed to be apparent from the problem malfunctioning, send Suitable packet, has saved call duration time it is ensured that communication accuracy.
More preferably, the test value of error bag is the error Bale No. of this error bag and the check value of all bytes of error flag.
More preferably, check value is CRC8 check value, the preceding form of check results low level of employing.
The invention has the beneficial effects as follows:Compared with existing communication technology, the present invention is directed to the spy of power line carrier communication Property, there is provided a kind of power-line carrier communication method, after long data is divided into short data to form one group of packet by sender, Send successively by default interval time, after recipient's receiving data bag, continuous using length check, check value verification and Bale No. Property verification method confirm data, the efficient communication time in carrier communication that solves is short to be difficult to transmit, and channel disturbance is big, and data is held Error-prone technical problem is it is ensured that the accuracy of transmission data and integrity.
Brief description
Fig. 1 is embodiment of the present invention power-line carrier communication method flow chart.
Specific embodiment
The present invention is further described with reference to the accompanying drawings and examples.
Embodiment:
As shown in figure 1, a kind of power-line carrier communication method provided in an embodiment of the present invention, method is as follows:Sender adopts One long packet is divided into the short packages being a group with 6 bytes, we are short at each by mode first that sent with subpackage The subpackage serial number of 1 byte is added, for representing which subpackage this is, for ensureing the process of communication before packet Whether disturbed can check, the data of the subpackage serial number of 1 byte and 6 bytes is carried out CRC8 verification by us, For 1 byte as last 1 byte of packet, such a complete packet is exactly 8 bytes to CRC8 check value.8 The transmission time of byte is about 200ms.The success rate sending than not subpackage by calculating in one second improves 5 times.Sender presses Time interval according to 200ms is unwrapped to originate from the 1st data and is delivered to last packet.
For recipient, it is first determined whether be last packet, if last packet, then only Need through check value verification and the verification of Bale No. seriality, because last packet not necessarily has the data of 6 bytes.As Fruit is not last packet, then need to verify through data packet length, if packet is not 8 bytes, packet is described Error, sends error bag;If 8 bytes then enter check value verification, if check value is not to illustrating that packet malfunctions, send out Send wrong bag;If check value is correctly, enter the verification of Bale No. seriality, if it find that discontinuous with previous Bale No., then number is described According to bag error, send error bag request sender and retransmit a upper packet, if Bale No. continuously, judges whether to finish receiving, If Bale No. is FF, illustrate that data transfer flow process terminates, if not be then failure to actuate continuing to.
For saving networked communication resource, do not initiate to determine bag, the bag of corresponding verification failure, recipient to verifying correct bag Inform which bag data of sender has malfunctioned it is desirable to retransmit by initiating error bag.So ensure that whole communication is controlled, and high Effect.Communication protocol more simplifies, and error bag includes:Error Bale No.+error flag+check value, totally 3 bytes.
The data pack protocol that sender sends is as follows:
As agreement regulation, maximum can send out 250 packets, 250*6=1500 byte, can the longest transmission more than 1K data Length, fully meets application demand.
Last bag Bale No. is 255, notifies this group packet of recipient to distribute.
The error packet protocol that recipient returns is as follows:
As agreement regulation, head byte return error Bale No., the 2nd byte returns error flag, for error flag 1 and 2, sends out This bag will be retransmitted after receiving by the side of sending, and for error flag 3, sender will retransmit the content of a upper Bale No. after receiving.As received Side is not received by error bag, also will continue to receive Bale No. discontinuous error bag.
Embodiment 1:
A direction B side sends data:68 17 91 72 00 00 00 68 11 04 33 34 34 35 D1 16.
More than need data totally 16 bytes sending, require to be divided into 3 bags according to subpackage:
First bag data (16 system) is as follows:
Bale No. Data 1 Data 2 Data 3 Data 4 Data 5 Data 6 CRC8
01 68 17 91 72 00 00 BF
Second bag data (16 system) is as follows:
Bale No. Data 1 Data 2 Data 3 Data 4 Data 5 Data 6 CRC8
02 00 68 11 04 33 34 D4
3rd bag data (16 system) is as follows:
Bale No. Data 1 Data 2 Data 3 Data 4 CRC8
FF 34 35 D1 16 C9
As three guarantees find have crc value to malfunction, then B return error bag is as follows:
Bale No. Error reason CRC8 (low level)
03 01 26
Embodiment 2:
A inquires about data to B, and B returns inquiry data to A, and data is as follows:68 17 91 72 00 00 00 68 91 06 33 34 34 35 B5 54 5A 16.
More than data to be sent totally 18, install subpackage and require to be divided into following 3 bags.
First bag returned data (16 system) is as follows:
Bale No. Data 1 Data 2 Data 3 Data 4 Data 5 Data 6 CRC8
01 68 17 91 72 00 00 BF
Second bag returned data (16 system) is as follows:
Bale No. Data 1 Data 2 Data 3 Data 4 Data 5 Data 6 CRC8
02 00 68 91 06 33 34 DD
Three guarantees returned data (16 system) is as follows:
Bale No. Data 1 Data 2 Data 3 Data 4 Data 5 Data 6 CRC8
FF 34 35 B5 54 5A 16 A5
If A checks the 3rd and is surrounded by the discontinuous mistake of Bale No., will send out wrong bag as follows:
Bale No. Error reason CRC8
03 03 C5
The 2nd bag data will be retransmitted by B side, and the 2nd bag returned data is as follows:
Bale No. Data 1 Data 2 Data 3 Data 4 Data 5 Data 6 CRC8
02 00 68 91 06 33 34 DD
As data above, initiator and recipient can exchange, different according to identity, automatic switchover agreement.Send The packet CRC8 that side sends verifies all bytes that scope is Bale No.+data, and the error bag verification scope that recipient sends is All bytes of error Bale No.+error flag, CRC8 result is the form at front (LSB First) for the low level.
The above, only best mode for carrying out the invention, any those familiar with the art is in the present invention In the technical scope disclosing, the simple change of the technical scheme that can become apparent to or equivalence replacement each fall within the present invention's In protection domain.

Claims (8)

1. a kind of power-line carrier communication method is it is characterised in that include:
S1:Sender, according to default time interval, sends one group of packet successively, and the structure of described packet includes:Bale No.+ Data text+check value;
S2:Recipient receives packet, determines whether last packet of this group, if then entering step S4;If it is not, Then enter next step;
S3:Recipient carries out length check to packet, if size error, sends error bag, request sender retransmits this bag; If length is correct, enter next step;
S4:Recipient carries out check value verification to packet, if check value mistake, sends error bag, request sender retransmit This bag;If check value is correct, enter next step;
S5:Recipient carries out Bale No. seriality verification to packet, if Bale No. is discontinuous, sends error bag, asks sender Retransmit the Shang Yibao of this bag;If Bale No. is continuous, enter next step;
S6:Judge whether to finish receiving this group packet, if it is not, being then failure to actuate;If so, then receive and terminate.
2. power-line carrier communication method according to claim 1 is it is characterised in that the Bale No. of described packet is 1 Byte, data text are 6 bytes, and check value is 1 byte.
3. power-line carrier communication method according to claim 2 is it is characterised in that the check value of described packet is should The check value of all bytes of packet Bale No. data text.
4. power-line carrier communication method according to claim 1 is it is characterised in that described default time interval is 200ms.
5. power-line carrier communication method according to claim 1 is it is characterised in that the structure of described error bag includes: Error Bale No.+error flag+check value, Bale No. is 1 byte, and error flag is 1 byte, and check value is 1 byte.
6. power-line carrier communication method according to claim 5 is it is characterised in that described error flag byte includes counting Represent according to 01,02 and 03,01 that check value is wrong, 02 represents size error, 03 to represent Bale No. discontinuous.
7. power-line carrier communication method according to claim 5 is it is characterised in that the test value of described error bag is should The error Bale No. of error bag and the check value of all bytes of error flag.
8. the power-line carrier communication method according to claim 3 or 7 is it is characterised in that described check value is CRC8 school Test value, using the preceding form of check results low level.
CN201610817858.6A 2016-09-12 2016-09-12 Power line carrier communication method Pending CN106385305A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610817858.6A CN106385305A (en) 2016-09-12 2016-09-12 Power line carrier communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610817858.6A CN106385305A (en) 2016-09-12 2016-09-12 Power line carrier communication method

Publications (1)

Publication Number Publication Date
CN106385305A true CN106385305A (en) 2017-02-08

Family

ID=57936459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610817858.6A Pending CN106385305A (en) 2016-09-12 2016-09-12 Power line carrier communication method

Country Status (1)

Country Link
CN (1) CN106385305A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112511587A (en) * 2020-10-23 2021-03-16 许继集团有限公司 Communication data processing method and device for power distribution network differential service
CN113572578A (en) * 2021-07-28 2021-10-29 南方电网数字电网研究院有限公司 TCP data transmission method, device, equipment and medium based on data middlebox

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101115055A (en) * 2006-07-24 2008-01-30 上海贝尔阿尔卡特股份有限公司 Device and method for reporting all-level error in tunnel data package of communication network
CN102143073A (en) * 2011-03-23 2011-08-03 深圳创维数字技术股份有限公司 Data transmission method and system
CN102413008A (en) * 2011-11-16 2012-04-11 航天科工深圳(集团)有限公司 Power-104-protocol-based testing method and system
CN102983884A (en) * 2011-09-05 2013-03-20 国民技术股份有限公司 A method for transmitting data via a magnetic channel

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101115055A (en) * 2006-07-24 2008-01-30 上海贝尔阿尔卡特股份有限公司 Device and method for reporting all-level error in tunnel data package of communication network
CN102143073A (en) * 2011-03-23 2011-08-03 深圳创维数字技术股份有限公司 Data transmission method and system
CN102983884A (en) * 2011-09-05 2013-03-20 国民技术股份有限公司 A method for transmitting data via a magnetic channel
CN102413008A (en) * 2011-11-16 2012-04-11 航天科工深圳(集团)有限公司 Power-104-protocol-based testing method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112511587A (en) * 2020-10-23 2021-03-16 许继集团有限公司 Communication data processing method and device for power distribution network differential service
CN112511587B (en) * 2020-10-23 2024-02-09 许继集团有限公司 Communication data processing method and device for power distribution network differential service
CN113572578A (en) * 2021-07-28 2021-10-29 南方电网数字电网研究院有限公司 TCP data transmission method, device, equipment and medium based on data middlebox
CN113572578B (en) * 2021-07-28 2023-06-30 南方电网数字电网研究院有限公司 TCP data transmission method, device, equipment and medium based on data center

Similar Documents

Publication Publication Date Title
CN106027412A (en) TCP (Transmission Control Protocol) congestion control method based on congestion queue length
CN104038316B (en) The highly reliable timeliness asynchronous serial communication method high of space camera
CN103973406B (en) Controller area network bus speeding-up method
CN104025690A (en) Method and user equipment for adjusting sending time
CN101321046A (en) System and method for communicating data in xDSL using data retransmission
CN106031072A (en) Harq frame data structure and method of transmitting and receiving with harq in systems using blind detection
CN110224914B (en) Method and system for data aggregation in industrial communication protocols
CN106788894A (en) Segmentation individual transmission method of calibration
WO2022206116A1 (en) Method for controlling retransmission in physical layer
CN106658223A (en) Video uplink transmission method and video uplink transmission device in long-term evolution LTE network
CN106385305A (en) Power line carrier communication method
CN103544128A (en) Inter-chip single signal line communication method, device and system
CN106656424A (en) Verification method of data transmission
CN104429013B (en) Method, user equipment and the base station of transmitting feedback information
CN110493227A (en) A kind of data frame transmission method and system
CN110430008A (en) Civil aviaton's flight telegram check system and method based on cyclic redundancy check algorithm
CN104579605B (en) A kind of data transmission method and device
CN103999394B (en) Data retransmission and feedback methods, and corresponding apparatus
CN102315923B (en) Radio link control method of 3G (The 3rd Generation) satellite communication system
CN103825689B (en) Delay determinacy message retransmission method with local cache
CN102546096B (en) Real-time multicasting self-adaptation optimization method based on unequal error protection
CN107770020A (en) A kind of communication means and device based on spaceborne FlexRay dual channel bus
CN109547170A (en) Data transmission method, network side equipment and communication system
CN106911428A (en) The transmission method and device of information
CN109150416A (en) Data transmission method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170208