CN115277292A - Two-wire system inter-device communication method based on network coding - Google Patents
Two-wire system inter-device communication method based on network coding Download PDFInfo
- Publication number
- CN115277292A CN115277292A CN202210867668.0A CN202210867668A CN115277292A CN 115277292 A CN115277292 A CN 115277292A CN 202210867668 A CN202210867668 A CN 202210867668A CN 115277292 A CN115277292 A CN 115277292A
- Authority
- CN
- China
- Prior art keywords
- data
- slave
- slave device
- network
- master device
- 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
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40006—Architecture of a communication node
- H04L12/40019—Details regarding a bus master
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention discloses a two-line system equipment communication method based on network coding, in the network communication of a single bus, a master device sends a query signal to a slave device, the slave device receives the query information and carries out data reply to the master device, and message data sent by the slave device and address information of the slave device are stored; the master device respectively reads the data sent by the slave devices, and each slave device performs network operation on the received broadcast data with the second zone bit and the data stored by the slave device to obtain the data interacted between the slave devices. Compared with the standard 1Wire operation process, the communication method between the two-Wire system equipment based on the network coding reduces the interaction times, saves the transmission data volume and improves the communication efficiency. Compared with the traditional route transmission, the network coding improves the throughput of the network and improves the bandwidth utilization rate.
Description
Technical Field
The present invention relates to the field of data communications. More particularly, the present invention relates to a two-wire system inter-device communication method based on network coding.
Background
The 1-Wire single bus protocol is a bus standard, and the small number of lines is characterized in that: only one physical line is used in addition to the ground line to transmit both the clock and the data. 1-Wire is suitable for a single master system, capable of controlling one or more slave devices. The master device may be a microcontroller and the slave device may be a single bus device. The 1-Wire protocol supports communication between a master device and a slave device but does not directly support communication between the slave devices, if information of one of the slave devices is to be transmitted to another slave device, communication needs to be performed 6 times according to a standard 1Wire operation process, taking fig. 2 as an example, C is the master device, a and B are the slave devices, and an interaction flow includes:
s11, the master device sends a reset signal, and the master device judges whether the slave device is hung on the current bus or not in the period;
s12, performing bus reading operation, and reading the data (a, alpha) sent from the slave A by the master C from the bus1);
S13, performing bus writing operation, wherein the master device C writes data into the slave device B, and the slave device B receives the data alpha1;
S14, the master device sends a reset signal, and the master device judges whether the slave device is hung on the current bus or not in the period;
s15, bus reading operation is carried out, and the master C reads the data (B, beta) sent by the slave B from the bus1);
S16, performing bus writing operation, wherein the master device C writes data into the slave device A, and the slave device A receives the data beta1。
The interactive contents in the interactive flow of fig. 2 include:
1: data from master C inquiring slave a, including command code and device ID of a:
101000011100000100101111001100010110110000010010110011000001110100101101;
2: the data sent from device a to reply to host C, including the command code and device ID of a and the packet to be transmitted:
10100011110000010010111100110001011011000001001011001100000111010010110110110010010000001110011101111101110111001010001110111011010001110100110010011101;
3: data from master C inquiring slave B, including command code and device ID of B:
1010000111000010101101011101010011010101011001011110001111110010 00011101;
4: data from the slave B in reply to the host C, including the command code and the device ID of B and the packet to be transmitted:
10100011110000101011010111010100110101010110010111100011111100100001110110110010010000001111101110010110110101101000101000110010011101010100010100000000;
5: writing data sent from the slave a to the slave B, which is sent from the host C, including a command code and the slave ID of B and a packet:
10100010110000101011010111010100110101010110010111100011111100100001110110110001010000001110011101111101110111001010001110111011010001110100110010011101;
6: writing data sent from the slave B to the slave a, which is sent from the host C, including a slave ID of a and a command code:
10100010110000010010111100110001011011000001001011001100000111010010110110110001010000001111101110010110110101101000101000110010011101010100010100000000。
it can be known from the above that, the standard single bus data transmission resource structure is simple, but the data information transmitted between the devices by the structure is single, which increases the time cost of network communication, increases the data amount to be transmitted, and limits the efficiency and speed.
The network coding is a set of coding theory in information theory, it provides that data can be processed by intermediate nodes in network transmission to bring extra gain, and the butterfly network model explains the basic principle of network coding. Fig. 1 is a "butterfly network" model in network coding. As shown in fig. 1, point S is the source node, Y and Z are the sink nodes, and the rest are intermediate nodes. The traditional routing transmission selects one of the received information b1 and b2 at the node W for forwarding, which makes the throughput of the network smaller and affects the bandwidth utilization.
Disclosure of Invention
An object of the present invention is to solve at least the above problems and/or disadvantages and to provide at least the advantages described hereinafter.
To achieve these objects and other advantages and in accordance with the purpose of the invention, there is provided a two-wire system inter-device communication method based on network coding, in which a master device distinguishes slave devices by setting corresponding first flag bits at a header position of transmission data in network communication of a single bus, including:
step one, the master device sends an inquiry signal with a first zone bit to the slave device, the slave device receives the inquiry information and carries out data reply to the master device, and message data sent by the slave device and address information of the slave device are stored;
step two, the master device respectively reads the data sent by the slave devices and sends the broadcast data with the second zone bit to each slave device, and each slave device performs network operation on the received broadcast data with the second zone bit and the data stored by the slave device to obtain data interacted between the slave devices;
in the second step, after the master device reads the data that the slave devices need to interact with each other, the master device performs the previous network operation on each slave device and each reply data, so that the slave device at the receiving end identifies the slave device address information and the message data at the transmitting end from the broadcast data.
Preferably, in step two, the network operation processing is configured to employ an exclusive or operation.
Preferably, in the first step, the master device sends an inquiry signal for reset to determine whether a slave device is currently hooked on the bus each time the master device performs data communication using the bus.
The invention at least comprises the following beneficial effects: on the basis of the communication between the master device and the slave device, the communication between the slave device and the slave device based on the network coding method is further realized, and finally, the communication between any two devices in the 1Wire is realized. Compared with the standard 1Wire operation process, the method reduces the interaction times, saves the transmission data volume and improves the communication efficiency. Compared with the traditional route transmission, the network coding improves the throughput of the network and improves the bandwidth utilization rate.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention.
Drawings
FIG. 1 is a "butterfly network" model in the network coding of the present invention;
FIG. 2 is a prior art single bus data standard interaction flow;
FIG. 3 is a flow chart of single bus data interaction after the improvement of network coding according to the present invention.
Detailed Description
The present invention is described in further detail below with reference to the attached drawings so that those skilled in the art can implement the invention by referring to the description text.
On the basis of the communication between the master device and the slave device, the communication between the slave device and the slave device based on the network coding method is further realized, and finally, the communication between any two devices in the 1Wire is realized. Compared with the standard 1Wire operation process, the method reduces the interaction times, saves the transmission data volume and improves the communication efficiency.
The butterfly network model in the network coding of the invention is shown in figure 1, wherein a point S is a source node, Y and Z are sink nodes, and the rest are intermediate nodes. The point W performs a store and forward operation and performs modulo two addition (exclusive or) on the input information, then sends the operation result to the output link WX, and then passes through the links XY and XZ again, finally reaching the sinks Y and Z. In the conventional routing, one of the received information b1 and b2 is selected to be forwarded at the node W, and the network coding technique is adopted to perform an exclusive-or operation on the received information b1 and b2 at the node W to obtain b1 × b2, and perform an exclusive-or operation on the received information (b 1 × b2, b 1) at the node Y to obtain b2. The xor operation of the received information (b 1 ≦ b2, b 2) at node Z yields b1. Compared with the traditional routing transmission, the network coding improves the throughput of the network and improves the bandwidth utilization rate. The network coding supports an exclusive-or operation (b 1 ≦ b2 ≦ b1= b2 ((b 1 ≦ b2= b 1).
The improved single bus data interaction flow by using network coding is shown in fig. 3, and the transmission efficiency will be increased after the improvement by using network calculus. In fig. 3, G is a master device, D and E are slave devices, in order to implement communication between specific devices, a flag bit is added to the transmission data at the head position of the transmission data, the data of the flag bit is 0x81 when the master device G communicates with the slave device E, and when the flag bit is received by E, the data is replied to G and the data sent by E is stored. When the master device G communicates with the slave device F, the data of the flag bit is 0x91, and when the F receives the flag bit, the F replies the data to the G and stores the data sent by the F. When G sends broadcast data, the flag bit data is 0xa0, when E and F receive the data with the flag bit, the data is received and is subjected to XOR operation with the data stored in the E and F, namely, the slave device identifies the broadcast data with the flag bit and is subjected to XOR operation, so that the address information and the message data of the target device are obtained. Specifically, the interaction flow includes:
s21, the master device sends a reset signal before each bus communication, and the master device can judge whether the slave device is hung on the current bus in the period, so the master device G sends the reset signal to the slave device E;
s22, bus read operation, master G reads data (E, alpha) sent from slave E from bus2) Where E is address information of the slave E, α2Message data sent for the slave device E;
s23, so the master G sends a reset signal to the slave F;
s24, bus reading operation is carried out, and the master G reads the data (F, beta) sent by the slave F from the bus2). At this time, the master device receives the data (e, α) from the a-transmitter2) And data (F, beta) from F2) And carrying out exclusive OR operation processing.
S25, carrying out bus writing operation, writing data into the host, and receiving data beta after the slave equipment E is operated2The slave B receives the data alpha after operation2;
The slave a processes the operation as follows:
(e⊕f)⊕e=f,(α2⊕β2)⊕α2=β2;
after XOR operation, A receives the data beta transmitted by B2。
Slave B processes the operation as follows:
(e⊕f)⊕f=e,(α2⊕β2)⊕β2=α2;
after XOR operation, B receives the data alpha transmitted by A2。
The interactive content of fig. 3 improved by using network coding is as follows:
1: the data from master C inquiring slave a includes command code and flag bits 0x81 and device ID of a:
100000011100000100101111001100010110110000010010110011000001110100101101;
2: data from the slave a replying to the host C, including the command code and the device ID of a and the packet to be transmitted:
10100011110000010010111100110001011011000001001011001100000111010010110110110010010000001110011101111101110111001010001110111011010001110100110010011101;
3: the data for querying the slave B sent by the master C includes the command code and the device ID of flag bits 0x91 and B:
100100011100001010110101110101001101010101100101111000111111001000011101;
4: data sent from device B in reply to host C, including the command code and device ID of B and the packet to be transmitted:
10100011110000101011010111010100110101010110010111100011111100100001110110110010010000001111101110010110110101101000101000110010011101010100010100000000;
5: the broadcast message sent by the master device C includes a command code and a flag bit 0xa0, and the slave device a and the slave device B receive data and perform an exclusive or operation:
1010000000100000011100110101110010110111001011101110010111111101111001100000001110011101011000010100010100110001001001100100000100110011101。
for the master device G, the network coding calculation thereof includes:
extracting necessary interactive information in the following interactive processes through the interactive contents, wherein the interactive information comprises address information:
e:
1100000100101111001100010110110000010010110011000001110100101101
f:
1100001010110101110101001101010101100101111000111111001000011101
message information:
α2:1110011101111101110111001010001110111011010001110100110010011101
β2:1111101110010110110101101000101000110010011101010100010100000000
the arithmetic processing for address information calculation includes:
1. e ≧ f computation procedure of address information:
e:
1100000100101111001100010110110000010010110011000001110100101101;
f:1100001010110101110101001101010101100101111000111111001000011101;
e⊕f:
001110011010111001011011100101110111001011111110111100110000;
the alpha 2 and beta 2 calculation process of the message content comprises the following steps:
α2:1110011101111101110111001010001110111011010001110100110010011101;
β2:1111101110010110110101101000101000110010011101010100010100000000;
α2⊕β2:0001110011101011000010100010100110001001001100100000100110011101;
the transmission information of step 5 of fig. 3 consists of: e ^ f, alpha 2 ^ beta 2
Respectively corresponding to the sequences:
001110011010111001011011100101110111001011111110111100110000;
0001110011101011000010100010100110001001001100100000100110011101;
e, the network coding calculation content comprises:
storing the address information E of the device E and the information alpha 2 sent by the device E, and when the E receives the information (E ^ F, alpha 2 ^ beta 2) sent by G, calculating the content sent by F, including F and beta 2, by the E according to a formula in the interactive process.
Address information calculation
e⊕(e⊕f)=f
=1100001010110101110101001101010101100101111000111111001000011101;
Message content calculation
α2⊕(α2⊕β2)=β2
=1111101110010110110101101000101000110010011101010100010100000000;
F, storing the address information F of the device F and the information beta 2 sent by the device F, and when F receives the information (E [. Gtf,. Alpha.2eta.2) sent by G, F calculates the content sent by E according to a formula in the interactive process, wherein the content comprises E and alpha 2.
1. Address: information calculation, f bola (e bolaf) = e
=1100000100101111001100010110110000010010110011000001110100101101;
2. Reporting: and (3) calculating the content:
β2⊕(α2⊕β2)=α2
=1110011101111101110111001010001110111011010001110100110010011101。
through the interaction mode, the interaction content and the network coding calculation at the positions G, E and F, the communication between the slave equipment E and F is realized, and the communication specifically comprises the acquisition of the address information of the other side and the message content of the other side.
The method improved based on the network coding changes the information interaction process between the slave devices from 6 steps to 5 steps, and the data after the network coding carries more information, for example, when the transmitted data is 1Byte without the network coding, the actually transmitted information is only 1Byte; when the data transmitted after network coding is 1Byte, the actually transmitted information is equivalent to 2Byte. This reduces the number of interactions, saves the amount of data transmitted, and improves communication efficiency.
The above scheme is merely illustrative of a preferred example, and is not limiting. When the invention is implemented, appropriate replacement and/or modification can be carried out according to the requirements of users.
The number of apparatuses and the scale of the process described herein are intended to simplify the description of the present invention. Applications, modifications and variations of the present invention will be apparent to those skilled in the art.
While embodiments of the invention have been disclosed above, it is not intended to be limited to the uses set forth in the specification and examples. It can be applied to all kinds of fields suitable for the present invention. Additional modifications will readily occur to those skilled in the art. It is therefore intended that the invention not be limited to the exact details and illustrations described and illustrated herein, but fall within the scope of the appended claims and equivalents thereof.
Claims (3)
1. A communication method between two-wire system devices based on network coding is characterized in that in single-bus network communication, a master device distinguishes each slave device by setting a corresponding first flag bit at the head position of transmission data, and the method comprises the following steps:
step one, a master device sends a query signal with a first zone bit to a slave device, the slave device receives the query information and carries out data reply to the master device, and message data sent by the slave device and address information of the slave device are stored;
step two, the master device respectively reads the data sent by the slave devices and sends the broadcast data with the second zone bit to each slave device, and each slave device carries out network operation processing on the received broadcast data with the second zone bit and the self-stored data to obtain data interacted between the slave devices;
in the second step, after the master device reads the data that the slave devices need to interact with, the master device performs the previous network operation on each slave device and each reply data, so that the slave device at the receiving end identifies the address information and the message data of the slave device at the transmitting end from the broadcast data.
2. The network coding-based two-wire system inter-device communication method according to claim 1, wherein in step two, the network arithmetic processing is configured to employ an exclusive or operation.
3. The two-wire system inter-device communication method based on network coding according to claim 1, wherein in the first step, the master device sends a query signal for reset to determine whether any slave device is currently hung on the bus each time the master device performs data communication using the bus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210867668.0A CN115277292A (en) | 2022-07-22 | 2022-07-22 | Two-wire system inter-device communication method based on network coding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210867668.0A CN115277292A (en) | 2022-07-22 | 2022-07-22 | Two-wire system inter-device communication method based on network coding |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115277292A true CN115277292A (en) | 2022-11-01 |
Family
ID=83767797
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210867668.0A Pending CN115277292A (en) | 2022-07-22 | 2022-07-22 | Two-wire system inter-device communication method based on network coding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115277292A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6467065B1 (en) * | 1999-07-09 | 2002-10-15 | Delphi Technologies, Inc. | Master/slave control system and method |
US20110134828A1 (en) * | 2008-08-15 | 2011-06-09 | Telefonaktiebolaget Lm Ericsson (Publ) | Relay Node Selection for Network Coding |
CN103095439A (en) * | 2013-01-10 | 2013-05-08 | 周亚建 | Method and device of two-way cooperation relay transmission data based on network coding |
CN103974027A (en) * | 2014-05-26 | 2014-08-06 | 中国科学院上海高等研究院 | Multiport-to-multiport real-time communication method and system |
CN103973404A (en) * | 2014-04-04 | 2014-08-06 | 熊猫电子集团有限公司 | CPCI (compact peripheral component interconnect) bus based network code controller |
US20150358118A1 (en) * | 2013-02-28 | 2015-12-10 | Aalborg Universitet | Method, Apparatus, And Protocol For Improving Performance In A Wireless Network |
-
2022
- 2022-07-22 CN CN202210867668.0A patent/CN115277292A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6467065B1 (en) * | 1999-07-09 | 2002-10-15 | Delphi Technologies, Inc. | Master/slave control system and method |
US20110134828A1 (en) * | 2008-08-15 | 2011-06-09 | Telefonaktiebolaget Lm Ericsson (Publ) | Relay Node Selection for Network Coding |
CN103095439A (en) * | 2013-01-10 | 2013-05-08 | 周亚建 | Method and device of two-way cooperation relay transmission data based on network coding |
US20150358118A1 (en) * | 2013-02-28 | 2015-12-10 | Aalborg Universitet | Method, Apparatus, And Protocol For Improving Performance In A Wireless Network |
CN103973404A (en) * | 2014-04-04 | 2014-08-06 | 熊猫电子集团有限公司 | CPCI (compact peripheral component interconnect) bus based network code controller |
CN103974027A (en) * | 2014-05-26 | 2014-08-06 | 中国科学院上海高等研究院 | Multiport-to-multiport real-time communication method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2017212725A (en) | Network hub, transfer method, and on-vehicle network system | |
CN106878131B (en) | PROFIBUS coupler and data transmission method of PROFIBUS | |
WO2019010968A1 (en) | Multicast forwarding method, and related device | |
CN102185766A (en) | Unicast forwarding method and forwarding equipment for responding messages by DHCP (Dynamic host configuration protocol) server | |
CN103929377A (en) | Wired network and wireless network combined dispatching method and system and related devices | |
CN100377550C (en) | Routing table next-hop IP address to MAC address analytic method | |
CN113660191A (en) | Communication method for bridging MIL-STD-1553 and GJB1188B protocols through FC-AE-1553 protocol | |
US7026949B2 (en) | Method for transmitting and receiving messages in home appliance networking system | |
CN116405431A (en) | Data processing method, network node and computer readable storage medium | |
CN115277292A (en) | Two-wire system inter-device communication method based on network coding | |
CN101515892B (en) | Method for realizing multi-resource processing in peer-to-peer network, equipment and system thereof | |
JP3392599B2 (en) | Packet transmitting apparatus and packet transmitting / receiving system | |
Benito et al. | Performance evaluation of four field buses | |
CN110519145B (en) | Multi-master 485 route communication method and system based on bidirectional ring network | |
CN100454910C (en) | Communication in a data network | |
US4703473A (en) | Serial network architecture for user oriented devices | |
Do et al. | Redundancy method to solve CAN-FD bus line breakage problem | |
CN110474781A (en) | A kind of method and device of transmitting multicast data | |
JP4410247B2 (en) | Overhead reduction and address protection in the communication stack | |
EP3591535B1 (en) | Addressing mechanism | |
CN116886461A (en) | Communication protocol method based on CAN bus for improving communication efficiency | |
CN114915920B (en) | Message transmission method, device, robot and storage medium | |
CN114338127B (en) | Data transmission method and device for anonymous communication, electronic equipment and storage medium | |
US6178456B1 (en) | Method of communicating between a personal computer and a service provider | |
CN115277554A (en) | Transmission method and communication device for multicast data message |
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 |