CN117040692A - Method and device for transmitting service data, electronic equipment and storage medium - Google Patents

Method and device for transmitting service data, electronic equipment and storage medium Download PDF

Info

Publication number
CN117040692A
CN117040692A CN202310952646.9A CN202310952646A CN117040692A CN 117040692 A CN117040692 A CN 117040692A CN 202310952646 A CN202310952646 A CN 202310952646A CN 117040692 A CN117040692 A CN 117040692A
Authority
CN
China
Prior art keywords
data
terminal
data transmission
transmission layer
layer
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
CN202310952646.9A
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.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information 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 Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN202310952646.9A priority Critical patent/CN117040692A/en
Publication of CN117040692A publication Critical patent/CN117040692A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks

Abstract

The embodiment of the invention provides a method and a device for transmitting service data, electronic equipment and a storage medium, wherein the method comprises the following steps: creating a retransmission mechanism and/or a response mechanism in the data transmission process with the second terminal in the data transmission layer; and after the data transmission layer receives the service data to be transmitted to the second terminal, based on the data interaction between the data transmission layer and the data transmission layer, adopting the retransmission mechanism and/or the response mechanism to perform data transmission of the service data with the second terminal. By the embodiment of the invention, the retransmission and the response are triggered by the data transmission layer in the data transmission process, and the application layer does not need to be reached, so that the retransmission of an application program is avoided, when the network is congested due to large data quantity, the probability of successful data transmission can be improved, the application layer can timely learn whether the service data is sent to the second terminal, and the waiting time of the application layer is reduced.

Description

