CN112134657A - Two-way asynchronous message transmission method based on perception and retransmission - Google Patents

Two-way asynchronous message transmission method based on perception and retransmission Download PDF

Info

Publication number
CN112134657A
CN112134657A CN202010957704.3A CN202010957704A CN112134657A CN 112134657 A CN112134657 A CN 112134657A CN 202010957704 A CN202010957704 A CN 202010957704A CN 112134657 A CN112134657 A CN 112134657A
Authority
CN
China
Prior art keywords
data
message
feedback message
data message
feedback
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
CN202010957704.3A
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.)
Anyang Normal University
Original Assignee
Anyang Normal University
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 Anyang Normal University filed Critical Anyang Normal University
Priority to CN202010957704.3A priority Critical patent/CN112134657A/en
Publication of CN112134657A publication Critical patent/CN112134657A/en
Pending 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/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
    • H04L1/1671Details of the supervisory signal the supervisory signal being transmitted together with control information
    • H04L1/1678Details of the supervisory signal the supervisory signal being transmitted together with control information where the control information is for timing, e.g. time stamps
    • 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
    • H04L1/1848Time-out mechanisms
    • 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
    • H04L1/188Time-out mechanisms

Abstract

The invention provides a two-path asynchronous message transmission method based on perception and retransmission, which comprises the following steps: a transmission step: setting an overtime retransmission identifier for a data message to be sent in a sending end database; asynchronously sending data messages to a data receiving end; receiving a feedback message which is generated by a data receiving end based on the data message and is sent asynchronously, and adding the feedback message into a first feedback message queue; taking out the feedback message from the first feedback message queue for processing, and updating the data transmission state of the overtime retransmission identifier corresponding to the data message in the database of the sending end; and (3) retrieval step: regularly searching and identifying the data transmission state in the overtime retransmission identification in the sending end database; judging whether to execute a transmission step on the current data message according to the data transmission state; if yes, executing the transmission step. The invention not only has high reliability of the synchronous message transmission method, but also has high efficiency of the asynchronous message transmission method.

Description

Two-way asynchronous message transmission method based on perception and retransmission
Technical Field
The invention relates to the technical field of remote filing of mass scientific data, in particular to a high-speed high-reliability remote filing data two-way asynchronous message transmission method for realizing sensing and retransmission functions of all or part of mass scientific data from one data center to another data center.
Background
With the development of information technology and the improvement of the sensitivity of large scientific instruments, scientific data generated by the large scientific instruments exponentially increases, and further, a high-speed and high-reliability remote filing data transmission system for remotely filing and transmitting mass scientific data from a scientific data center where a data acquisition station is located to a scientific data center in other areas presents a huge challenge. The current remote filing data transmission system is mainly based on a synchronous message transmission method and an asynchronous message transmission method.
However, although the synchronous message transmission method can realize a high-reliability remote archival data transmission system between a data message sender and a data message receiver, the synchronous message transmission method loses continuous high-speed transmission performance to a certain extent because the data message sender needs to wait for the data message receiver to send a feedback message every time the data message sender sends a data message. Meanwhile, although the asynchronous message transmission method can obtain high-speed data transmission performance at the data message sender and the data message receiver, it cannot ensure that the data message receiver can completely receive all data messages sent by the data message sender, so that the asynchronous message transmission loses high reliability to a certain extent.
Therefore, how to provide a two-way asynchronous message transmission method based on sensing and retransmission functions, which can satisfy high-speed transmission performance and ensure that a data message receiver can completely receive all data messages sent by a data message sender is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, the present invention provides a two-way asynchronous message transmission method with sensing and retransmission functions, which has high speed and high reliability.
In order to achieve the purpose, the invention adopts the following technical scheme:
a two-way asynchronous message transmission method based on perception and retransmission comprises the following steps:
a transmission step:
s11, setting an overtime retransmission identifier for the data message to be sent in a sending end database;
s12, asynchronously sending data messages to a data receiving terminal;
s13, receiving a feedback message which is generated and asynchronously sent by the data receiving terminal based on the data message, and adding the feedback message into a first feedback message queue;
s14, taking out the feedback message from the first feedback message queue for processing, and updating the data transmission state of the overtime retransmission identifier corresponding to the data message in the sending end database;
and (3) retrieval step:
s21, regularly searching and identifying the data transmission state in the overtime retransmission identifier in the database of the sending terminal;
s22, judging whether to execute the transmission step to the current data message according to the data transmission state; if so, S12-S14 are executed.
Preferably, the data transmission state of the timeout retransmission flag includes:
state 0: a current data message to be sent state;
state 1: the current data message is sent but the corresponding feedback message state is not received;
state 2: the current data message has been sent and the corresponding feedback message status has been received.
Preferably, S22 specifically includes the following steps:
starting a daemon process which retrieves newly-added data messages, namely data messages in a to-be-sent state, from a database at a data sending end and adds the data messages into a data message queue;
and starting a daemon process for searching the data message which is sent but does not receive the state of the corresponding feedback message from a database of the sending end at the data sending end and adding the data message into a data message queue.
Preferably, the starting, at the data sending end, a daemon process that retrieves the data message that has been sent but has not received the corresponding feedback message state from the sending end database and adds the data message to the data message queue includes the following steps:
retrieving a feedback message of a data message which is not received when the time difference between the overtime timestamp and the retrieval timestamp exceeds a set time interval from a database, adding the data message into a data message queue, and updating the overtime timestamp time of the data message into the time of the retrieval timestamp;
wherein, the time-out timestamp is the last time the data message was sent;
the retrieval timestamp is the time at which the current retrieval step was performed.
Preferably, the data receiving end in S13 generates and asynchronously sends the feedback message based on the data message, specifically including the following steps:
s131, the data receiving end receives the data message and adds the data message into a data message queue;
s132, taking a data message from the data message queue for processing to generate a feedback message, and adding the feedback message into a feedback message queue II;
s133, a feedback message is taken out from the feedback message queue II, and the feedback message is asynchronously sent to the data sending end.
Preferably, the step of taking a data message from the data message queue to process in S132 to generate a feedback message, and adding the feedback message to the feedback message queue two specifically includes the following steps:
s1321, checking whether the data message queue is empty at a data receiving end;
s1322, if the data message queue of the data receiving end is empty, sleeping for a given time, and jumping to S1321; otherwise, a data message is fetched from the data message queue, a thread for processing the data message is started, and the process jumps to S1321.
Preferably, S14 specifically includes the following steps:
s141, checking whether a feedback message queue I is empty;
s142, if the feedback message queue I is empty, sleeping for a given time, and jumping to S141; otherwise, a feedback message is taken out from the first feedback message queue, a processing thread is started for the feedback message, and the process jumps to S141.
Preferably, starting a processing thread for the feedback message includes: and updating the data transmission state of the overtime retransmission identifier of the data message corresponding to the feedback message in the database of the sending terminal, namely updating the state from the state that the current data message is sent but the corresponding feedback message is not received to the state that the current data message is sent and the corresponding feedback message is received.
Through the technical scheme, compared with the prior art, the invention has the beneficial effects that:
(1) compared with the method of simply using synchronous message transmission, the method has high-speed data transmission performance;
(2) compared with the pure asynchronous message transmission, the method has higher data reliability in data transmission.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts;
fig. 1 is a flow chart of a two-way asynchronous message transmission method based on sensing and retransmission.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following is a detailed description of embodiments of the invention:
the invention provides a two-path asynchronous message transmission method with sensing and retransmission functions, which aims to solve the problem that continuous high-speed transmission or high reliability is lost in the process of carrying out remote filing data transmission on mass scientific data in the prior art.
A two-way asynchronous message transmission method based on perception and retransmission comprises the following steps:
a transmission step:
and S11, setting an overtime retransmission identifier for the data message to be sent in a sending end database.
The data transmission state of the timeout retransmission flag includes:
state 0: a current data message to be sent state;
state 1: the current data message is sent but the corresponding feedback message state is not received;
state 2: the current data message has been sent and the corresponding feedback message status has been received.
And S12, asynchronously sending the data message to the data receiving terminal. The method comprises the following specific steps:
and S121, starting a daemon process for sensing whether the data receiving end and the data sending end establish connection or not at the data sending end. The method comprises the following steps:
s1211, checking whether the data message sender and the data message receiver have established good connection; specifically, the method comprises the following steps:
-acquiring a connection status (dms _ s) of an IP-connected Data message sender (dms) of the Data message receiver (dmr) on a port used for sending Data messages (Data _ Msg) to the dmr;
s1212, if the connection between the data message sender and the data message receiver is established, setting the event of stopping sending the data message as false, sleeping for a period of time, and jumping to S1211; otherwise, setting the event of stopping sending the data message to be true, sleeping for a period of time, and jumping to S1211; specifically, the method comprises the following steps:
if dms _ S is in a connected state, setting the stop sending data message event (ssdme) to false, e.g., 1 second of dormancy, and jumping to S1211; otherwise ssdme is set to true, e.g., sleep for 1 second, jumping to S1211.
And S122, starting a daemon process for asynchronously sending the data message at the data sending end. The method comprises the following steps:
s1221, checking whether the event of stopping sending the data message is true; specifically, the method comprises the following steps:
obtaining a value of ssdme as ssdme _ v;
s1222, when the event of stopping sending data is true, sleeping for a period of time, and jumping to S1221, otherwise, jumping to S1223; specifically, the method comprises the following steps:
if ssdme _ v is true, e.g., 1 second of sleep, jump to S1221, otherwise, jump to S1223;
s1223, taking out a data message from the data message queue, and the data message sender asynchronously transmitting the data message to a data message receiver in the data receiving end; specifically, the method comprises the following steps:
an element is fetched from dms _ dmq, a Data message (Data _ Msg) corresponding to the element is constructed, and Data _ Msg is asynchronously transferred to dmr, where the format of Data _ Msg is as follows.
Figure BDA0002678904920000051
S1224, the data message sender sets an overtime retransmission timestamp of the data message just sent in the database, and jumps to S1221; specifically, the method comprises the following steps:
the timeout timestamp of the Data file corresponding to Data _ Msg is set to the timestamp when Data _ Msg is transmitted, and the process jumps to S1221.
And S13, receiving a feedback message which is generated and asynchronously sent by the data receiving terminal based on the data message, and adding the feedback message into the first feedback message queue. The method specifically comprises the following steps:
s131, the data receiving end receives the data message and adds the data message into the data message queue. The method comprises the following specific steps:
s1311, a daemon process is started at the data message receiving end for sensing whether the data message receiving end and the data message sending end establish connection. The method comprises the following steps:
s1311-1, checking whether a connection between a data message receiver and a data message sender is established; specifically, the method comprises the following steps:
obtaining the connection state (dmr _ s) of the address composed of the IP and the port corresponding to the IP connection dms of dmr;
s1311-2, if the data message receiver does not establish connection with the data message sender, setting the event of stopping receiving the data message to be true, sleeping for a period of time, and jumping to S1311-1; otherwise, setting the event of stopping receiving the data message as false, sleeping for a period of time, and jumping to S1311-1; specifically, the method comprises the following steps:
if dmr _ S is for establishing a connection, the stop receiving data message event (srdme) is set to true, e.g., 1 second of dormancy, and then the process jumps to S1311-1; otherwise, setting the srdme to be false, for example, sleeping for 1 second, and jumping to S1311-1;
s1312, a daemon process for receiving the data message is started at the data message receiving end. The method comprises the following steps:
s1312-1, checking whether the event of stopping receiving the data message is true; specifically, the method comprises the following steps:
acquiring the value of srdme;
s1312-2, if the data message receiving stopping event is true, establishing the connection between the data message receiving party and the data message sending party, sleeping for a period of time, and jumping to S1312-1; otherwise, receiving the received data message, putting the data message into a data message queue, and jumping to S1312-1; specifically, the method comprises the following steps:
if srdme is true, attempting to re-establish the network connection between dmr and dms, e.g., sleeping for 1 second, jumping to S1312-1; otherwise, receiving Data _ Msg, putting the Data _ Msg into a Data message queue (dmr _ dmq), and jumping to S1312-1;
s132, taking one data message from the data message queue for processing to generate a feedback message, and adding the feedback message into a feedback message queue II. The method comprises the following specific steps:
s1321, checking whether the data message queue is empty at a data receiving end; specifically, the method comprises the following steps:
obtaining the number of elements dmr _ dmq _ n in dmr _ dmq;
s1322, if the data message queue of the data receiving end is not empty, taking a data message from the data message queue, starting a thread for processing the data message, and jumping to S1321; specifically, the method comprises the following steps:
if dmr _ dmq _ n is not 0, taking a Data message (Data _ Msg) from dmr _ dmq, starting a thread for processing the Data message for Data _ Msg, and jumping to S1321;
s1323, the thread for processing a data message specifically includes:
s1323-1, extracting relevant information from the data message; specifically, the method comprises the following steps:
extracting a Data sending end IP (SIP), a Data receiving end IP (RIP), a file name (Filename), a file Version number (Version) and a file Type (Type) from the Data _ Msg;
s1323-2, correspondingly processing and storing the extracted partial information; specifically, the method comprises the following steps:
if the extracted records corresponding to the SIP, the RIP, the Filename, the Version and the Type already exist in the database where dmr is located, discarding the Data _ Msg; otherwise, extracting the file Data information (Data) in the Data _ Msg, performing corresponding filing processing and storage, and storing the extracted SIP, RIP, Filename, Version and Type information into a database;
s1323-3, constructing the extracted partial information into a feedback message, and adding the constructed feedback message into a feedback message queue; specifically, the method comprises the following steps:
constructing a Feedback message (Feedback _ Msg) through the extracted SIP, RIP, Filename, Version and Type information, and adding the Feedback _ Msg into a Feedback message queue (dmr _ fmq), wherein the format of the Feedback _ Msg is as follows;
Figure BDA0002678904920000071
s1323-4, ending the thread for processing the data message; specifically, the method comprises the following steps:
the thread that processes Data _ Msg is exited.
S133, a feedback message is taken out from the feedback message queue II, and the feedback message is asynchronously sent to the data sending end. The method comprises the following specific steps:
and S1331, starting a daemon process for sensing whether a feedback message receiver of the data sending end and a feedback message sender of the data receiving end have established connection or not at the data receiving end. The method comprises the following steps:
s1331-1, checking whether the feedback message receiver is connected with the feedback message sender; specifically, the method comprises the following steps:
-the status (fms _ s) of the feedback message sender (fms) specifying whether the ports are connected by the IP of the feedback message receiver (fmr);
s1331-2, if the connection between the feedback message receiver and the feedback message sender is established, setting the feedback message sending event as true, sleeping for a period of time, and jumping to S1331-1; otherwise, setting the feedback message sending event as false, sleeping for a period of time, and jumping to S1331-1; specifically, the method comprises the following steps:
if fms _ S is connected, setting a feedback message sending event (sfme) to be true, for example, sleeping for 1 second, and jumping to S1331-1; otherwise, sfme is set to false, e.g., sleep for 1 second, and S1331-1 is skipped;
and S1332, starting a daemon process for sending the feedback message at the data receiving end. The method comprises the following steps:
s1332-1, checking whether the feedback message sending event is true; specifically, the method comprises the following steps:
acquiring the value of sfme as sfme _ v;
s1332-2, if the feedback message sending event is false, sleeping for a period of time, and skipping to S1332-1; otherwise, checking whether the feedback message queue is empty, and jumping to S1332-3; specifically, the method comprises the following steps:
if sfme _ v is false, e.g., sleeping for 1 second, jumping to S1332-1; otherwise, acquiring the number (fms _ fmq _ n) of elements of the feedback message queue (fms _ fmq), and jumping to S1332-3;
s1332-3, if the feedback message queue is empty, sleeping for a period of time, and jumping to S1332-1; otherwise, taking out a feedback message from the feedback message queue, and the feedback message sender asynchronously transmits the feedback message to a feedback message receiver of the data sender, and skips to S1332-1; specifically, the method comprises the following steps:
if fms _ fmq _ n is 0, e.g., sleep for 1 second, otherwise, take a feedback message (fms _ fm) from fms _ fmq, asynchronously transmit fms _ fm to fmr, and jump to S1332-1.
And S14, taking the feedback message from the first feedback message queue for processing, and updating the data transmission state of the overtime retransmission identifier corresponding to the data message in the database of the sending end. In particular, the method comprises the following steps of,
s141, the data sending end receives the feedback message and adds the feedback message to the feedback message queue, which includes the following steps:
s1411, starting a daemon process at the data sending end for sensing whether a connection between the feedback message receiving end at the data sending end and the feedback message sending end at the data receiving end has been established, the daemon process includes:
s1411-1, checking whether the feedback message receiver is connected with the feedback message sender already; specifically, the method comprises the following steps:
acquiring the network connection state (fmr _ s) of an address formed by the IP of fmr, the IP of fms and the designated port;
s1411-2, if the connection between the feedback message receiver and the feedback message sender is established, setting the feedback message reception stopping event as false, sleeping for a period of time, and jumping to S1411-1; otherwise, setting the feedback message reception stopping event to be true, sleeping for a period of time, and jumping to S1411-1; specifically, the method comprises the following steps:
if fmr _ S is in the connected state, setting the feedback message reception stopping event (srfme) to be false, for example, sleeping for 1 second, and jumping to S1411-1; otherwise, setting srfme to be true, for example, sleeping for 1 second, and jumping to S1411-1;
s1412, starting a daemon process for receiving the feedback message at the data sending end, including:
s1412-1, checking whether the value of the feedback message stopping receiving event is false; specifically, the method comprises the following steps:
acquiring the value of srfme as srfme _ v;
s1412-2, if the event of stopping receiving the feedback message is true, sleeping for a period of time, otherwise, receiving the feedback message, adding the feedback message into a feedback message queue, and jumping to S1412-1; specifically, the method comprises the following steps:
if srfme _ v is true, e.g., sleeping for 1 second, otherwise, receiving a Feedback message (Feedback _ Msg), adding the Feedback _ Msg into a Feedback message queue (fmr _ fmq), and jumping to S1412-1;
s142, the data sending end takes out the feedback message from the feedback message queue to process and updates the timeout retransmission flag recorded in the database, which includes the following specific steps:
s1421, checking whether the feedback message queue is empty; specifically, the method comprises the following steps:
acquiring the number of elements in fmr _ fmq (fmr _ fmq _ n);
s1422, if the feedback message queue is empty, sleeping for a period of time, and jumping to S1421; otherwise, a feedback message is taken out from the feedback message queue, a processing thread is started for the feedback message, and the process goes to S1421; specifically, the method comprises the following steps:
if fmr _ fmq _ n is 0, e.g., sleep for 1 second, go to S1421; otherwise, taking out a Feedback message (Feedback _ Msg) from fmr _ fmq, starting a processing thread for the Feedback _ Msg, and jumping to S1421;
s1423, the thread for processing the feedback message includes:
s1423-1, updating the overtime retransmission identifier of the data message record in the database corresponding to the feedback message; specifically, the method comprises the following steps:
and updating the data transmission state of the overtime retransmission identifier of the data message corresponding to the feedback message in the database of the sending terminal, namely updating the state from the state that the current data message is sent but the corresponding feedback message is not received to the state that the current data message is sent and the corresponding feedback message is received.
For example, the timeout retransmission flag of the file record corresponding to the Feedback _ Msg in the database is set as transmission success.
S1423-2, ending the thread for processing the feedback message; specifically, the method comprises the following steps:
and exiting the processing thread corresponding to the Feedback _ Msg.
And (3) retrieval step:
s21, regularly searching and identifying the data transmission state in the overtime retransmission identification in the sending terminal database;
s22, judging whether to execute the transmission step to the current data message according to the data transmission state; if so, S12-S14 are executed. The method specifically comprises the following steps:
and starting a daemon process for retrieving the newly-added data message, namely the data message in a to-be-sent state, from the database at the data sending end and adding the data message into the data message queue.
For example, a newly archived yet-to-be-sent data fileset (dfs) is retrieved from the database, and the dfs is added to the dms _ dmq.
And starting a daemon process for searching the data message which is sent but does not receive the state of the corresponding feedback message from a database of the sending end at the data sending end and adding the data message into a data message queue. The method specifically comprises the following steps:
retrieving a feedback message of a data message which is not received when the time difference between the overtime timestamp and the retrieval timestamp exceeds a set time interval from a database, adding the data message into a data message queue, and updating the overtime timestamp time of the data message into the time of the retrieval timestamp;
wherein, the time-out timestamp is the last time the data message was sent;
the retrieval timestamp is the time at which the current retrieval step was performed.
For example, a timeout interval value of 20 minutes is set, a set of records (urfmrs) with all non-received feedback messages with timeout timestamps smaller than the difference between the retrieval timestamp minus 20 minutes is retrieved from the database, urfmrs is added to the data message queue (dms _ dmq), and the corresponding timeout timestamps of all records in urfmrs in the database are set as the retrieval timestamps.
After the present search step is executed, the user sleeps for a while, and the process goes to S21.
For example, sleep for 15 minutes, and jump to S21.
The two-way asynchronous message transmission method based on sensing and retransmission provided by the invention is described in detail above, a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the above embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A two-way asynchronous message transmission method based on perception and retransmission is characterized by comprising the following steps:
a transmission step:
s11, setting an overtime retransmission identifier for the data message to be sent in a sending end database;
s12, asynchronously sending data messages to a data receiving terminal;
s13, receiving a feedback message which is generated and asynchronously sent by the data receiving terminal based on the data message, and adding the feedback message into a first feedback message queue;
s14, taking out the feedback message from the first feedback message queue for processing, and updating the data transmission state of the overtime retransmission identifier corresponding to the data message in the sending end database;
and (3) retrieval step:
s21, regularly searching and identifying the data transmission state in the overtime retransmission identifier in the database of the sending terminal;
s22, judging whether to execute the transmission step to the current data message according to the data transmission state; if so, S12-S14 are executed.
2. The method for two-way asynchronous message transmission based on sensing and retransmission according to claim 1, wherein the data transmission state of the timeout retransmission flag comprises:
state 0: a current data message to be sent state;
state 1: the current data message is sent but the corresponding feedback message state is not received;
state 2: the current data message has been sent and the corresponding feedback message status has been received.
3. The method for two-way asynchronous message transmission based on sensing and retransmission according to claim 1, wherein S22 specifically comprises the following steps:
starting a daemon process which retrieves newly-added data messages, namely data messages in a to-be-sent state, from a database at a data sending end and adds the data messages into a data message queue;
and starting a daemon process for searching the data message which is sent but does not receive the state of the corresponding feedback message from a database of the sending end at the data sending end and adding the data message into a data message queue.
4. The two-way asynchronous message transmission method based on sensing and retransmission according to claim 3, wherein said initiating, at the data sending end, a daemon process that retrieves the data message that has been sent but has not received the corresponding feedback message status from the sending end database and adds the data message to the data message queue, specifically comprises the steps of:
retrieving a feedback message of a data message which is not received when the time difference between the overtime timestamp and the retrieval timestamp exceeds a set time interval from a database, adding the data message into a data message queue, and updating the overtime timestamp time of the data message into the time of the retrieval timestamp;
wherein, the time-out timestamp is the last time the data message was sent;
the retrieval timestamp is the time at which the current retrieval step was performed.
5. The two-way asynchronous message transmission method based on sensing and retransmission according to claim 1, wherein a data receiving end generates and asynchronously sends a feedback message based on the data message in S13, specifically comprising the steps of:
s131, the data receiving end receives the data message and adds the data message into a data message queue;
s132, taking a data message from the data message queue for processing to generate a feedback message, and adding the feedback message into a feedback message queue II;
s133, a feedback message is taken out from the feedback message queue II, and the feedback message is asynchronously sent to the data sending end.
6. The two-way asynchronous message transmission method based on sensing and retransmission according to claim 5, wherein said step S132 of taking a data message from the data message queue for processing, generating a feedback message, and adding the feedback message to the feedback message queue two, specifically comprises the steps of:
s1321, checking whether the data message queue is empty at a data receiving end;
s1322, if the data message queue of the data receiving end is empty, sleeping for a given time, and jumping to S1321; otherwise, a data message is fetched from the data message queue, a thread for processing the data message is started, and the process jumps to S1321.
7. The method for two-way asynchronous message transmission based on sensing and retransmission according to claim 1, wherein S14 specifically comprises the following steps:
s141, checking whether a feedback message queue I is empty;
s142, if the feedback message queue I is empty, sleeping for a given time, and jumping to S141; otherwise, a feedback message is taken out from the first feedback message queue, a processing thread is started for the feedback message, and the process jumps to S141.
8. The method of claim 7, wherein initiating a processing thread for the feedback message comprises: and updating the data transmission state of the overtime retransmission identifier of the data message corresponding to the feedback message in the database of the sending terminal, namely updating the state from the state that the current data message is sent but the corresponding feedback message is not received to the state that the current data message is sent and the corresponding feedback message is received.
CN202010957704.3A 2020-09-12 2020-09-12 Two-way asynchronous message transmission method based on perception and retransmission Pending CN112134657A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010957704.3A CN112134657A (en) 2020-09-12 2020-09-12 Two-way asynchronous message transmission method based on perception and retransmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010957704.3A CN112134657A (en) 2020-09-12 2020-09-12 Two-way asynchronous message transmission method based on perception and retransmission

Publications (1)

Publication Number Publication Date
CN112134657A true CN112134657A (en) 2020-12-25

Family

ID=73845619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010957704.3A Pending CN112134657A (en) 2020-09-12 2020-09-12 Two-way asynchronous message transmission method based on perception and retransmission

Country Status (1)

Country Link
CN (1) CN112134657A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472691A (en) * 2021-06-16 2021-10-01 安阳师范学院 Mass time sequence data remote filing method based on message queue and erasure code
CN113612829A (en) * 2021-07-27 2021-11-05 安阳师范学院 Remote archiving method for high-density mass data
CN115118710A (en) * 2022-05-25 2022-09-27 中银金融科技有限公司 File transmission method and device
CN115208899A (en) * 2022-06-29 2022-10-18 安阳师范学院 Improved P2P mass scientific data synchronization method
CN115118710B (en) * 2022-05-25 2024-04-19 中银金融科技有限公司 File transmission method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436978A (en) * 2007-11-15 2009-05-20 盛乐信息技术(上海)有限公司 Method for authentic data transmission using UDP protocol
US20150312158A1 (en) * 2006-07-25 2015-10-29 Broadcom Corporation Method and system for medium access control (mac) layer specialization for voice and multimedia data streams
CN106533639A (en) * 2016-12-06 2017-03-22 迈锐数据(北京)有限公司 Data retransmission method and device
CN108259316A (en) * 2017-03-14 2018-07-06 平安科技(深圳)有限公司 E-mail processing method and device
CN111030784A (en) * 2019-11-13 2020-04-17 泰康保险集团股份有限公司 Information synchronization method and device
CN111404643A (en) * 2020-03-10 2020-07-10 山东汇贸电子口岸有限公司 Data receiving and transmitting processing method based on message queue

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150312158A1 (en) * 2006-07-25 2015-10-29 Broadcom Corporation Method and system for medium access control (mac) layer specialization for voice and multimedia data streams
CN101436978A (en) * 2007-11-15 2009-05-20 盛乐信息技术(上海)有限公司 Method for authentic data transmission using UDP protocol
CN106533639A (en) * 2016-12-06 2017-03-22 迈锐数据(北京)有限公司 Data retransmission method and device
CN108259316A (en) * 2017-03-14 2018-07-06 平安科技(深圳)有限公司 E-mail processing method and device
CN111030784A (en) * 2019-11-13 2020-04-17 泰康保险集团股份有限公司 Information synchronization method and device
CN111404643A (en) * 2020-03-10 2020-07-10 山东汇贸电子口岸有限公司 Data receiving and transmitting processing method based on message queue

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472691A (en) * 2021-06-16 2021-10-01 安阳师范学院 Mass time sequence data remote filing method based on message queue and erasure code
CN113612829A (en) * 2021-07-27 2021-11-05 安阳师范学院 Remote archiving method for high-density mass data
CN115118710A (en) * 2022-05-25 2022-09-27 中银金融科技有限公司 File transmission method and device
CN115118710B (en) * 2022-05-25 2024-04-19 中银金融科技有限公司 File transmission method and device
CN115208899A (en) * 2022-06-29 2022-10-18 安阳师范学院 Improved P2P mass scientific data synchronization method

Similar Documents

Publication Publication Date Title
CN112134657A (en) Two-way asynchronous message transmission method based on perception and retransmission
US6941326B2 (en) Accounting for update notifications in synchronizing data that may be represented by different data structures
WO2017016161A1 (en) Picture transmission control system, and security protection and transmission method for each related end
US11349962B2 (en) Data transmission method and device
EP1533717B1 (en) Method to provide synchronisation notifications to client devices
EP0307962B1 (en) Time division multiple access radio communication system
CN111385269B (en) Data transmission method and device
CN102307056B (en) Method for processing mobile terminal contact information and mobile terminal
CN108667897B (en) Communication device, communication method, and storage medium
CN110768710A (en) Method for realizing voice communication based on Beidou short message
CN111885555B (en) TWS earphone based on monitoring scheme and implementation method thereof
CN111130690A (en) Processing method and device for multiple communication protocols of IR46 smart electric meter
CN104660639B (en) Cloud terminal upgrade processing method and device
Callaghan et al. Sampling and algorithms aid modulation recognition
CN113452770B (en) Data synchronization method, device, computer equipment and storage medium
CN116800787A (en) Vehicle-mounted communication method and system based on Ethernet communication protocol
CN115297447A (en) Long short message merging method, system, equipment and storage medium
CN113472691A (en) Mass time sequence data remote filing method based on message queue and erasure code
CN111935316B (en) Method and device for acquiring front-end equipment catalog
KR100831730B1 (en) Contents Back-Up Method for Mobile Communication Terminal, Mobile Communication Terminal and Contents Back-Up Server for the Same
JP4962854B2 (en) Priority control apparatus, SIP system, priority control program, and priority control method
CN110248038B (en) Image transmission method and system based on WIFI
CN113573252A (en) Data transmission method, system, chip, electronic device and storage medium
CN106331058A (en) Message transmission method and device
CN106330998B (en) File sending and receiving method and device

Legal Events

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

Application publication date: 20201225