CN113794538A - High-efficiency dual-computer communication feedback method - Google Patents

High-efficiency dual-computer communication feedback method Download PDF

Info

Publication number
CN113794538A
CN113794538A CN202110993405.XA CN202110993405A CN113794538A CN 113794538 A CN113794538 A CN 113794538A CN 202110993405 A CN202110993405 A CN 202110993405A CN 113794538 A CN113794538 A CN 113794538A
Authority
CN
China
Prior art keywords
data
feedback
linked list
receiving end
binary
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.)
Withdrawn
Application number
CN202110993405.XA
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.)
Hangzhou Jingyi Intelligent Science and Technology Co Ltd
Original Assignee
Hangzhou Jingyi Intelligent Science and 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 Hangzhou Jingyi Intelligent Science and Technology Co Ltd filed Critical Hangzhou Jingyi Intelligent Science and Technology Co Ltd
Priority to CN202110993405.XA priority Critical patent/CN113794538A/en
Publication of CN113794538A publication Critical patent/CN113794538A/en
Withdrawn legal-status Critical Current

Links

Images

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/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • 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
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Communication Control (AREA)

Abstract

A high-efficiency dual-computer communication feedback method is disclosed, a data sending end and a data receiving end which are connected through a serial port are arranged, a data packet is provided with a synchronous head, a data section and a check code, the data sending end is provided with a feedback waiting chain table, the data receiving end is provided with a data sending chain table, the synchronous head is provided with two feedback bits, and the dual-computer communication feedback method is provided with the following steps: a data sending end sends a data packet of a software task, enters a feedback waiting linked list and starts a timer; the data receiving end receives the data packet, carries out data verification on the data packet, and sets a feedback bit of a synchronization head of a first data packet of a data transmission linked list according to a verification result; the data receiving end is connected with a first data packet of a data transmission linked list; the data sending end receives the data packet, deletes or restarts the first software task of the feedback waiting linked list according to the value of the feedback bit, and stops the timing work of the timer; and when the timing time of the timer is up, the data sending end restarts the first software task of the feedback waiting linked list.

Description

High-efficiency dual-computer communication feedback method
Technical Field
The patent relates to a high-efficiency dual-computer communication feedback method, belonging to the technical field of computer communication.
Background
In a multi-machine system, information is exchanged between processors through a serial port, and a communication protocol including a format of a data packet and a feedback mechanism is designed for ensuring communication stability. The feedback mechanism is that after the data receiver receives the data packet, the data receiver sends a confirmation message to the data sender, which indicates that the received data is verified correctly or that the received data is verified incorrectly, and the data sender needs to resend the data packet. The feedback mechanism ensures that a data receiver receives correct data, but the feedback mechanism does not send application data, and pressure is caused to data communication under the conditions of frequent data receiving and sending and limited communication bandwidth.
Disclosure of Invention
The present invention aims to solve the above problems, and provides a high-efficiency dual-computer communication feedback method, which completes a feedback mechanism on the premise of not occupying communication bandwidth, and realizes reliable and high-efficiency data communication.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a high-efficiency dual-computer communication feedback method is provided, which comprises a data sending end and a data receiving end, wherein the data sending end and the data receiving end are connected through a serial port and can send and receive data packets with specified formats, the data packets are provided with a synchronous head, a data section and a check code, the data sending end is provided with a feedback waiting linked list, the feedback waiting linked list is set as a first-in first-out rule, the data receiving end is provided with a data sending linked list, the data sending linked list is set as a first-in first-out rule, the synchronous head is provided with two feedback bits, a binary system 00 is in a default state and indicates no feedback, a binary system 01 indicates correct data receiving, a binary system 10 indicates wrong data receiving, a binary system 11 is in a reserved state, and the dual-computer communication feedback method comprises the following steps:
(1) when the data sending end sends a data packet of the software task, adding the software task into the feedback waiting linked list, and starting a timer, wherein the timing time is the longest feedback waiting time of the software task;
(2) after the data receiving end receives the data packet, firstly checking the data transmission linked list, and if the data transmission linked list is empty, generating a data packet with an empty data segment; then, carrying out data verification on the received data packets, if the data packets are verified to be qualified, setting the feedback bit of the synchronization head of the first data packet of the data transmission linked list to be binary 01, and if the data packets are verified to be unqualified, setting the feedback bit of the synchronization head of the first data packet of the data transmission linked list to be binary 10;
(3) the data receiving end receives and sends a first data packet of the data sending linked list;
(4) after the data sending end receives the data packet, if the feedback bit is binary 01, deleting the first software task of the feedback waiting linked list, and stopping the timing work of the timer; if the feedback bit is binary 10, restarting the first software task of the feedback waiting linked list to transmit data, and stopping the timing work of the timer;
(5) and when the timing time of the timer is up, the data sending end restarts the first software task of the feedback waiting linked list and returns to the step (1).
When the data receiving end needs to send data, the data receiving end is set as a data sending end, and the data sending end is set as a data receiving end.
The invention has the following beneficial effects: in a multi-machine system, a feedback mechanism is completed on the premise of not occupying communication bandwidth, and reliable and efficient data communication is realized.
Drawings
Fig. 1 is a flow chart provided by the practice of this patent.
Detailed Description
For a better understanding of this patent, reference is made to the following detailed description taken in conjunction with the accompanying drawings.
Referring to fig. 1, in a multi-machine system, in order to improve data communication efficiency, a high-efficiency dual-machine communication feedback method is provided. The data transmitting terminal and the data receiving terminal are connected through a serial port and can transmit and receive data packets with specified formats, and the serial port can be set as a full-duplex serial port or a half-duplex serial port, so that implementation of patents is not influenced. The data packet is provided with a synchronous head, a data segment and a check code, the data segment is information to be sent, the check code is used for judging whether the data packet has errors, the synchronous head is used for explaining the initial position of the data packet, a two-bit feedback bit is set, a binary system 00 is in a default state and indicates no feedback, a binary system 01 indicates that data is received correctly, a binary system 10 indicates that the data is received incorrectly, and a binary system 11 is in a reserved state. When the feedback information does not need to be sent, the feedback bit is set to be binary 00; when the feedback information needs to be sent, the feedback bit is set to binary 01 or binary 10.
The data sending end is provided with a feedback waiting linked list which is set as a first-in first-out rule and used for storing software tasks for finishing a data sending process and waiting for feedback information of the data receiving end; the data receiving end is provided with a data transmission linked list which is set as a first-in first-out rule and used for storing a data packet to be transmitted.
The double-machine communication feedback method comprises the following steps:
(1) when the data sending end sends a data packet of the software task, adding the software task into the feedback waiting linked list, and starting a timer, wherein the timing time is the longest feedback waiting time of the software task;
and after the software task finishes sending the data packet, entering the feedback waiting linked list to wait for feedback information.
(2) After the data receiving end receives the data packet, firstly checking the data transmission linked list, and if the data transmission linked list is empty, generating a data packet with an empty data segment; then, carrying out data verification on the received data packets, if the data packets are verified to be qualified, setting the feedback bit of the synchronization head of the first data packet of the data transmission linked list to be binary 01, and if the data packets are verified to be unqualified, setting the feedback bit of the synchronization head of the first data packet of the data transmission linked list to be binary 10;
after the data receiving end receives the data packet, the first step is to ensure that the data transmission linked list at least has one data packet to be transmitted, if not, one data packet with empty data segment is added, so that feedback information can be added on the synchronization head. And secondly, carrying out data verification on the data packet, and setting binary information for the feedback bit according to a verification result.
(3) The data receiving end receives and sends a first data packet of the data sending linked list;
and the data receiving end sends a data packet with feedback information.
(4) After the data sending end receives the data packet, if the feedback bit is binary 01, deleting the first software task of the feedback waiting linked list, and stopping the timing work of the timer; if the feedback bit is binary 10, restarting the first software task of the feedback waiting linked list to transmit data, and stopping the timing work of the timer;
after the data sending end receives the data packet, firstly, the data sending end analyzes the synchronous head of the data packet, including judging whether the synchronous head conforms to a communication protocol or not, and analyzing the numerical value of the feedback bit to determine whether the software task waiting for feedback successfully ends a data sending task or restarts the data sending.
(5) And when the timing time of the timer is up, the data sending end restarts the first software task of the feedback waiting linked list and returns to the step (1).
And (5) aiming at the processing method of the first software task of the feedback waiting linked list under the condition of waiting timeout.
The data sending end and the data receiving end are relative to data sending and receiving, when the data receiving end needs to send data, the functions of the data sending end and the data receiving end are exchanged, the data receiving end is set as the data sending end, and the data sending end is set as the data receiving end. For a full-duplex serial port, data can be sent and received simultaneously, so that a processor in a multi-machine system can be the data sending end and the data receiving end.
In summary, in order to solve the problems of frequent data transceiving and limited communication bandwidth in a multi-machine system, a high-efficiency dual-machine communication feedback method is provided, in which a feedback bit is added in the existing communication protocol, and a feedback mechanism is completed on the premise of not occupying the communication bandwidth, thereby realizing reliable and high-efficiency data communication.

Claims (2)

1. A high-efficiency dual-computer communication feedback method is provided, a data sending end and a data receiving end are arranged, the data sending end and the data receiving end are connected through a serial port and can send and receive data packets with specified formats, the data packets are provided with synchronous heads, data sections and check codes, and the method is characterized in that: the data sending end is provided with a feedback waiting linked list, the feedback waiting linked list is set as a first-in first-out rule, the data receiving end is provided with a data sending linked list, the data sending linked list is set as a first-in first-out rule, the synchronization head is provided with two feedback bits, binary 00 is in a default state and indicates no feedback, binary 01 indicates that data is correctly received, binary 10 indicates that data is incorrectly received, binary 11 is in a reserved state, and the dual-computer communication feedback method comprises the following steps:
(1) when the data sending end sends a data packet of the software task, adding the software task into the feedback waiting linked list, and starting a timer, wherein the timing time is the longest feedback waiting time of the software task;
(2) after the data receiving end receives the data packet, firstly checking the data transmission linked list, and if the data transmission linked list is empty, generating a data packet with an empty data segment; then, carrying out data verification on the received data packets, if the data packets are verified to be qualified, setting the feedback bit of the synchronization head of the first data packet of the data transmission linked list to be binary 01, and if the data packets are verified to be unqualified, setting the feedback bit of the synchronization head of the first data packet of the data transmission linked list to be binary 10;
(3) the data receiving end receives and sends a first data packet of the data sending linked list;
(4) after the data sending end receives the data packet, if the feedback bit is binary 01, deleting the first software task of the feedback waiting linked list, and stopping the timing work of the timer; if the feedback bit is binary 10, restarting the first software task of the feedback waiting linked list to transmit data, and stopping the timing work of the timer;
(5) and when the timing time of the timer is up, the data sending end restarts the first software task of the feedback waiting linked list and returns to the step (1).
2. The method as claimed in claim 1, wherein the method further comprises: when the data receiving end needs to send data, the data receiving end is set as a data sending end, and the data sending end is set as a data receiving end.
CN202110993405.XA 2021-08-27 2021-08-27 High-efficiency dual-computer communication feedback method Withdrawn CN113794538A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110993405.XA CN113794538A (en) 2021-08-27 2021-08-27 High-efficiency dual-computer communication feedback method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110993405.XA CN113794538A (en) 2021-08-27 2021-08-27 High-efficiency dual-computer communication feedback method

Publications (1)

Publication Number Publication Date
CN113794538A true CN113794538A (en) 2021-12-14

Family

ID=78876565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110993405.XA Withdrawn CN113794538A (en) 2021-08-27 2021-08-27 High-efficiency dual-computer communication feedback method

Country Status (1)

Country Link
CN (1) CN113794538A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760010A (en) * 2022-04-02 2022-07-15 沈阳飞机设计研究所扬州协同创新研究院有限公司 Reliable serial port data transmission method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760010A (en) * 2022-04-02 2022-07-15 沈阳飞机设计研究所扬州协同创新研究院有限公司 Reliable serial port data transmission method

Similar Documents

Publication Publication Date Title
CN112910856A (en) Communication protocol design method based on serial port communication
CN101047484B (en) Transmission layer retransmission method and system
US5309562A (en) Method and apparatus for establishing protocol spoofing from a modem
CN100366029C (en) Communication controller, host-side controller, communication equipment, communication system and method
KR100703504B1 (en) Arq system and method in a wireless communication system
CN108512785B (en) Data transmission protocol method
CN102804665B (en) System and method for supporting higher-layer protocol messaging in an in-band modem
CN110990312B (en) Chip-level data communication method for detection while drilling
CN105657646A (en) Bluetooth 4.0 based device-to-device big data communication method
CN111641638A (en) Data transmission method and related device
CN105183687A (en) Time-sharing serial communication method and system
CN113794538A (en) High-efficiency dual-computer communication feedback method
EP0158645A1 (en) Data communication method and circuitry.
CN101605128A (en) The method that the LINUX master-slave equipment communicates by Ethernet interface
CN110618900A (en) UART data transmission method
WO2024031995A1 (en) Data interaction method based on near field communication
CN106100804A (en) A kind of digital fountain decoding transmission method based on Sr-ARQ
CN101730137B (en) Data processing method and system
CN110099028A (en) A kind of method and device of serial data transmission
CN110430023B (en) Data transmission method suitable for SpaceWire bus communication
WO2012155703A1 (en) Link parameter autonegotiation method, terminal and system based on hdlc protocol
US20050074057A1 (en) System and method for modulation on demand in a computing device
CN113672545B (en) Method and device for transmitting power data between dual processors
CN108809845B (en) A kind of data transmission stream amount control method based on FC
CN113572569B (en) Transmission rate switching method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20211214