Method and device for transmitting service data, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and apparatus for transmitting service data, an electronic device, and a storage medium.
Background
In the data transmission process, the service transparent transmission is used as an unreliable transmission-based service and can be used for management of terminal equipment by a management control system.
When the network is congested, the transmitted data may be lost, so that the management control system cannot timely receive the data of the terminal device, and the application program interface is in a waiting state. At this time, the application program may determine a timeout according to the second level standard, and retransmit the timeout.
However, the retransmission of data from an application program of the management control system to an application program of the terminal may result in a long time for acquiring terminal information, and thus there is a problem in that the user experience thereof is poor.
Moreover, when the management control system manages the terminal information each time, the next request can be sent after the terminal response is received or the terminal is overtime, and when the acquired information quantity is relatively large, the time for acquiring all the information can be greatly increased.
Disclosure of Invention
In view of the foregoing, a method and apparatus for transmitting service data, an electronic device, a storage medium, and a computer program product are provided that overcome or at least partially solve the foregoing problems, including:
a method for transmitting service data, applied to a first terminal, the first terminal comprising an application layer, a data transmission layer and a data transmission layer, the method comprising:
Creating a retransmission mechanism and/or a response mechanism in the data transmission process with the second terminal in the data transmission layer;
and after the data transmission layer receives the service data to be transmitted to the second terminal, based on the data interaction between the data transmission layer and the data transmission layer, adopting the retransmission mechanism and/or the response mechanism to perform data transmission of the service data with the second terminal.
Optionally, the retransmission mechanism is a timeout retransmission mechanism, and the data transmission between the second terminal and the service data is performed by adopting the retransmission mechanism and/or a response mechanism based on data interaction between the data transmission layer and the data sending layer, including:
when the data transmission layer transmits service data to the second terminal, starting a timer in the data transmission layer to count time;
and when the timing data of the timer is larger than or equal to a time threshold, the data transmission layer retransmits the service data to the second terminal by adopting the data transmission layer and the data transmission layer when the first terminal does not detect that the first terminal receives the response data fed back by the second terminal aiming at the service data.
Optionally, the retransmission mechanism is a packet loss retransmission mechanism, the service data is sent to the second terminal in the form of one or more data packets, each data packet is provided with a packet sequence number, and the data transmission of the service data with the second terminal is performed by adopting the retransmission mechanism and/or a response mechanism based on data interaction between the data transmission layer and the data transmission layer, including:
the data transmission layer is used for receiving a target message sequence number corresponding to a packet-lost data packet sent by the second terminal, and the data transmission layer is used for executing the retransmission mechanism and/or the response mechanism when the triggering condition of the retransmission mechanism and/or the response mechanism is met in the service data transmission process;
retransmitting the data packet corresponding to the target message sequence number to the second terminal by adopting the data transmission layer, wherein the data transmission layer is used for carrying out data interaction with the data transmission layer of the first terminal and/or the second terminal in the service data transmission process.
Optionally, based on the data transmission layer and the data sending layer, data interaction between the retransmission mechanism and/or the response mechanism is adopted, and data transmission of the service data with the second terminal is performed, including:
Transmitting the service data to the second terminal by adopting the data transmission layer and the data transmission layer;
and receiving response data returned by the second terminal aiming at the service data by adopting the data transmission layer.
A method for transmitting service data, applied to a second terminal, the second terminal comprising an application layer, a data transmission layer and a data transmission layer, the method comprising:
creating a retransmission mechanism and/or a response mechanism in the data transmission process with the first terminal in the data transmission layer;
receiving service data sent to the second terminal by the first terminal by adopting the data sending layer;
and based on the data interaction between the data transmission layer and the data sending layer, adopting the retransmission mechanism and/or the response mechanism to perform data transmission of the service data with the first terminal.
Optionally, the retransmission mechanism is a packet loss retransmission mechanism, the service data is sent to the second terminal in the form of one or more data packets, each data packet is provided with a packet sequence number, and the data transmission of the service data with the first terminal is performed by adopting the retransmission mechanism and/or a response mechanism based on data interaction between the data transmission layer and the data transmission layer, including:
Judging whether packet loss exists in the process of sending the data packet to the second terminal by the first terminal according to the message sequence number of the received data packet by adopting the data transmission layer;
when the data transmission layer judges that the second terminal has packet loss, determining a target message sequence number corresponding to the packet loss data packet;
and adopting the data transmission layer to transmit the target message sequence number to the first terminal so that the first terminal retransmits the data packet corresponding to the target message sequence number to the second terminal.
A device for transmitting service data, applied to a first terminal, the first terminal comprising an application layer, a data transmission layer and a data transmission layer, the device comprising:
the first mechanism creation module is used for creating a retransmission mechanism and/or a response mechanism in the data transmission process with the second terminal in the data transmission layer;
and the first service data transmission module is used for carrying out data transmission on the service data with the second terminal by adopting the retransmission mechanism and/or the response mechanism based on data interaction between the data transmission layer and the data sending layer after the data transmission layer receives the service data to be transmitted to the second terminal.
A device for transmitting service data, applied to a second terminal, the second terminal comprising an application layer, a data transmission layer and a data transmission layer, the device comprising:
the first mechanism creation module is used for creating a retransmission mechanism and/or a response mechanism in the data transmission process with the first terminal in the data transmission layer;
the service data receiving module is used for receiving the service data sent to the second terminal by the first terminal by adopting the data sending layer;
and the second service data transmission module is used for carrying out data transmission of the service data with the first terminal by adopting the retransmission mechanism and/or the response mechanism based on the data transmission layer and the data transmission layer.
An electronic device comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, which when executed by the processor implements a method of traffic data transmission as described above.
A computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method of traffic data transmission as described above.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, a retransmission mechanism and/or a response mechanism in the process of carrying out data transmission with the second terminal are created in the data transmission layer; and further, after the data transmission layer receives the service data to be transmitted to the second terminal, based on data interaction between the data transmission layer and the data transmission layer, a retransmission mechanism and/or a response mechanism are adopted to perform data transmission of the service data with the second terminal, so that retransmission and response are triggered by the data transmission layer in the data transmission process without reaching an application layer, retransmission executed by an application program is avoided, when a network is congested due to large data volume, the probability of successful data transmission can be improved, the application layer can timely learn whether the service data is transmitted to the second terminal, and the waiting time of the application layer is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the present invention, the drawings that are needed in the description of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a flowchart of a method for transmitting service data according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of another method for transmitting service data according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating steps of another method for transmitting service data according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating steps of another method for transmitting service data according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating steps of another method for transmitting service data according to an embodiment of the present invention;
fig. 6a is a flowchart illustrating steps of a method for transmitting service data according to an embodiment of the present invention;
fig. 6b is a flowchart illustrating steps of another method for transmitting service data according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an apparatus for transmitting service data according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another apparatus for transmitting service data according to an embodiment of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a step flow chart of a method for transmitting service data provided by an embodiment of the present invention is shown and applied to a first terminal, where the first terminal includes an application layer, a data transmission layer and a data transmission layer, the application layer faces a user, and responds to an input operation of the user to select a second terminal that performs service interaction with the first terminal, and determine service data that needs to be transmitted to the second terminal, and a transmission interface may be set in the application layer, where the transmission interface is used to transmit data that needs in a service interaction process such as a destination number, a sub-number and service data; the data transmission layer is located between the application layer and the data transmission layer, and is used for processing data in the service transmission process, and the data transmission layer can be filled with information required by reliable transmission, for example: the message sequence number, the size of the local window, the message type, the buffer data, the sending times and the like, the message sequence number can be the identification of a data packet of service data splitting, the size of the local window is used for determining the size of the data volume of mind transmission, and the message type can comprise response type messages and request type messages. The buffer data can be used for temporarily storing the service data being transmitted, so that the situation that the data need to be acquired from an application layer again after the service data is lost is avoided, and the reflecting time is shortened. The data transmission layer may be used to transmit the service data to other terminals outside. The first terminal and the second terminal can be terminals in the video networking. The first terminal and the second terminal may transmit via a traffic transparent protocol,
Based on the first terminal in the embodiment of the present invention, the service data transmission process may specifically include the following steps:
step 101, creating a retransmission mechanism and/or a response mechanism in the data transmission process with the second terminal in the data transmission layer;
the retransmission mechanism may be a retransmission rule for triggering retransmission of service data or one or more data packets of the service data in the terminal, and one or more retransmission rules may be preset, so that when the first terminal is in a service process, interaction between the terminals may be performed based on the retransmission mechanism.
The response rule is to feed back corresponding response data to the terminal sending the data aiming at the received data so as to inform the terminal sending the data that the data is received.
In an example, the retransmission mechanism and the response mechanism may be generated by configuring corresponding field creation in the data transport layer.
In the embodiment of the invention, a retransmission mechanism and/or a response mechanism are/is arranged in a data transmission layer. Retransmission and/or response can be performed by the data transmission layer in the service data transmission process, so that the reliability of transmission can be increased, the waiting time of the application layer can be reduced, and the user experience can be improved under the condition of network congestion.
Step 102, after the data transmission layer receives the service data to be transmitted to the second terminal, based on the data interaction between the data transmission layer and the data transmission layer, adopting a retransmission mechanism and/or a response mechanism to perform data transmission of the service data with the second terminal.
After the data transmission layer creates a retransmission mechanism and/or a response mechanism, when the data transmission layer receives service data to be transmitted, whether the current service data transmission state accords with a preset triggering condition of the retransmission mechanism and/or the response mechanism or not can be judged based on the created retransmission mechanism and/or the response mechanism, and further, data interaction is carried out between the data transmission layer and the data transmission layer according to the retransmission mechanism and/or the response mechanism, so that data transmission of the service data is realized.
For example, if it is detected that the current transmission of the service data is in a transmission timeout state (e.g., no response data corresponding to the service data is received within a preset time after the service data is transmitted), a timeout retransmission mechanism may be started.
In an example, in the terminal, the service data is transmitted to another terminal along the direction of the application layer-data transmission layer, and the application layer may acquire the service data to be transmitted to the second terminal in response to a service data input operation of the user. Specifically, in the application layer, service data may be introduced through a transmission interface of the calling terminal. In addition, in the application layer, a second terminal capable of transmitting service data can be selected from the address list, and address information of the first terminal and the second terminal can be determined.
The service data of the application layer can be sent to the data transmission layer, and then after being processed by the data transmission layer, the service data is sent to the data transmission layer, and the service data is sent to the second terminal in the data transmission layer.
In the interaction process of the first terminal and the second terminal, a pre-established retransmission mechanism and/or a response mechanism can be applied, namely when the states of the first terminal and the second terminal accord with preset conditions in the retransmission mechanism or the response mechanism, the data transmission layer is triggered to carry out data retransmission or response.
In one embodiment of the present invention, service data is buffered in a data transport layer; after the service data transmission is completed, the cached service data in the data transmission layer is cleared.
In the embodiment of the invention, a retransmission mechanism and/or a response mechanism in the process of carrying out data transmission with the second terminal are created in the data transmission layer; and further, after the data transmission layer receives the service data to be transmitted to the second terminal, based on data interaction between the data transmission layer and the data transmission layer, a retransmission mechanism and/or a response mechanism are adopted to transmit the service data with the second terminal, so that retransmission and response are triggered by the data transmission layer in the data transmission process, and the application layer is not required to be reached, thereby avoiding the application program from executing retransmission, improving the probability of successful data transmission when the network is congested due to large data quantity, and the application layer can timely learn whether the service data is transmitted to the second terminal or not, and reducing the waiting time of the application layer.
Referring to fig. 2, a flowchart illustrating steps of another method for transmitting service data according to an embodiment of the present invention may specifically include the following steps:
step 201, creating a retransmission mechanism and/or a response mechanism in the data transmission process with the second terminal in the data transmission layer; the retransmission mechanism is a timeout retransmission mechanism;
step 202, when the data transmission layer transmits service data to the second terminal, starting a timer in the data transmission layer to count time;
the retransmission mechanism created in the data transmission layer may be a timeout retransmission mechanism, that is, when the first terminal does not receive the response data beyond a preset time, the first terminal is triggered to retransmit the service data to the second terminal.
In the timeout retransmission mechanism, a timer may be set in the data transmission layer, and the data transmission time is recorded, when the service data may be transmitted to the data transmission layer via the data transmission layer, the data transmission layer may call the transmission interface, transmit the service data through the service transparent transmission protocol, and transmit a transmission instruction to the data transmission while transmitting the service data, so as to start the timer for timing.
And 203, when the timing data of the timer is greater than or equal to the time threshold, and the data transmission layer does not detect that the first terminal receives the response data fed back by the second terminal for the service data, retransmitting the service data to the second terminal by adopting the data transmission layer and the data transmission layer.
In an example, the number of retransmissions may also be set in the timeout retransmission mechanism. For example, if the number of retransmissions is set to 3, the service data may be retransmitted three times to the second terminal if it is determined that the timer has expired.
And when the second terminal receives the service data sent at any time, the retransmission is successful, when the service data is not received for three times, the retransmission is failed, and under the condition of retransmission failure, the user can be prompted to confirm the equipment states of the first terminal and the second terminal.
In the embodiment of the invention, by setting the timeout retransmission mechanism, when the data transmission layer monitors that the timer is overtime, the retransmission can be started from the data transmission layer, and compared with the retransmission from the application layer, the response time can be shortened, and the waiting time of the application layer can be reduced.
Referring to fig. 3, a flowchart illustrating steps of another method for transmitting service data according to an embodiment of the present invention may specifically include the following steps:
step 301, creating a retransmission mechanism and/or a response mechanism in the data transmission process with the second terminal in the data transmission layer; the retransmission mechanism is a packet loss retransmission mechanism;
wherein the service data is sent to the second terminal in the form of one or more data packets, each data packet being provided with a message sequence number.
The service data may be split into one or more data packets, each data packet being numbered, i.e. each data packet having its message sequence number, and the data packet may then be sent to the second terminal.
Step 302, receiving a target message sequence number corresponding to a packet loss data packet sent by a second terminal by adopting a data transmission layer;
the data transmission layer is used for executing a retransmission mechanism and/or a response mechanism when the triggering condition of the retransmission mechanism and/or the response mechanism is met in the service data transmission process;
the second terminal receives the data packet, judges whether the data packet is lost according to the message sequence number of the data packet, further determines a target message sequence number corresponding to the data packet which is lost, and sends the target message sequence number to the first terminal so as to trigger the first terminal to resend the data packet corresponding to the target message sequence number.
And step 303, retransmitting the data packet corresponding to the target message sequence number to the second terminal by adopting the data transmission layer.
The data transmission layer is used for carrying out data interaction with the data transmission layer of the first terminal and/or the second terminal in the service data transmission process. Specifically, the data transmitting layer in the first terminal transmits the data of the first middle terminal to the second terminal or receives the data transmitted to the first terminal by the second terminal.
In an embodiment of the present invention, after triggering retransmission, determining the number of retransmissions; and stopping retransmission when the retransmission times are greater than the preset times.
In one embodiment of the present invention, service data is buffered in a data transport layer; after the service data transmission is completed, the cached service data in the data transmission layer is cleared.
In the embodiment of the invention, the first terminal can retransmit the data packet which is lost in the data transmission process, thereby ensuring that the second terminal can receive all the data packets of the service data. When the network is congested due to large data volume, the probability of successful data transmission can be improved, the application layer can timely learn whether service data is sent to the second terminal, and the waiting time of the application layer is reduced.
Referring to fig. 4, a flowchart illustrating steps of another method for transmitting service data according to an embodiment of the present invention may specifically include the following steps:
step 401, creating a retransmission mechanism and/or a response mechanism in the data transmission process with the second terminal in the data transmission layer;
step 402, adopting a data transmission layer and a data transmission layer to transmit service data to a second terminal;
and step 403, receiving response data returned by the second terminal for the service data by adopting the data sending layer.
After the first terminal sends the service data to the second terminal, response data fed back by the second terminal can be received based on the response mechanism.
The response data of the second terminal may include, but is not limited to: response information of successful service data transmission and information of failed service data transmission.
In the embodiment of the invention, the equipment response mechanism between the first terminal and the second terminal is used for transmitting based on the response mechanism, so that the probability of successful data transmission can be improved, an application layer can timely learn whether service data is sent to the second terminal, and the waiting time of the application layer is reduced.
Referring to fig. 5, a flowchart of steps of another method for transmitting service data according to an embodiment of the present invention is shown and applied to a second terminal, where the second terminal includes an application layer, a data transmission layer, and a data transmission layer.
Based on the second terminal in the embodiment of the present invention, the service data transmission process may specifically include the following steps:
step 501, a retransmission mechanism and/or a response mechanism in the process of carrying out data transmission with a first terminal are created in a data transmission layer;
step 502, receiving service data sent by a first terminal to a second terminal by adopting a data sending layer;
Step 503, based on the data interaction between the data transmission layer and the data sending layer, adopting a retransmission mechanism and/or a response mechanism to perform data transmission of service data with the first terminal.
In an embodiment of the present invention, the retransmission mechanism is a packet loss retransmission mechanism, service data is sent to the second terminal in the form of one or more data packets, each data packet is provided with a packet sequence number, and the data transmission layer are adopted to perform data transmission of the service data with the first terminal based on the retransmission mechanism and/or the response mechanism, and the method includes: judging whether packet loss exists in the process of sending the data packet to the second terminal by the first terminal according to the received message sequence number of the data packet by adopting a data transmission layer; when the data transmission layer judges that the service data transmission has packet loss, determining a target message sequence number corresponding to the packet loss data packet; and sending the target message sequence number to the first terminal so that the first terminal retransmits the data packet corresponding to the target message sequence number to the second terminal.
In an example, after the data transmission layer receives the service data, whether the service data is a response message is determined according to the type of the service data, when the service data is not the response message, whether all the data packets are received is determined according to the message sequence number of each received data packet, and when all the data packets are received, the plurality of data packets can be recombined according to the message sequence number to restore the service data, so that the service data is fed back to the application layer.
When all the data packets are not received, namely packet loss occurs in the service data transmission process of the first terminal and the second terminal, a feedback message can be sent to the first terminal, the feedback message can carry the target message sequence number corresponding to the packet loss data packet, and then the retransmission of the data packet can be triggered by the target message sequence number.
In an example, when all the data packets are not received, whether the reception is overtime is judged, if not, the data is continuously received, and if the reception is overtime, the feedback message can be sent by the first terminal.
In the embodiment of the invention, a retransmission mechanism and/or a response mechanism in the process of carrying out data transmission with the first terminal are created in the data transmission layer; receiving service data sent to the second terminal by the first terminal by adopting a data sending layer; and based on the data transmission layer and the data sending layer, adopting the retransmission mechanism and/or the response mechanism to perform data transmission of the service data with the first terminal. The method and the device realize that retransmission and response are triggered by the data transmission layer in the data transmission process without reaching the application layer, thereby avoiding the application program from executing retransmission, improving the probability of successful data transmission when the network is congested due to large data quantity, and reducing the waiting time of the application layer by timely knowing whether the service data is sent to the second terminal or not by the application layer.
Fig. 6a is a schematic diagram of a reliable data transmission interaction flow through a service transparent transmission protocol according to an embodiment of the present invention.
The first terminal may include management software (i.e., an application layer), a reliable transport module (i.e., a data transport layer and a data transmission layer), the second terminal may include a reliable transport module (i.e., a data transport layer and a data transmission layer) and a terminal application (i.e., an application layer),
the interaction of the first terminal and the second terminal may include, but is not limited to, the following three types:
first category: the management and control software of the first terminal sends data to the reliable transmission module, the reliable transmission module sends a service transparent transmission message to the reliable transmission module of the second terminal based on a service transparent transmission protocol, and the reliable transmission module of the second terminal uploads the data to a terminal application program of the second terminal and feeds back an ACK message to a reliable transmission layer of the first terminal.
The second category: the management and control software of the first terminal sends data to a reliable transmission module, the reliable transmission module sends a service transparent transmission message based on a service transparent transmission protocol, the first terminal retransmits the service transparent transmission message when the first terminal overtime does not receive an ACK message, namely, the response overtime, and when the response overtime is carried out in three retransmissions, the management and control software of the first terminal feeds back failure data transmission and stops retransmission.
Third category: the management and control software of the first terminal sends data to the reliable transmission module, the reliable transmission module sends a service transparent transmission message based on a service transparent transmission protocol, the service transparent transmission message is divided into 4 data packets to be respectively transmitted, when the second terminal reliable transmission module does not receive the service transparent transmission message (3/4), the second terminal reliable transmission module can send ACK (third message loss) to the reliable transmission module of the first terminal, the first terminal retransmits the service transparent transmission message (3/4) to the reliable transmission module of the second terminal after receiving the ACK, and after the second terminal reliable transmission module receives the service transparent transmission message, all the service transparent transmission messages can be sent to an application program and the ACK is sent to the reliable transmission module of the first terminal. The reliable transmission module of the first terminal sends a successful message to the management and control software.
Fig. 6b is a schematic diagram illustrating a service data transmission process according to an embodiment of the present invention.
In the application layer of the first terminal: the transmission interface, the incoming destination number, the sub-number and the data to be transmitted (i.e. service data) are invoked.
In the reliable transmission layer (i.e. the data transmission layer) of the first intermediate terminal, information required for reliable transmission, such as a message sequence number, a local window size, a message type, cache data, a sending frequency setting, etc., may be filled.
After the basic data configuration is completed, the configured data can be sent to a service transparent transmission layer (namely, a data sending layer).
In the service transparent layer, a transmitting interface can be called to transmit service data to the service transparent layer of the second terminal through a service transparent protocol, meanwhile, the service transparent layer of the first terminal can transmit a message to a reliable transmission layer in the first terminal when transmitting the data, so that a timer is started in the reliable transmission layer of the first terminal, when the reliable transmission layer monitors that the timer is overtime, service data retransmission is triggered, in the retransmission process, whether the current retransmission times are more than three times is judged, when the retransmission times are more than three times, an application program is notified of the service data transmission failure this time, and when the retransmission times are less than three times, retransmission can be continued until ACK of the second terminal is received in preset time.
And when the service data is transmitted from the service transparent layer of the first terminal to the service transparent layer of the second terminal. The received data may be sent to the reliable transport layer for processing.
In the reliable transmission layer of the second terminal, judging whether the received data is a response message, stopping the middle timer of the reliable transmission layer and judging whether the response message is correct when the received data is the response message, if so, judging whether the response content exists, if so, extracting the user data, returning to the application program of the first terminal, and if not, notifying the first terminal that the application program is successfully transmitted.
Under the condition of receiving data non-response messages, judging whether all messages are received, and when all messages are received, recombining all the messages and returning the recombined data to an application program of a second terminal; when all the messages are not received, judging whether the current receiving is overtime, and continuously executing the received data under the condition that the receiving is not overtime, and sending an ack message (comprising the sequence number of the lost message) to a reliable transmission layer of the first terminal under the condition that the receiving is overtime.
And under the condition of response errors, judging whether the sending times of the current service data are less than three times, if so, notifying the application program of the first terminal that the sending is failed, and continuing to retransmit. If the number of the retransmission is greater than or equal to three, the retransmission is stopped.
It should be noted that, for simplicity of description, the method embodiments are depicted as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Referring to fig. 7, a schematic structural diagram of a device for transmitting service data according to an embodiment of the present invention is applied to a first terminal, where the first terminal includes an application layer, a data transmission layer, and may specifically include the following modules:
a first mechanism creating module 701, configured to create a retransmission mechanism and/or a response mechanism in a data transmission process with the second terminal in the data transmission layer;
and the first service data transmission module 702 is configured to perform data transmission with the second terminal by using the retransmission mechanism and/or the response mechanism based on data interaction between the data transmission layer and the data sending layer after the data transmission layer receives service data to be transmitted to the second terminal.
In an embodiment of the present invention, the retransmission mechanism is a timeout retransmission mechanism, and the first service data transmission module 702 may include:
a timing period starting sub-module, configured to start a timer in the data transmission layer to perform timing when the data transmission layer transmits service data to the second terminal;
and the first retransmission sub-module is used for retransmitting the service data to the second terminal by adopting the data transmission layer and the data transmission layer when the data transmission layer does not detect that the first terminal receives the response data fed back by the second terminal for the service data when the timing data of the timer is greater than or equal to a time threshold value.
In an embodiment of the present invention, the retransmission mechanism is a packet loss retransmission mechanism, the service data is sent to the second terminal in one or more data packets, each data packet is provided with a packet sequence number, and the first service data transmission module 702 may include:
the target message sequence number receiving sub-module is used for receiving a target message sequence number corresponding to a packet-lost data packet sent by the second terminal by adopting the data transmission layer, and the data transmission layer is used for executing the retransmission mechanism and/or the response mechanism when the triggering condition of the retransmission mechanism and/or the response mechanism is met in the service data transmission process;
and the second retransmission sub-module is used for retransmitting the data packet corresponding to the target message sequence number to the second terminal by adopting the data transmission layer, wherein the data transmission layer is used for carrying out data interaction with the data transmission layer of the first terminal and/or the second terminal in the service data transmission process.
In an embodiment of the present invention, the first service data transmission module 702 may include:
a service data transmitting sub-module, configured to transmit the service data to the second terminal by using the data transmission layer and the data transmitting layer;
And the response data receiving sub-module is used for receiving response data returned by the second terminal aiming at the service data by adopting the data transmission layer.
Referring to fig. 8, a schematic structural diagram of a device for transmitting service data according to an embodiment of the present invention is shown and applied to a second terminal, where the second terminal includes an application layer, a data transmission layer, and may specifically include the following modules:
a first mechanism creating module 801, configured to create a retransmission mechanism and/or a response mechanism in a data transmission process with the first terminal in the data transmission layer;
a service data receiving module 802, configured to receive, by using the data sending layer, service data sent by the first terminal to the second terminal;
and the second service data transmission module 803 is configured to perform data transmission of the service data with the first terminal by using the retransmission mechanism and/or the response mechanism based on data interaction between the data transmission layer and the data sending layer.
In an embodiment of the present invention, the retransmission mechanism is a packet loss retransmission mechanism, the service data is sent to the second terminal in one or more data packets, each data packet is provided with a packet sequence number, and the second service data transmission module 803:
The packet loss judging submodule is used for judging whether packet loss exists in the process of sending the data packet to the second terminal by the first terminal according to the message sequence number of the received data packet by adopting the data transmission layer;
the target message sequence number determining submodule is used for determining that a data packet corresponding to a lost packet corresponds to a target message sequence number when the data transmission layer determines that the data packet is lost in the process of sending the data packet from the first terminal to the second terminal;
and the target message sequence number sending sub-module is used for sending the target message sequence number to the first terminal by adopting the data sending layer so that the first terminal retransmits the data packet corresponding to the target message sequence number to the second terminal.
An embodiment of the present invention further provides an electronic device, which may include a processor, a memory, and a computer program stored on the memory and capable of running on the processor, where the computer program is executed by the processor to implement a method for transmitting service data as described above.
An embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements a method for transmitting service data as above.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has described in detail the method and apparatus for transmitting service data, the electronic device and the storage medium, and specific examples have been applied to illustrate the principles and embodiments of the present invention, and the above examples are only used to help understand the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. A method for transmitting service data, which is applied to a first terminal, wherein the first terminal comprises an application layer, a data transmission layer and a data transmission layer, and the method comprises the following steps:
creating a retransmission mechanism and/or a response mechanism in the data transmission process with the second terminal in the data transmission layer;
and after the data transmission layer receives the service data to be transmitted to the second terminal, based on the data interaction between the data transmission layer and the data transmission layer, adopting the retransmission mechanism and/or the response mechanism to perform data transmission of the service data with the second terminal.
2. The method according to claim 1, wherein the retransmission mechanism is a timeout retransmission mechanism, and the performing data transmission of the service data with the second terminal by using the retransmission mechanism and/or a response mechanism based on data interaction between the data transmission layer and the data sending layer includes:
when the data transmission layer transmits service data to the second terminal, starting a timer in the data transmission layer to count time;
and when the timing data of the timer is larger than or equal to a time threshold, the data transmission layer retransmits the service data to the second terminal by adopting the data transmission layer and the data transmission layer when the first terminal does not detect that the first terminal receives the response data fed back by the second terminal aiming at the service data.
3. The method according to claim 1, wherein the retransmission mechanism is a packet loss retransmission mechanism, the service data is sent to the second terminal in the form of one or more data packets, each data packet is provided with a packet sequence number, and the data transmission of the service data with the second terminal based on the data interaction between the data transmission layer and the data transmission layer using the retransmission mechanism and/or the response mechanism includes:
the data transmission layer is used for receiving a target message sequence number corresponding to a packet-lost data packet sent by the second terminal, and the data transmission layer is used for executing the retransmission mechanism and/or the response mechanism when the triggering condition of the retransmission mechanism and/or the response mechanism is met in the service data transmission process;
retransmitting the data packet corresponding to the target message sequence number to the second terminal by adopting the data transmission layer, wherein the data transmission layer is used for carrying out data interaction with the data transmission layer of the first terminal and/or the second terminal in the service data transmission process.
4. The method according to claim 1, wherein said performing data transmission of the service data with the second terminal using the retransmission mechanism and/or the response mechanism based on data interaction between the data transmission layer and the data transmission layer comprises:
Transmitting the service data to the second terminal by adopting the data transmission layer and the data transmission layer;
and receiving response data returned by the second terminal aiming at the service data by adopting the data transmission layer.
5. A method for transmitting service data, which is applied to a second terminal, wherein the second terminal comprises an application layer, a data transmission layer and a data transmission layer, and the method comprises the following steps:
creating a retransmission mechanism and/or a response mechanism in the data transmission process with the first terminal in the data transmission layer;
receiving service data sent to the second terminal by the first terminal by adopting the data sending layer;
and based on the data interaction between the data transmission layer and the data sending layer, adopting the retransmission mechanism and/or the response mechanism to perform data transmission of the service data with the first terminal.
6. The method according to claim 5, wherein the retransmission mechanism is a packet loss retransmission mechanism, the service data is sent to the second terminal in the form of one or more data packets, each data packet is provided with a packet sequence number, and the data transmission of the service data with the first terminal based on the data interaction between the data transmission layer and the data transmission layer using the retransmission mechanism and/or the response mechanism includes:
Judging whether packet loss exists in the process of sending the data packet to the second terminal by the first terminal according to the message sequence number of the received data packet by adopting the data transmission layer;
when the data transmission layer judges that the first terminal has packet loss in the process of sending the data packet to the second terminal, determining a target message sequence number corresponding to the data packet of the packet loss;
and adopting the data transmission layer to transmit the target message sequence number to the first terminal so that the first terminal retransmits the data packet corresponding to the target message sequence number to the second terminal.
7. A device for transmitting service data, which is applied to a first terminal, wherein the first terminal comprises an application layer, a data transmission layer and a data transmission layer, and the device comprises:
the first mechanism creation module is used for creating a retransmission mechanism and/or a response mechanism in the data transmission process with the second terminal in the data transmission layer;
and the first service data transmission module is used for carrying out data transmission on the service data with the second terminal by adopting the retransmission mechanism and/or the response mechanism based on data interaction between the data transmission layer and the data sending layer after the data transmission layer receives the service data to be transmitted to the second terminal.
8. A device for transmitting service data, which is applied to a second terminal, wherein the second terminal comprises an application layer, a data transmission layer and a data transmission layer, and the device comprises:
the first mechanism creation module is used for creating a retransmission mechanism and/or a response mechanism in the data transmission process with the first terminal in the data transmission layer;
the service data receiving module is used for receiving the service data sent to the second terminal by the first terminal by adopting the data sending layer;
and the second service data transmission module is used for carrying out data transmission of the service data with the first terminal by adopting the retransmission mechanism and/or the response mechanism based on the data transmission layer and the data transmission layer.
9. An electronic device comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, which computer program, when executed by the processor, implements the method of traffic data transmission according to any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements a method of traffic data transmission according to any of claims 1 to 7.
CN202310952646.9A 2023-07-31 2023-07-31 Method and device for transmitting service data, electronic equipment and storage medium Pending CN117040692A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310952646.9A CN117040692A (en) 2023-07-31 2023-07-31 Method and device for transmitting service data, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310952646.9A CN117040692A (en) 2023-07-31 2023-07-31 Method and device for transmitting service data, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117040692A true CN117040692A (en) 2023-11-10

