CN115225976A - Data retransmission method, device, terminal equipment and storage medium - Google Patents

Data retransmission method, device, terminal equipment and storage medium Download PDF

Info

Publication number
CN115225976A
CN115225976A CN202210679817.0A CN202210679817A CN115225976A CN 115225976 A CN115225976 A CN 115225976A CN 202210679817 A CN202210679817 A CN 202210679817A CN 115225976 A CN115225976 A CN 115225976A
Authority
CN
China
Prior art keywords
service
packet
retransmission
sending
data
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
CN202210679817.0A
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.)
Hainan Qiantang Shilian Information Technology Co ltd
Original Assignee
Hainan Qiantang Shilian 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 Hainan Qiantang Shilian Information Technology Co ltd filed Critical Hainan Qiantang Shilian Information Technology Co ltd
Priority to CN202210679817.0A priority Critical patent/CN115225976A/en
Publication of CN115225976A publication Critical patent/CN115225976A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/637Control signals issued by the client directed to the server or network components
    • H04N21/6375Control signals issued by the client directed to the server or network components for requesting retransmission, e.g. of data packets lost or corrupted during transmission from server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23106Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23113Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving housekeeping operations for stored content, e.g. prioritizing content for deletion because of storage space restrictions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4335Housekeeping operations, e.g. prioritizing content for deletion because of storage space restrictions

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a data retransmission method, a data retransmission device, terminal equipment and a storage medium, wherein the method comprises the following steps: detecting whether service data exist in a downlink packet sending cache region or not according to a preset first retransmission interval time; under the condition that service data exist in a downlink packet sending buffer area, circularly acquiring a service command packet corresponding to the service data, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the acquired service command packet is sent to the receiving end device.

Description

Data retransmission method, device, terminal equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data retransmission method, apparatus, terminal device, and storage medium.
Background
In the field of video networking, all existing devices need to retransmit data packets according to an internet network retransmission mechanism such as a Transmission Control Protocol (TCP), a Fast and Reliable ARQ Protocol (KCP), and the like.
The problem that how to retransmit a service packet in video networking equipment is needed to be solved currently when service interaction is carried out among the video networking equipment and an internet communication protocol is not adopted.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a data retransmission method, apparatus, terminal device and storage medium that overcome or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention provides a data retransmission method, where the method includes:
detecting whether service data exists in a downlink packet sending buffer area or not according to a preset first retransmission interval time;
circularly acquiring a service command packet corresponding to the service data under the condition that the service data exists in the downlink packet sending buffer area, wherein the service command packet at least comprises a first retransmission time;
and if the first retransmission times is less than or equal to a first preset retransmission times, sending the acquired service command packet to receiving end equipment.
Optionally, the method further comprises:
receiving a service response packet returned by the receiving terminal equipment, and analyzing the service response packet to obtain a transaction identifier;
searching whether business data exists in the downlink packet sending cache region or not according to the transaction identifier;
and if the business data exist, deleting the business data corresponding to the transaction identifier.
Optionally, the method further comprises:
if the receiving end equipment does not receive the service command packet sent by the sending end equipment, sending a first response notification to the receiving end equipment so that the receiving end equipment deletes the service data corresponding to the transaction identifier, wherein the first response notification at least comprises the operation code of the received response notification, the transaction identifier and the fragment packet number of the service command packet.
In a second aspect, an embodiment of the present invention provides a data retransmission method, where the method includes:
detecting whether a service response packet exists in an uplink packet sending cache region or not according to a preset second retransmission interval time; wherein the service response packet corresponds to a service command packet;
circularly acquiring a service response packet under the condition that the service response packet exists in the uplink packet sending cache region, wherein the service response packet at least comprises a second retransmission time;
and if the second retransmission times are less than or equal to second preset retransmission times, sending the service response packet to the sending end equipment.
Optionally, before the detecting whether the service response packet exists in the uplink packet sending buffer area according to the preset second retransmission interval time, the method further includes:
inquiring an uplink packet sending cache region according to a transaction identifier in a service command packet sent by sending end equipment;
judging whether to process the service instruction packet or not;
and if the service instruction packet is not processed and the service corresponding to the service instruction packet is not related to lower-level equipment, storing a service response packet of the unprocessed service instruction packet in the uplink packet sending cache region.
Optionally, the method further comprises:
receiving a second response notice sent by the sending end equipment under the condition that the sending end receives the service response packet;
analyzing the second response notice to obtain a transaction identifier;
searching whether a service response packet exists in the uplink packet sending cache region or not according to the transaction identifier and the fragment packet number in the service response packet;
and if the service response packet exists, deleting the service response packet.
In a third aspect, an embodiment of the present invention provides a data retransmission apparatus, where the apparatus is applied to an apparatus including:
the first detection module is used for detecting whether service data exist in a downlink packet sending cache region according to a preset first retransmission interval time;
a first obtaining module, configured to obtain a service command packet corresponding to the service data in a cyclic manner when service data exists in the downlink packet sending buffer area, where the service command packet at least includes a first retransmission number;
and the first sending module is used for sending the acquired service command packet to the receiving end equipment if the first retransmission times are less than or equal to a first preset retransmission time.
Optionally, the apparatus further comprises a deletion module, configured to:
receiving a service response packet returned by the receiving terminal equipment, and analyzing the service response packet to obtain a transaction identifier;
searching whether business data exists in the downlink packet sending cache region or not according to the transaction identifier;
and if the business data exist, deleting the business data corresponding to the transaction identifier.
Optionally, the deleting module is further configured to:
if the receiving end equipment does not receive the service command packet sent by the sending end equipment, sending a first response notification to the receiving end equipment so that the receiving end equipment deletes the service data corresponding to the transaction identifier, wherein the first response notification at least comprises the operation code of the received response notification, the transaction identifier and the fragment packet number of the service command packet.
In a fourth aspect, an embodiment of the present invention provides a data retransmission apparatus, where the apparatus includes:
the second detection module is used for detecting whether a service response packet exists in the uplink packet sending cache region or not according to a preset second retransmission interval time;
a second obtaining module, configured to obtain a service response packet in a loop when the service response packet exists in the uplink packet sending cache region, where the service response packet at least includes a second retransmission number;
and the second sending module is used for sending the service response packet to the sending end equipment if the second retransmission times is less than or equal to a second preset retransmission times.
Optionally, the second obtaining module is further configured to:
inquiring an uplink packet sending cache region according to a transaction identifier in a service command packet sent by sending end equipment;
judging whether to process the service instruction packet or not;
and if the service instruction packet is not processed and the service corresponding to the service instruction packet is not related to lower-level equipment, storing a service response packet of the unprocessed service instruction packet in the uplink packet sending cache region.
Optionally, the apparatus further comprises a deletion module, wherein the deletion module is configured to:
receiving a second response notice sent by the sending end equipment under the condition that the sending end receives the service response packet;
analyzing the second response notice to obtain a transaction identifier;
searching whether a service response packet exists in the uplink packet sending cache region or not according to the transaction identifier and the fragment packet number in the service response packet;
and if the service response packet exists, deleting the service response packet.
In a fifth aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the data retransmission method provided by the first aspect.
In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed, the computer program implements the data retransmission method provided in the first aspect.
In a seventh aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the data retransmission method provided by the first aspect.
In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed, implements the data retransmission method provided in the first aspect.
The embodiment of the invention has the following advantages:
according to the data retransmission method, the data retransmission device, the terminal equipment and the storage medium provided by the embodiment of the invention, whether service data exist in a downlink packet sending cache region is detected according to the preset first retransmission interval time; under the condition that service data exist in a downlink packet sending buffer area, circularly acquiring a service command packet corresponding to the service data, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the acquired service command packet is sent to the receiving end device.
Drawings
FIG. 1 is a flow chart of steps of an embodiment of a data retransmission method of the present invention;
FIG. 2 is a flow chart of steps of another embodiment of a method of data retransmission of the present invention;
FIG. 3 is a flow chart of steps of a data retransmission method embodiment of the present invention;
FIG. 4 is a flow chart of steps in another embodiment of a method of data retransmission according to the present invention;
FIG. 5 is a flow chart of steps of yet another embodiment of a data retransmission method of the present invention;
FIG. 6 is a flow chart of steps of yet another data retransmission method embodiment of the present invention;
FIG. 7 is a block diagram of an embodiment of a data retransmission apparatus according to the present invention;
FIG. 8 is a block diagram of an embodiment of a data retransmission apparatus according to the present invention;
FIG. 9 is a schematic structural diagram of a terminal device according to the present invention
Fig. 10 is a schematic structural diagram of a terminal device of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The video networking is an important milestone for network development, is a real-time network, can realize high-definition video real-time transmission, and pushes a plurality of internet applications to high-definition video, and high-definition faces each other.
The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services of video, voice, pictures, characters, communication, data and the like on a system platform on a network platform, such as high-definition video conference, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mail, personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like, and realizes high-definition quality video broadcast through a television or a computer.
The nouns are explained as follows:
a core server: a core server of the video network, all the services are based on the core server;
the master control equipment: the brain of the core server receives and processes the command sent by the service layer and feeds back a service result to the service layer, and only one core server is available;
branch control equipment: the cascade connection is under the master control equipment, and a plurality of cascade connection can be provided and are mainly responsible for data forwarding;
the terminal equipment: physical equipment or simulation equipment cascaded under the sub-control equipment, wherein a plurality of sub-control equipment can be arranged under each sub-control equipment;
an embodiment of the present invention provides a data retransmission method, which is used for performing data retransmission. The execution main body of this embodiment is a data retransmission apparatus, and is disposed on the sending-end device.
Referring to fig. 1, a flowchart of steps of an embodiment of a data retransmission method according to the present invention is shown, where the method specifically includes the following steps:
s101, detecting whether service data exist in a downlink packet sending buffer area or not according to a preset first retransmission interval time;
the sending end device may be a service device or a master control device.
If the sending terminal equipment is the service equipment, the receiving terminal equipment is the main control equipment; if the sending terminal device is the master control device, the receiving terminal device is the terminal device.
In the embodiment of the present invention, a packet sending cache management block is added to the service device, the main control device and the terminal device, specifically, the service device is added with a downlink packet sending cache management module, and the downlink packet sending cache management module is used for storing and retransmitting the service command packet sent to the main control device;
the main control equipment is additionally provided with an uplink packet sending cache management module and a downlink packet sending cache management module, and the downlink packet sending cache management module is used for storing and retransmitting the service command packet sent to the terminal equipment; the uplink packet sending cache management module is used for caching and retransmitting a response packet sent to the service equipment.
And the terminal equipment is additionally provided with an uplink packet sending cache management module for storing and retransmitting the service response packet sent to the main control equipment.
If the sending end equipment is the service equipment, the service equipment encapsulates the service command packet, and the service command packet is put into the downlink sending packet buffer area in a key-value mode: key is a transaction identifier, value is a mode of a service command packet, sending times and a fragment packet number, and the service command packet is sent to the master control equipment;
the downlink packet sending buffer format is as follows:
{ "transaction identifier {" cmd ": service command packet," send _ count ":1}
The method includes configuring a first retransmission interval time and a first preset retransmission number of a service command packet in a downlink packet sending buffer area on service equipment in advance, for example, the first retransmission interval time is 3s, and the first preset retransmission number is 3 times, and detecting whether service data, that is, service content exists in the downlink packet sending buffer area according to the preset first retransmission interval time.
If the sending end device is a master control device, the receiving end device is a terminal device, specifically, the service command packet received by the master control device performs service processing, if the service needs to participate in the branch control device and the terminal device, the master control device sends the service command packet to the branch control device, and then the branch control device forwards the service command packet to the corresponding terminal device, and the master control device puts the service command packet into a downlink packet sending cache in a key-value manner:
key is the transaction identifier plus the fragment packet number, and value is the service packet and the sending times;
the downlink packet sending cache format is as follows:
{ "transaction identification + fragmentation packet number" { "cmd": service command packet, "send _ count":1}
On the master control device, a first retransmission interval time and a first preset retransmission number (for example, the first retransmission interval time is 3s, and the retransmission number is 3 times) for sending the service command packet may be configured in advance, and whether service data, that is, service content, exists in the downlink packet sending buffer area is detected according to the preset first retransmission interval time.
S102, circularly acquiring a service command packet corresponding to service data under the condition that the service data exists in a downlink packet sending buffer area, wherein the service command packet at least comprises a first retransmission time;
specifically, under the condition that the service device or the main control device detects that service data exists in the downlink packet sending buffer area, a service command packet corresponding to the service data is obtained from the downlink packet sending buffer area at intervals of a first retransmission interval, and the service command includes at least a packet transaction identifier, a first retransmission time and a service fragment identifier.
And S103, if the first retransmission times is less than or equal to the first preset retransmission times, sending the acquired service command packet to the receiving end equipment.
Specifically, the service device or the main control device determines a first retransmission time and a first preset retransmission time, and if the first retransmission time is less than or equal to the first preset retransmission time, the service device or the main control device sends the service command packet acquired from the downlink packet sending buffer area to the receiving end device.
The service equipment detects whether service data exist in the downlink packet sending cache region or not according to the first retransmission interval time, if the service data in the downlink packet sending cache region are not empty, the packet sending cache data are obtained in a circulating mode, a service command packet corresponding to each transaction identifier and a first retransmission time are obtained, and if the first retransmission time is added by 1 and is smaller than a first preset retransmission time 3, the obtained service command packet is sent to the main control equipment again; and if the retransmission times is equal to 3 after adding 1, sending the acquired service command packet to the main control equipment, and deleting the data from the downlink packet sending cache.
If the main control device judges that the service data in the downlink packet sending cache region is not empty, the main control device circularly obtains the service command packet in the cache region, namely obtains the service command packet corresponding to each transaction identifier and a first retransmission time, if the first retransmission time is added with 1 and then is less than a first preset retransmission time 3, the main control device sends the service response packet to the sub-control device again, and if the first retransmission time is added with 1 and then is equal to 3, the main control device sends the obtained service command packet to the sub-control device and deletes the data from the downlink packet sending cache region.
The data retransmission method provided by the embodiment of the invention detects whether service data exists in a downlink packet sending cache region or not according to a preset first retransmission interval time; circularly acquiring a service command packet corresponding to service data under the condition that the service data exists in a downlink packet sending buffer area, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the acquired service command packet is sent to the receiving end device.
The present invention further provides a supplementary explanation for the data retransmission method provided in the above embodiment.
As shown in fig. 2, a flow chart of steps of another embodiment of a data retransmission method of the present invention is shown, and the data retransmission method includes:
s201, detecting whether service data exist in a downlink packet sending buffer area or not according to a preset first retransmission interval time;
specifically, a first retransmission interval time and a first preset retransmission frequency are preset on the service device or the main control device, and whether service data exists in the downlink packet sending buffer area is detected every first retransmission interval time.
S202, circularly acquiring a service command packet corresponding to service data under the condition that the service data exists in a downlink packet sending cache region, wherein the service command packet at least comprises a first retransmission time;
specifically, under the condition that the service device or the main control device detects that service data exists in the downlink packet sending buffer area, a service command packet corresponding to the service data is obtained from the downlink packet sending buffer area at intervals of a first retransmission interval, and the service command includes at least a packet transaction identifier, a first retransmission time and a service fragment identifier.
And S203, if the first retransmission times is less than or equal to the first preset retransmission times, sending the acquired service command packet to the receiving end equipment.
And the service equipment or the main control equipment judges the first retransmission times and the first preset retransmission times, and if the first retransmission times is less than or equal to the first preset retransmission times, the service command packet acquired from the downlink packet sending cache region is sent to the receiving end equipment.
S204, receiving a service response packet returned by the receiving terminal equipment, and analyzing the service response packet to obtain a transaction identifier;
s205, searching whether service data exists in a downlink packet sending cache region or not according to the transaction identifier;
and S206, if the business data exist, deleting the business data corresponding to the transaction identifier.
Specifically, if the sending end device is a service device, the receiving end device is a main control device, the service device receives a service response packet returned by the main control device, analyzes a packet transaction identifier after the service response packet, searches whether corresponding service data exists in a downlink packet sending cache region according to the transaction identifier, and deletes the service data from the downlink packet sending cache region if the service data exists; and if no service data exists, discarding the data without processing.
If the sending end equipment is main control equipment and the receiving end equipment is terminal equipment, the main control equipment sends a service command packet to the terminal equipment through branch control equipment, the terminal equipment returns a service response packet to the branch control equipment after executing service operation corresponding to the service command packet, the branch control equipment returns the service response packet to the main control equipment, the main control equipment analyzes the service response packet after receiving the service response packet to obtain a transaction identifier of the service response packet, the transaction identifier corresponds to each service, the transaction identifier of each service is unique, the main control equipment searches whether corresponding service data exist in a downlink packet sending cache according to the transaction identifier, if the corresponding service data exist, the service data are deleted, and if the corresponding service data do not exist, the service data are discarded and are not processed.
S207, if the receiving end device does not receive the response receiving notification sent by the sending end device, sending a first response notification to the receiving end device, so that the receiving end device deletes the service data corresponding to the transaction identifier, where the first response notification at least includes the operation code of the response receiving notification, the transaction identifier, and the fragment packet number of the service command packet.
Specifically, when the master control device does not receive a response receiving notification sent by the service system, the master control device is caused to not clear the service data in the uplink packet sending buffer area, and send a packet to the service system until the number of times of sending the packet exceeds a set number, at this time, the service system sends a first response receiving notification to the master control device, where the first response notification includes: the operation code, transaction identifier, and packet number of the fragment (there may be multiple fragments in a service) of the response notification.
An embodiment of the present invention provides a data retransmission method, which is used for performing data retransmission. The execution main body of this embodiment is a data retransmission apparatus, and a sending end device is set.
Referring to fig. 3, a flowchart illustrating steps of an embodiment of a data retransmission method according to the present invention is shown, where the method specifically includes the following steps:
s301, detecting whether a service response packet exists in an uplink packet sending cache region according to a preset second retransmission interval time; wherein, the service response packet corresponds to the service command packet;
specifically, the main control device receives a service command packet sent by the service device, if the service command packet does not need to participate in the sub-control device and the terminal device, the main control device executes a service corresponding to the service command packet, generates a service response packet after the service is completed, sends the service response packet to the service device, and simultaneously puts the service response packet into an uplink packet sending cache region in a key-value manner, wherein the key is a user identifier + a transaction identifier + a fragment packet number, and the value is the service response packet and the sending times; and (3) user identification: the identifier corresponding to the user name used by the service system to log in the core server may be a plurality of users to log in the main control device, and the main control device distinguishes which user the service command comes from according to the user identifier.
The uplink packet sending and buffering format is as follows:
{ "user identification + transaction identification + fragmentation packet number" { "cmd": service response packet, "send _ count":1} }.
If a service command packet sent by a service system is sent to a main control device, and a service corresponding to the service command packet needs to be executed by a terminal device, the main control device sends the service command packet to the terminal device through a sub-control device, the terminal device generates a service response packet after executing the service, sends the service response packet to the main control device, and simultaneously puts the service response packet into an uplink packet sending cache region in a key-value mode, wherein the key is a transaction identifier plus a fragment packet number, and the value is a service response packet and a sending frequency mode;
the uplink packet sending and buffering format is as follows: { "transaction identification + fragmentation packet number" { "cmd": traffic response packet, "send _ count":1} }.
On the main control device or the terminal device, a second retransmission interval time and a second preset retransmission number (for example, the second retransmission interval time is 3s, and the retransmission number is 3 times) for sending the service command packet may be configured in advance, and whether the service response packet exists in the uplink packet sending buffer area is detected according to the preset second retransmission interval time.
S302, circularly acquiring a service response packet under the condition that the service response packet exists in the uplink packet sending cache region, wherein the service response packet at least comprises a second retransmission time;
specifically, the master control device or the terminal device obtains a service response packet corresponding to the service data from the uplink packet sending buffer area at intervals of a second retransmission interval under the condition that the service response packet is detected to exist in the uplink packet sending buffer area, where the service response includes at least a packet transaction identifier and a second retransmission number.
And S303, if the second retransmission times is less than or equal to the second preset retransmission times, sending the service response packet to the sending end equipment.
Specifically, the main control device or the terminal device determines the second retransmission number and the second preset retransmission number, and if the second retransmission number is less than or equal to the second preset retransmission number, the service response packet acquired from the uplink packet sending buffer area is sent to the sending end device.
Exemplarily, a second retransmission interval time and a second preset retransmission number (for example, the second retransmission interval time is 3s, and the second preset retransmission number is 3 times) of the data packet may be configured on the main control device, the uplink packet transmission cache data is detected after the second retransmission interval time, if the packet transmission cache data is not empty, the cached service response packet is cyclically acquired, and the service response packet and the second retransmission number corresponding to each user identifier + transaction identifier + fragmented packet number are acquired;
and if the second retransmission times is added with 1 and then is less than a second preset retransmission times 3, the main control equipment sends the service response packet to the service system again, and if the second retransmission times is added with 1 and then is equal to the second preset retransmission times 3, the obtained service response packet is sent to the service system, and the service response packet is deleted from the uplink packet sending cache region.
After receiving the service response packet, the terminal device performs service processing, encapsulates the service response packet after the terminal device completes the service and sends the service response packet to the master control, and meanwhile, the service response packet is placed into an uplink packet sending cache in a key-value mode: key is transaction identification + fragment packet number, value is service response packet, and the uplink packet sending cache format of the sending times is as follows: { "transaction identification + fragmentation packet number" { "cmd": service response packet, "send _ count":1}
Configuring a second retransmission interval time and a second preset retransmission number of data packets on the terminal device, for example, the second retransmission interval time is 3s, the second retransmission number is 3 times, detecting the uplink packet cache data after the second retransmission interval time, if the service response packet in the uplink packet cache region is not empty, cyclically acquiring the service response packet, and acquiring the service response packet and the second retransmission number corresponding to the transaction identifier, if the second retransmission number is less than the second preset retransmission number 3 after adding 1, the terminal device sends the service response packet to the main control device again through the sub-control device, and if the second retransmission number is equal to the second preset retransmission number 3 after adding 1, the terminal device sends the service response packet to the main control device again through the sub-control device, and deletes the service response packet from the uplink packet cache region at the same time.
The data retransmission method provided by the embodiment of the invention detects whether service data exists in a downlink packet sending cache region or not according to a preset first retransmission interval time; circularly acquiring a service command packet corresponding to service data under the condition that the service data exists in a downlink packet sending buffer area, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the acquired service command packet is sent to the receiving end device.
The present invention further provides a supplementary description of the data retransmission method provided in the above embodiment.
As shown in fig. 4, a flowchart of steps of another embodiment of a data retransmission method according to the present invention is shown, where the data retransmission method includes:
s401, inquiring an uplink packet sending cache region according to a transaction identifier in a service command packet sent by sending end equipment;
s402, judging whether to process the service instruction packet;
and S403, if the service instruction packet is not processed and the service corresponding to the service instruction packet is not related to the subordinate device, storing the service response packet of the unprocessed service instruction packet in an uplink packet sending cache region.
S404, detecting whether a service response packet exists in the uplink packet sending cache region according to a preset second retransmission interval time; wherein, the service response packet corresponds to the service command packet;
s405, circularly acquiring a service response packet under the condition that the service response packet exists in the uplink packet sending cache region, wherein the service response packet at least comprises a second retransmission time;
and S406, if the second retransmission times is less than or equal to the second preset retransmission times, sending the service response packet to the sending end equipment.
S407, receiving a second response notification sent by the sending end equipment under the condition that the sending end receives the service response packet;
s408, analyzing the second response notice to obtain a transaction identifier;
s409, searching whether a service response packet exists in an uplink packet sending buffer area or not according to the transaction identifier and the number of the fragment packet in the service response packet;
and S410, if the service response packet exists, deleting the service response packet.
Specifically, after receiving a service response packet returned by the terminal, the main control device sends a received response notification to the terminal device, and after receiving the notification, the terminal device analyzes the received response notification, finds whether a service response packet exists in the uplink packet sending cache region according to the transaction identifier and the fragment packet number, and if the service response packet exists, deletes the service response packet in the uplink packet sending cache region.
Fig. 5 is a flowchart of steps of another embodiment of a data retransmission method according to the present invention, in which a service system is connected to a main control device through a link a and a link B, the main control device is connected to a first sub-control device through a link C and a link D, the first sub-control device is connected to a terminal device through a link H and a link G, the main control device is connected to a second sub-control device through a link E and a link F, and the second sub-control device is connected to the terminal device through a link I and a link J. The link A and the link B are the same link, but the link A and the link B are respectively used for uplink transmission data and downlink transmission data; the link C and the link D are the same link and are respectively used for uplink transmission data and downlink transmission data; the link E and the link F are the same link, but the link E and the link F are respectively used for uplink transmission data and downlink transmission data; link I and link J are the same link, but link I and link J are used for uplink and downlink transmission of data, respectively.
The service system sends a service command packet to the main control equipment through the link A, and the service packet does not reach the sub-control equipment due to the network reason of the link A; or the main control device already exceeds the maximum capacity of the service processing currently, and the service command packet is discarded by the main control device and is not processed.
If the network between the service system and the main control equipment is recovered at the moment or the main control equipment is recovered within the maximum processing service peak value, the main control equipment receives the service command packet to process the service and returns a service processing response packet to the service system.
The service response packet processing module in the service system receives and processes the service response packet returned by the main control equipment, analyzes the packet data to obtain the transaction identifier and other service information for service processing, and deletes the data from the packet sending cache according to the transaction identifier and sends a response receiving notice to the main control equipment, so that the main control equipment deletes the corresponding data in the uplink packet sending cache region.
The service system is informed to send once when receiving the response, if the main control equipment does not receive the response, the data in the uplink packet sending buffer in the main control equipment can be cleared only by a retransmission time mechanism.
The main control equipment receives the service request and then analyzes the transaction identifier, inquires whether the uplink packet cache exists according to the user identifier and the transaction identifier, and if the uplink packet cache exists, the uplink packet cache is not processed. If the response packet does not reach the service system due to the failure of the link B, the service system can be caused to send the service command packet to the main control equipment again, and if the response packet does not reach the service system, the subsequent service processing is analyzed.
The main control equipment sends a service command packet to the branch control equipment through a link C, and the service packet does not reach the branch control equipment due to the network reason of the link C; or the sub-control equipment exceeds the maximum processing capacity of the service, and the service command packet is discarded by the sub-control equipment and is not processed; or the line G network reason service packet does not reach the terminal equipment, and the like, the downlink service packet cache management module in the main control equipment initiates a command packet to the sub-control equipment again after the set retransmission interval time;
if the network of the line C, G is recovered at this time, or the sub-control device has recovered to be within the maximum processing service peak value, the service packet reaches the terminal device, the terminal device receives the service command packet to process the service, and returns a service processing response packet to the main control device through the sub-control device.
The service response packet processing module in the main control equipment receives and processes the service response packet returned by the terminal, analyzes the packet data to obtain the transaction identifier and other service information for service processing, and simultaneously deletes the data from the downlink packet sending cache according to the transaction identifier and sends a response receiving notice to the terminal equipment through sub-control to enable the terminal equipment to delete the corresponding data in the uplink packet sending cache
The main control device is informed to send once when receiving the response, if the terminal device does not receive the response, the data in the uplink packet sending buffer in the terminal device can be cleared only by means of exceeding the retransmission times mechanism.
If the link D, H is abnormal, which causes the service response packet not to reach the master control device, the master control device will cause the service command packet to be sent to the terminal device again, and if the service response packet does not reach the master control device, the subsequent service processing is analyzed.
Fig. 6 is a flowchart of steps of another embodiment of a data retransmission method according to the present invention, the data retransmission method at least includes:
1. the service system encapsulates the service command packet, and the service command packet is put into the downlink packet sending cache in a key-value mode: key is a transaction identifier, value is a mode of a service command packet, sending times and a fragment packet number, and a downlink packet sending cache format of the service command packet is sent to the main control device, for example: { "transaction identifier {" cmd ": service command packet," send _ count ":1}
2. Starting a downlink packet sending cache management module, configuring retransmission interval time and retransmission times (for example, the default retransmission interval time is 3s, and the retransmission times are 3 times) of a service command packet in a downlink packet sending cache, detecting downlink packet sending cache data after the set retransmission interval time, circularly acquiring the packet sending cache data if the cache data is not empty, acquiring the service command packet and the retransmission times corresponding to each transaction identifier, and retransmitting the acquired cache service command packet to a main control device if the retransmission times are less than 3 after adding 1; if the retransmission times is equal to 3 after adding 1, sending the obtained cache service command packet to the main control equipment, and simultaneously deleting the data from the downlink packet sending cache;
3. after the service system initiates a service packet to the master control device for the first time, waiting for 3s × 3 (also can be the timeout time defined by the service system), and then not receiving a service processing response packet returned by the master control device, prompting that the service processing is overtime, and deleting the data (if the data exists) from the packet sending cache;
4. the main control equipment receives the service request to process the service, if the service does not need sub-control and terminal participation, the main control equipment encapsulates the service response packet after completing the service and sends the service response packet to the service system, and meanwhile, the service response packet is put into an uplink packet sending cache in a key-value mode: key is the number of the user identifier, the transaction identifier and the fragment packet, and value is the service response packet and the sending times;
and (3) user identification: the identification corresponding to the user name used for logging in the core server by the service system can be a plurality of users to log in the main control equipment, and the main control equipment distinguishes which user the service command comes from according to the user identification;
the uplink packet sending buffer format is as follows: the method comprises the following steps of { "user identification + transaction identification + fragmentation packet number" { "cmd": service response packet, "send _ count":1} };
the main control equipment receives the service request and then analyzes a transaction identifier, inquires whether an uplink packet cache exists or not according to the user identifier and the transaction identifier, if so, the uplink packet cache does not process the transaction identifier (if a response packet does not reach the service system due to the failure of a line B in 4.1, the service system sends a service command packet to the main control equipment again), and if not, the main control equipment analyzes the subsequent service processing.
Starting an uplink packet sending cache management module, configuring retransmission interval time and retransmission times of a data packet (for example, the default retransmission interval time is 3s, and the retransmission times is 3 times), detecting uplink packet sending cache data after the specified interval time, circularly acquiring the cache data if the packet sending cache data is not empty, acquiring a service response packet and the retransmission times corresponding to each user identifier + transaction identifier + fragmented packet number, if the retransmission times is less than 3 after adding 1, sending the acquired cache service response packet to a service system again, and if the retransmission times is equal to 3 after adding 1, sending the acquired cache service response packet to the service system and deleting the data from an uplink packet sending cache;
if the service system receives the service response packet sent by the service master control and then sends a received response notification to the master control equipment, the master control equipment analyzes the notification data after receiving the notification of the service system, finds whether the uplink packet sending cache exists according to the user identification, the transaction identification and the fragment packet number, and deletes the data if the uplink packet sending cache exists.
5. The main control equipment receives the service request to process the service, if the service needs sub-control and terminal participation, the main control equipment sends a service instruction packet to the sub-control, and the sub-control equipment forwards the service packet to the corresponding terminal to be put into a downlink packet sending cache in a key-value mode: key is the transaction identifier plus the fragment packet number, and value is the service packet and the sending times;
downlink packet sending buffer format: { "transaction identification + fragmentation packet number" { "cmd": traffic command packet, "send _ count":1} }.
Starting a downlink packet sending cache management module, configuring retransmission interval time and retransmission times of a data packet (for example, the default retransmission interval time is 3s, and the retransmission times is 3 times), detecting downlink packet sending cache data after a specified interval time, circularly acquiring cache data if the packet sending cache data is not empty, acquiring a service command packet and the retransmission times corresponding to each transaction identifier, retransmitting a service response packet to a branch control if the retransmission times is less than 3 after adding 1, transmitting the acquired cache service packet to the branch control if the retransmission times is equal to 3 after adding 1, and deleting the data from a downlink packet sending cache.
And starting a service response packet processing module, analyzing a packet transaction identifier after receiving a service processing response packet returned by the sub-control equipment, searching whether corresponding data exists in a downlink packet sending cache or not according to the transaction identifier, deleting the data from the cache if the corresponding data exists in the downlink packet sending cache, and discarding the data if the corresponding data does not exist in the downlink packet sending cache (possibly, the terminal equipment does not receive a response receiving notice sent by the main control, so that the terminal equipment does not empty the corresponding data in the uplink packet sending cache, and sending the packet to the main control equipment until the set times are exceeded).
Meanwhile, sending a receiving response notice to the corresponding terminal through the sub-control equipment, wherein the notice comprises: opcode (receive response notification), transaction identification, fragment packet number (there may be multiple fragment packets for a service).
After the master control device initiates a service packet to the slave control device for the first time, waiting for 3s × 3 (also can be the timeout time defined by the master control device), and then not receiving a service processing response packet corresponding to the transaction identifier returned by the slave control device, encapsulating the service response packet and sending the service response packet to the service system, wherein the error identifier in the service response packet is information such as "service processing timeout" and deleting the data (if the data exists) from the downlink packet sending cache.
6. The terminal equipment receives the service request to process the service, the terminal equipment encapsulates the service response packet after completing the service and sends the service response packet to the master control, and meanwhile, the service response packet is put into an uplink packet sending cache in a key-value mode: key is transaction identification + fragment packet number, value is service response packet, and the uplink packet sending cache format of the sending times is as follows: { "transaction identification + fragmentation packet number" { "cmd": service response packet, "send _ count":1} };
the sub-control device receives the service request and then analyzes a transaction identifier, inquires whether an uplink packet cache exists according to the transaction identifier, if so, does not process the transaction (for example, if the response packet does not reach the main control due to the abnormal circuit D, H in 4.1, the main control can send the service command packet to the terminal device again), and if not, analyzes the subsequent service processing.
Starting an uplink packet sending buffer management module, configuring retransmission interval time and retransmission times of data packets (for example, default retransmission interval time is 3s, and retransmission times is 3 times), detecting uplink packet sending buffer data after specified interval time, circularly acquiring buffer data if the uplink packet sending buffer data is not empty, acquiring a service response packet and retransmission times corresponding to a transaction identifier, sending the service response packet to a main control again through sub-control if the retransmission times is less than 3 after adding 1, and sending the service response packet to the main control again through sub-control if the retransmission times is equal to 3 after adding 1, and deleting the data from the uplink packet sending buffer.
7. The main control equipment sends a received response notice to the terminal equipment after receiving a service response packet returned by the terminal equipment, and the terminal equipment analyzes the notice data after receiving the notice, finds whether the uplink packet sending cache exists according to the transaction identifier and the fragment packet number, and deletes the data if the uplink packet sending cache exists.
8. Analyzing a packet transaction identifier after receiving a service processing response packet returned by the master control equipment, searching whether corresponding data exists in a downlink packet sending cache or not according to the transaction identifier, and deleting the data from the cache if the corresponding data exists; if not, discarding the non-processed data (possibly, the main control device does not receive a received response notification sent by the service system, so that the main control device does not empty the corresponding data in the uplink packet sending cache, and sends the packet to the service system until the set number of times is exceeded), and meanwhile, sending the received response notification to the main control device, wherein the notification includes: opcode (notification of response received), transaction identification, fragmented packet number (there may be multiple fragmented packets for a service).
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those of skill in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the embodiments of the invention.
The data retransmission method provided by the embodiment of the invention detects whether service data exists in a downlink packet sending cache region or not according to a preset first retransmission interval time; circularly acquiring a service command packet corresponding to service data under the condition that the service data exists in a downlink packet sending buffer area, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the acquired service command packet is sent to the receiving end device.
Another embodiment of the present invention provides a data retransmission apparatus, configured to execute the data retransmission method provided in the foregoing embodiment.
Referring to fig. 7, a block diagram of an embodiment of a data retransmission apparatus according to the present invention is shown, where the apparatus may be applied in a video network, and specifically includes the following modules: a first detection module 701, a first obtaining module 702, and a first sending module 703, wherein:
the first detection module 701 is configured to detect whether there is service data in a downlink packet sending buffer area according to a preset first retransmission interval time;
the first obtaining module 702 is configured to obtain a service command packet corresponding to service data in a cyclic manner when the service data exists in a downlink packet sending buffer area, where the service command packet at least includes a first retransmission number;
the first sending module 703 is configured to send the obtained service command packet to the receiving end device if the first retransmission number is less than or equal to a first preset retransmission number.
The data retransmission device provided by the embodiment of the invention detects whether service data exists in a downlink packet sending cache region or not according to the preset first retransmission interval time; circularly acquiring a service command packet corresponding to service data under the condition that the service data exists in a downlink packet sending buffer area, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the acquired service command packet is sent to the receiving end device.
The present invention further provides a supplementary explanation of the data retransmission apparatus provided in the above embodiment.
Optionally, the apparatus further comprises a deletion module, the deletion module is configured to:
receiving a service response packet returned by the receiving terminal equipment, and analyzing the service response packet to obtain a transaction identifier;
searching whether business data exists in a downlink packet sending cache region or not according to the transaction identifier;
and if the business data exist, deleting the business data corresponding to the transaction identifier.
Optionally, the deleting module is further configured to:
if the receiving end equipment does not receive the response receiving notification sent by the sending end equipment, sending a first response notification to the receiving end equipment so that the receiving end equipment deletes the service data corresponding to the transaction identifier, wherein the first response notification at least comprises the operation code of the received response notification, the transaction identifier and the fragment packet number of the service command packet.
It should be noted that the respective implementable modes in the present embodiment may be implemented individually, or may be implemented in combination in any combination without conflict, and the present application is not limited thereto.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The data retransmission device provided by the embodiment of the invention detects whether service data exists in a downlink packet sending cache region or not according to the preset first retransmission interval time; circularly acquiring a service command packet corresponding to service data under the condition that the service data exists in a downlink packet sending buffer area, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the obtained service command packet is sent to the receiving end equipment
Another embodiment of the present invention provides a data retransmission apparatus, configured to execute the data retransmission method provided in the foregoing embodiment.
Referring to fig. 8, a block diagram of an embodiment of a data retransmission apparatus according to the present invention is shown, where the apparatus may be applied in a video network, and specifically includes the following modules: a second detecting module 801, a second obtaining module 802, and a second sending module 803, wherein:
the second detection module 801 is configured to detect whether a service response packet exists in the uplink packet sending cache region according to a preset second retransmission interval time;
the second obtaining module 802 is configured to obtain and send the service response packet in a loop under the condition that the service response packet exists in the uplink packet sending buffer area, where the service response packet at least includes the second retransmission times;
the second sending module 803 is configured to send the service response packet to the sending end device if the second retransmission number is less than or equal to a second preset retransmission number.
The data retransmission device provided by the embodiment of the invention detects whether service data exists in a downlink packet sending cache region or not according to the preset first retransmission interval time; circularly acquiring a service command packet corresponding to service data under the condition that the service data exists in a downlink packet sending buffer area, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the obtained service command packet is sent to the receiving end device.
The present invention further provides a supplementary explanation of the data retransmission apparatus provided in the above embodiment.
Optionally, the second obtaining module is further configured to:
inquiring an uplink packet sending cache region according to a transaction identifier in a service command packet sent by sending end equipment;
judging whether to process the service instruction packet;
and if the service instruction packet is not processed and the service corresponding to the service instruction packet is not related to the subordinate equipment, storing the service response packet of the unprocessed service instruction packet in an uplink packet sending cache region.
Optionally, the apparatus further comprises a deletion module, the deletion module is configured to:
receiving a second response notice sent by the sending end equipment under the condition that the sending end receives the service response packet;
analyzing the second response notice to obtain a transaction identifier;
searching whether a service response packet exists in an uplink packet sending cache region or not according to the transaction identifier and the fragment packet number in the service response packet;
and if the service response packet exists, deleting the service response packet.
It should be noted that the respective implementable modes in the present embodiment may be implemented individually, or may be implemented in combination in any combination without conflict, and the present application is not limited thereto.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The data retransmission device provided by the embodiment of the invention detects whether service data exists in a downlink packet sending cache region or not according to the preset first retransmission interval time; circularly acquiring a service command packet corresponding to service data under the condition that the service data exists in a downlink packet sending buffer area, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the acquired service command packet is sent to the receiving end device.
Still another embodiment of the present invention provides a terminal device, configured to execute the data retransmission method provided in the foregoing embodiment.
Fig. 9 is a schematic structural diagram of a terminal device of the present invention, and as shown in fig. 9, the terminal device includes: at least one processor 901 and memory 902;
the memory stores a computer program; at least one processor executes the computer program stored in the memory to implement the data retransmission method provided by the above-mentioned embodiments.
The terminal device provided in this embodiment detects whether there is service data in the downlink packet sending buffer area according to a preset first retransmission interval time; circularly acquiring a service command packet corresponding to service data under the condition that the service data exists in a downlink packet sending buffer area, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the obtained service command packet is sent to the receiving end device.
Yet another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, the method for retransmitting data provided in any one of the above embodiments is implemented.
According to the computer-readable storage medium of the embodiment, whether service data exists in a downlink packet sending buffer area is detected according to a preset first retransmission interval time; under the condition that service data exist in a downlink packet sending buffer area, circularly acquiring a service command packet corresponding to the service data, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the acquired service command packet is sent to the receiving end device.
Still another embodiment of the present invention provides a terminal device, configured to execute the data retransmission method provided in the foregoing embodiment.
Fig. 10 is a schematic structural diagram of a terminal device of the present invention, and as shown in fig. 10, the terminal device includes: at least one processor 1001 and memory 1002;
the memory stores a computer program; at least one processor executes the computer program stored in the memory to implement the data retransmission method provided by the above-mentioned embodiments.
The terminal device provided in this embodiment detects whether there is service data in the downlink packet sending buffer area according to a preset first retransmission interval time; under the condition that service data exist in a downlink packet sending buffer area, circularly acquiring a service command packet corresponding to the service data, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the obtained service command packet is sent to the receiving end device.
Yet another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, the method for retransmitting data provided in any one of the above embodiments is implemented.
According to the computer-readable storage medium of the embodiment, whether service data exists in a downlink packet sending buffer area is detected according to a preset first retransmission interval time; circularly acquiring a service command packet corresponding to service data under the condition that the service data exists in a downlink packet sending buffer area, wherein the service command packet at least comprises a first retransmission time; if the first retransmission times is less than or equal to the first preset retransmission times, the acquired service command packet is sent to the receiving end device.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, 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 present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) 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, electronic devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 electronic device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing electronic 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 electronic devices 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 electronic device to cause a series of operational steps to be performed on the computer or other programmable electronic device to produce a computer implemented process such that the instructions which execute on the computer or other programmable electronic device 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 of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or electronic device 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 electronic device. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or electronic device that comprises the element.
The foregoing describes in detail a data retransmission method and a data retransmission apparatus provided by the present invention, and specific examples are applied herein to explain the principles and embodiments of the present invention, and the descriptions of the foregoing embodiments are only used to help understand the method and the core ideas of the present 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.

Claims (10)

1. A method for retransmitting data, the method comprising:
detecting whether service data exist in a downlink packet sending cache region or not according to a preset first retransmission interval time;
circularly acquiring a service command packet corresponding to the service data under the condition that the service data exists in the downlink packet sending buffer area, wherein the service command packet at least comprises a first retransmission time;
and if the first retransmission times is less than or equal to a first preset retransmission times, sending the acquired service command packet to receiving end equipment.
2. The method of claim 1, further comprising:
receiving a service response packet returned by the receiving terminal equipment, and analyzing the service response packet to obtain a transaction identifier;
searching whether the service data exists in the downlink packet sending cache region or not according to the transaction identifier;
and if the business data exist, deleting the business data corresponding to the transaction identifier.
3. The method of claim 1, further comprising:
if the receiving end equipment does not receive the service command packet sent by the sending end equipment, sending a first response notification to the receiving end equipment so that the receiving end equipment deletes the service data corresponding to the transaction identifier, wherein the first response notification at least comprises the operation code of the received response notification, the transaction identifier and the fragment packet number of the service command packet.
4. A method of data retransmission, the method comprising:
detecting whether a service response packet exists in an uplink packet sending cache region or not according to a preset second retransmission interval time; the service response packet corresponds to a service command packet;
circularly acquiring a service response packet under the condition that the service response packet exists in the uplink packet sending cache region, wherein the service response packet at least comprises a second retransmission time;
and if the second retransmission times are less than or equal to second preset retransmission times, sending the service response packet to the sending end equipment.
5. The method according to claim 4, wherein before the detecting whether the service response packet exists in the uplink packet sending buffer area according to the preset second retransmission interval time, the method further comprises:
inquiring an uplink packet sending cache region according to a transaction identifier in a service command packet sent by sending end equipment;
judging whether to process the service instruction packet;
and if the service instruction packet is not processed and the service corresponding to the service instruction packet is not related to lower-level equipment, storing a service response packet of the unprocessed service instruction packet in the uplink packet sending cache region.
6. The method of claim 4, further comprising:
receiving a second response notice sent by the sending end equipment under the condition that the sending end receives the service response packet;
analyzing the second response notice to obtain a transaction identifier;
searching whether a service response packet exists in the uplink packet sending cache region or not according to the transaction identifier and the fragment packet number in the service response packet;
and if the service response packet exists, deleting the service response packet.
7. An apparatus for retransmitting data, the apparatus comprising:
the first detection module is used for detecting whether service data exist in a downlink packet sending cache region or not according to a preset first retransmission interval time;
a first obtaining module, configured to obtain a service command packet corresponding to the service data in a cyclic manner when service data exists in the downlink packet sending buffer area, where the service command packet at least includes a first retransmission number;
and the first sending module is used for sending the acquired service command packet to the receiving end equipment if the first retransmission times are less than or equal to a first preset retransmission time.
8. An apparatus for retransmitting data, the apparatus comprising:
the second detection module is used for detecting whether a service response packet exists in the uplink packet sending cache region according to a preset second retransmission interval time;
a second obtaining module, configured to obtain a service response packet in a cycle when the service response packet is present in the uplink packet sending cache region, where the service response packet at least includes a second retransmission number;
and the second sending module is used for sending the service response packet to the sending end equipment if the second retransmission times is less than or equal to a second preset retransmission times.
9. A terminal device, comprising: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the data retransmission method of any of claims 1-3 or 4-6.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when executed, implements the data retransmission method according to any one of claims 1-3 or 4-6.
CN202210679817.0A 2022-06-16 2022-06-16 Data retransmission method, device, terminal equipment and storage medium Pending CN115225976A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210679817.0A CN115225976A (en) 2022-06-16 2022-06-16 Data retransmission method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210679817.0A CN115225976A (en) 2022-06-16 2022-06-16 Data retransmission method, device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115225976A true CN115225976A (en) 2022-10-21

Family

ID=83608256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210679817.0A Pending CN115225976A (en) 2022-06-16 2022-06-16 Data retransmission method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115225976A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108234599A (en) * 2017-12-06 2018-06-29 链家网(北京)科技有限公司 A kind of message repeating method and system
CN111132358A (en) * 2019-12-19 2020-05-08 RealMe重庆移动通信有限公司 Data packet transmission method, terminal and storage medium
CN112905930A (en) * 2019-12-04 2021-06-04 北京沃东天骏信息技术有限公司 Interface request retransmission method and device
CN113676605A (en) * 2020-05-15 2021-11-19 腾讯科技(深圳)有限公司 Data transmission method, device, equipment and computer readable storage medium
WO2022011655A1 (en) * 2020-07-16 2022-01-20 北京小米移动软件有限公司 Retransmission request method and apparatus, and retransmitted data reception method and apparatus
CN113992766A (en) * 2021-10-25 2022-01-28 浙江吉利控股集团有限公司 Data transmission system, method, equipment and storage medium based on UDP

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108234599A (en) * 2017-12-06 2018-06-29 链家网(北京)科技有限公司 A kind of message repeating method and system
CN112905930A (en) * 2019-12-04 2021-06-04 北京沃东天骏信息技术有限公司 Interface request retransmission method and device
CN111132358A (en) * 2019-12-19 2020-05-08 RealMe重庆移动通信有限公司 Data packet transmission method, terminal and storage medium
CN113676605A (en) * 2020-05-15 2021-11-19 腾讯科技(深圳)有限公司 Data transmission method, device, equipment and computer readable storage medium
WO2022011655A1 (en) * 2020-07-16 2022-01-20 北京小米移动软件有限公司 Retransmission request method and apparatus, and retransmitted data reception method and apparatus
CN113992766A (en) * 2021-10-25 2022-01-28 浙江吉利控股集团有限公司 Data transmission system, method, equipment and storage medium based on UDP

Similar Documents

Publication Publication Date Title
CN101340268B (en) Implementing method and system for inter-node communication confirming mechanism
EP1655915B1 (en) Method for managing duplicated arrival notification messages in multimedia messaging services
CN113508611B (en) Method and apparatus for flexibly supporting service in wireless communication system
CN106612284B (en) Streaming data transmission method and device
WO2018166415A1 (en) Cloud storage system, media data storage method and system
CN113114651B (en) Report control method, device, equipment and medium
CN109547524B (en) User behavior storage method, device, equipment and storage medium based on Internet of things
CN110944039B (en) Micro-service discovery method, system and device for 5G access network
CN107623752B (en) Network management method and device based on link layer
CN110996056B (en) Video storage method and device of cascade monitoring system
CN111131179B (en) Service processing method, device, network equipment and storage medium
CN110650097B (en) Data broadcasting method and device and computer readable storage medium
CN116599953B (en) File uploading method, device, system, equipment and readable storage medium
US20080212505A1 (en) Method and receiving apparatus for processing arq block in wibro system
US10931529B2 (en) Terminal device management method, server, and terminal device for managing terminal devices in local area network
CN117082054A (en) Data transmission method, device, system and medium
CN115225976A (en) Data retransmission method, device, terminal equipment and storage medium
Phung et al. Enhancing rest http with random linear network coding in dynamic edge computing environments
CN105592485A (en) Method for collecting and processing messages in real time based on SNMP
CN108988994B (en) Message retransmission method and device
EP3002910A1 (en) Connecting computer management systems via cellular digital telecommunication networks
CN110166185B (en) Audio data processing method and device, storage medium and processor
CN109792444B (en) Play-out buffering in a live content distribution system
CN112004161A (en) Processing method and device of address resources, terminal equipment and storage medium
CN115361262B (en) Method and system for realizing FTP (File transfer protocol) reporting of transmission equipment performance file

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