Family

ID=88623723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310952646.9A Pending CN117040692A (en) 2023-07-31 2023-07-31 Method and device for transmitting service data, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117040692A (en)

Similar Documents

Publication Publication Date Title
CN110995697B (en) Big data transmission method and system
AU644800B2 (en) Data communication method and system
US8473825B2 (en) Evolved universal terrestrial radio access acknowledged mode radio link control status report for segmented protocol data units
US7127655B2 (en) Methods and apparatus to optimize delivery of multicast content using probabilistic feedback
US10284340B2 (en) Multicast sending apparatus, multicast receiving apparatus, and multicast transmission determining method
KR20080005150A (en) Method and apparatus for handling transmission errors in a wireless communications system
JP2002529010A (en) Packet discarding method and packet discarding device in data network performing automatic retransmission request
KR20090042988A (en) A method for controlling data retransmission in wireless network at the last retransmission time
CN108234087B (en) Data transmission method and sending end
CN110413425B (en) Third-party message callback method, device, server and storage medium
CN109981385B (en) Method, device and system for realizing packet loss detection
CN110943808B (en) Data transmission method and device, electronic equipment and storage medium
CN113708895B (en) Data transmission method and device and electronic equipment
JP3537015B2 (en) Packet communication method
US7995517B2 (en) System and method for transmitting units of messages in a mobile communication system
CN103973414A (en) Data transmission method and device
US11297529B2 (en) Toggling based indicator of reception success
CN109391593B (en) Retry time determination method and device for media session, storage medium and terminal
CN110830818A (en) Video transmission method and device
CN117040692A (en) Method and device for transmitting service data, electronic equipment and storage medium
CN112187408B (en) Data processing method, system, device, storage medium and processor
JPH1070523A (en) Method and equipment for packet transmission
WO2012151866A1 (en) Multimedia message receiving/transmission retry method and device
CN115189813A (en) OTT multicast method, system, device, multicast proxy and multicast server
CN101626287A (en) Method and device for delivering status reports

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication