CN111064674A - Data transmission method, device and system - Google Patents

Data transmission method, device and system Download PDF

Info

Publication number
CN111064674A
CN111064674A CN201911072280.6A CN201911072280A CN111064674A CN 111064674 A CN111064674 A CN 111064674A CN 201911072280 A CN201911072280 A CN 201911072280A CN 111064674 A CN111064674 A CN 111064674A
Authority
CN
China
Prior art keywords
node
data
information
timestamp
self
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.)
Granted
Application number
CN201911072280.6A
Other languages
Chinese (zh)
Other versions
CN111064674B (en
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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201911072280.6A priority Critical patent/CN111064674B/en
Publication of CN111064674A publication Critical patent/CN111064674A/en
Application granted granted Critical
Publication of CN111064674B publication Critical patent/CN111064674B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/19Flow control; Congestion control at layers above the network layer
    • 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/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Landscapes

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

Abstract

The invention provides a data transmission method, a device and a system, wherein the method comprises the following steps: receiving first information sent by a first node, wherein the first information carries first data and a first session identifier; after the first information is cached successfully in the local area, receiving second information sent by the first node, wherein the second information carries second data and a second session identifier; and carrying out duplicate removal on the first data and the second data according to the first session identification and the second session identification. The invention solves the technical problem of multiple data transmission in the related technology and ensures the reliability in the data transmission process.

Description

Data transmission method, device and system
Technical Field
The invention relates to the field of air conditioners, in particular to a data transmission method, a data transmission device and a data transmission system.
Background
In the related art, ACK is called acknowledgement, which means acknowledgement. In a Transmission Control Protocol (TCP), an ACK mechanism is provided by default, and data received by a communication party is acknowledged by a standard ACK standard packet carried by a Protocol itself, so that the communication sender is informed that the data has been acknowledged.
In the related art, the TCP layer ACK mechanism can only ensure whether a network layer message arrives, and in the process of transmitting a message to an application layer by a network layer, if the TCP connection is disconnected, the network layer will not receive data any more, and directly recover a data buffer and socket resources, and when the buffer has not yet reached to transmit data to the application layer, a data loss problem occurs. In addition, the received data is not subjected to deduplication processing and is directly transmitted to an application layer, so that the problem of repeated data transmission can occur, and the inaccuracy of statistical data is caused.
In the process of acquiring energy data information, the requirement on the reliability of data is high, particularly the data statistics level is involved, but in the process of acquiring energy data, the problems of multiple times, frame loss, packet sticking and the like exist, and the problem can be solved by introducing the ACK mechanism into the processing unit.
In view of the above problems in the related art, no effective solution has been found at present.
Disclosure of Invention
The embodiment of the invention provides a data transmission method, a device and a system.
According to an embodiment of the present invention, there is provided a data transmission method including: receiving first information sent by a first node, wherein the first information carries first data and a first session identifier; after the first information is cached successfully in the local area, receiving second information sent by the first node, wherein the second information carries second data and a second session identifier; and carrying out duplicate removal on the first data and the second data according to the first session identification and the second session identification.
Optionally, after receiving the first information sent by the first node and before receiving the second information sent by the first node, the method further includes: feeding back a first acknowledgement message of the first data to the first node.
Optionally, after the deduplication is performed on the first data and the second data according to the first session identifier and the second session identifier, the method further includes: pushing third information to a second node, and storing the third information in a local message queue, wherein the third information carries the first data and a first timing identifier; when a second confirmation message fed back by the second node aiming at the first data is not received within preset time, searching the third information in a local message queue, and retransmitting the third information to the second node; and deleting the third information in the local message queue when a second confirmation message fed back by the second node aiming at the first data is received within a preset time.
Optionally, pushing the third information to the second node includes one of: third information is pushed to a second node, wherein the third information carries the first data and a first timestamp, and the first timestamp is used for updating local latest message time by the second node; and pushing third information to a second node, wherein the third information carries the first data and a first self-increment sequence, and the first self-increment sequence is used for updating a local latest message sequence in a distributed network by the second node.
Optionally, when the first timing identifier is the first timestamp, after the third information is pushed to the second node, the method further includes: receiving a first retransmission request sent by the second node, wherein the first retransmission request carries a second timestamp, and the second timestamp is a local latest message time of the second node; judging whether the first timestamp is later than the second timestamp; and when the first timestamp is later than the second timestamp, retransmitting all messages of the local message queue after the second timestamp to the second node.
Optionally, when the first timing identifier is a first self-increment sequence, after the third information is pushed to the second node, the method further includes: receiving a second retransmission request sent by the second node, wherein the second retransmission request carries a second self-increment sequence, and the second self-increment sequence is a local latest message sequence of the second node; judging whether the first self-increment sequence is larger than the second self-increment sequence;
retransmitting all messages of the local message queue after the second self-increasing sequence to the second node when the first self-increasing sequence is greater than the second self-increasing sequence.
According to another embodiment of the present invention, there is provided a data transmission apparatus including: the first receiving module is used for receiving first information sent by a first node, wherein the first information carries first data and a first session identifier; a second receiving module, configured to receive second information sent by the first node after the first information is successfully cached, where the second information carries second data and a second session identifier; and the duplicate removal module is used for carrying out duplicate removal on the first data and the second data according to the first session identifier and the second session identifier.
Optionally, the apparatus further comprises: a feedback module, configured to feed back a first acknowledgement message of the first data to the first node after the first receiving module receives the first information sent by the first node and before the second receiving module receives the second information sent by the first node.
Optionally, the apparatus further comprises: the pushing module is configured to push third information to a second node after the deduplication module deduplicates the first data and the second data according to the first session identifier and the second session identifier, and store the third information in a local message queue, where the third information carries the first data and a first timing identifier; the processing module is configured to search for the third information in a local message queue and retransmit the third information to the second node when a second acknowledgement message fed back by the second node for the first data is not received within a preset time; and deleting the third information in the local message queue when a second confirmation message fed back by the second node aiming at the first data is received within a preset time.
Optionally, the push module includes one of: a first pushing unit, configured to push third information to a second node, where the third information carries the first data and a first timestamp, and the first timestamp is used for the second node to update a local latest message time; a second pushing unit, configured to push third information to a second node, where the third information carries the first data and a first self-increment sequence, and the first self-increment sequence is used for the second node to update a local latest message sequence in a distributed network.
Optionally, when the first timing identifier is a first timestamp, the apparatus further includes: a third receiving module, configured to receive a first retransmission request sent by a second node after the pushing module pushes third information to the second node, where the first retransmission request carries a second timestamp, and the second timestamp is a local latest message time of the second node; the first judging module is used for judging whether the first timestamp is later than the second timestamp; a first retransmission module, configured to retransmit, to the second node, all messages of the local message queue after the second timestamp, when the first timestamp is later than the second timestamp.
Optionally, when the first timing sequence is identified as a first self-increment sequence, the apparatus further includes: a fourth receiving module, configured to receive a second retransmission request sent by a second node after the pushing module pushes third information to the second node, where the second retransmission request carries a second self-increment sequence, and the second self-increment sequence is a local latest message sequence of the second node; the second judging module is used for judging whether the first self-increment sequence is larger than the second self-increment sequence; a second retransmission module, configured to retransmit all messages of the local message queue after the second self-increment sequence to the second node when the first self-increment sequence is greater than the second self-increment sequence.
According to another embodiment of the present invention, there is provided a transmission system of data including: a first node applied to a network layer, a second node applied to an application layer, and an ACK node connected between the network layer and the application layer, wherein the ACK node is connected with the first node and the second node, and comprises the apparatus described in the above embodiment; the first node is used for transmitting data to the ACK node; and the second node is used for receiving the data pushed by the ACK node.
Optionally, the first node is an energy data acquisition unit, and the second node is an application processing unit.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the first information sent by the first node is received, wherein the first information carries the first data and the first session identifier, then the second information sent by the first node is received after the second data is cached successfully in the local area, wherein the second information carries the second data and the second session identifier, the first data and the second data are deduplicated according to the first session identifier and the second session identifier, the session identifier of the data packet is added into the transfer information of the network layer, so that the data of the network layer can be filtered and the correct data can be transferred to the application layer, the technical problem of data multi-transmission in the related technology is solved, and the reliability in the data transmission process is ensured.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a router according to an embodiment of the present invention;
fig. 2 is a flow chart of a data transmission method according to an embodiment of the present invention;
FIG. 3 is a network architecture diagram of an embodiment of the present invention;
FIG. 4 is a timing diagram for message delivery according to an embodiment of the present invention;
FIG. 5 is a timing diagram of interaction at the application layer based on timestamps according to an embodiment of the present invention;
fig. 6 is a block diagram of a data transmission apparatus according to an embodiment of the present invention;
fig. 7 is a block diagram of a data transmission system according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method provided by the first embodiment of the present application may be executed in a router, a switch, a data relay device, or a similar computing device. Taking an example of the router running on the router, fig. 1 is a block diagram of a router according to an embodiment of the present invention. As shown in fig. 1, router 10 may include one or more (only one shown in fig. 1) processors 102 (processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally, input and output devices 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is merely illustrative and is not intended to limit the structure of the router described above. For example, router 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to a data transmission control method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which may be connected to router 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the router 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a data transmission method is provided, and fig. 2 is a flowchart of a data transmission method according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, receiving first information sent by a first node, wherein the first information carries first data and a first session identifier;
in this embodiment, the first node is an upstream node of the current node, and the first node is applied to the network layer.
Step S204, after the second data is cached successfully in the local area, receiving second information sent by the first node, wherein the second information carries the second data and a second session identifier;
and step S206, carrying out duplicate removal on the first data and the second data according to the first session identification and the second session identification.
In this embodiment, the first data and the second data may be the same data or different data, and whether the data corresponding to the second identifier is cached locally is queried based on the session identifier, so that deduplication processing may be performed to delete duplicate data.
Through the steps, first information sent by a first node is received, wherein the first information carries first data and a first session identifier, then second information sent by the first node is received after second data is cached successfully in a local area, wherein the second information carries second data and a second session identifier, the first data and the second data are deduplicated according to the first session identifier and the second session identifier, the session identifier of a data packet is added into transfer information of a network layer, so that data of the network layer can be filtered out to be redundant, correct data can be transferred to an application layer, the technical problem of data multiple transmission in related technologies is solved, and reliability in a data transmission process is guaranteed.
In an implementation manner of this embodiment, after receiving first information sent by a first node, and before receiving second information sent by the first node, the method further includes: a first acknowledgement message for the first data is fed back to the first node. Although the first acknowledgement message of the first data has been fed back, the first node may not receive the first data for various reasons, and thus the first node may retransmit the first information considering that the first information is not received by the current node.
In this embodiment, after the deduplication is performed on the first data and the second data according to the first session identifier and the second session identifier, the method further includes:
s11, pushing third information to a second node, and storing the third information in a local message queue, wherein the third information carries first data and a first time sequence identifier;
in this embodiment, the second node is a downstream node of the current node, and the second node is applied to an application layer/service layer. By maintaining the local message queue, it can be known which information has been pushed to the second node;
optionally, the third information may also carry a session identifier, so that the second node performs deduplication processing on the received information by using the unique session identifier.
S12, when a second confirmation message fed back by the second node aiming at the first data is not received within the preset time, searching for the third information in the local message queue, and retransmitting the third information to the second node; and deleting the third information in the local message queue when a second confirmation message fed back by the second node aiming at the first data is received within the preset time.
The time sequence identifier of this embodiment may be an identifier of a time attribute, such as a timestamp, or an identifier of a sequence attribute, such as a self-increment sequence, which is respectively applied in a network environment where clocks are synchronized and incompletely synchronized (such as a distributed network), for a distributed second node, a clock difference may exist in local timestamp update, and a globally unique self-increment sequence may be used instead of a timestamp as a unique identifier. The following is separately illustrated:
in this embodiment, pushing the third information to the second node includes one of: pushing third information to a second node, wherein the third information carries first data and a first timestamp, and the first timestamp is used for updating local latest message time by the second node; and pushing third information to the second node, wherein the third information carries first data and a first self-increment sequence, and the first self-increment sequence is used for updating a local latest message sequence in the distributed network by the second node.
In an application scenario of this embodiment, when the first timing identifier is the first timestamp, after the third information is pushed to the second node, the method further includes:
s21, receiving a first retransmission request sent by a second node, wherein the first retransmission request carries a second timestamp, and the second timestamp is a local latest message time of the second node;
s22, judging whether the first time stamp is later than the second time stamp;
and S23, when the first time stamp is later than the second time stamp, retransmitting all the messages of the local message queue after the second time stamp to the second node.
In one example, if the first timestamp is 14:00 and the second timestamp is 13:55, then the first timestamp is later than the second timestamp, and all messages between 13:55 and 14:00 (excluding 13:55 and 14:00) in the local message queue need to be retransmitted to the second node.
In another application scenario of this embodiment, when the first timing identifier is the first self-increment sequence, after the pushing the third information to the second node, the method further includes:
s31, receiving a second retransmission request sent by a second node, wherein the second retransmission request carries a second self-increment sequence, and the second self-increment sequence is a local latest message sequence of the second node;
s32, judging whether the first self-increment sequence is larger than the second self-increment sequence;
s33, when the first self-increment sequence is greater than the second self-increment sequence, retransmitting all messages of the local message queue after the second self-increment sequence to the second node.
In one example, the first self-increasing sequence is 88, the second self-increasing sequence is 79, and the first self-increasing sequence is larger than the second self-increasing sequence, so that all messages with sequence numbers between 80 and 88 in the local message queue need to be retransmitted to the second node.
By adding the ACK mechanism processing method in the application layer, the duplication elimination and the reissue of the application layer information are realized. The problem of data transmission caused by data frame loss and packet sticking is solved, and the reliability in the data transmission process is further ensured.
The scheme of the embodiment can be applied to the fields of energy information acquisition and the like, but is also applicable to other processing units for receiving push information.
Taking application in the field of energy information acquisition as an example, fig. 3 is a network architecture diagram according to an embodiment of the present invention, in which an application unit (application processing unit) corresponds to a second node, an energy data acquisition unit corresponds to a first node, and a message is forwarded from the energy acquisition unit through an ACK processing unit and then pushed to a corresponding upper application processing unit by the ACK processing unit.
Fig. 4 is a timing diagram of information transfer according to an embodiment of the present invention, including:
step 1: transmitting the energy data;
step 2: caching the message;
and step 3: feeding back a confirmation message;
and 4, step 4: pushing a message;
and 5: waiting for ACK timeout;
step 6: and (6) notifying the ACK.
In the whole process, the loss risk links are proposed in the following two parts:
a first part: the energy data acquisition unit sends data to the ACK processing unit, the ACK processing unit temporarily stores the message, and then returns a success result to the energy data acquisition unit (steps 1, 2 and 3);
a second part: the ACK processing unit obtains data from the message buffer and pushes the data to the application processing unit B (step 4).
In the first part, if there may be a failure in steps 1, 2, and 3 (network failure, storage failure, waiting for a return timeout, etc.), the energy data collection unit will prompt the failure to send. For these situations, retransmission after failure can be used to solve the problem of sending duplicate information. For example, in step 3, the response of successful return is slow, and in fact, the information is processed, and the energy data acquisition unit will send the same data again. Therefore, when the sending end delivers data, the sending end needs to carry a unique session id, and the ACK processing unit performs deduplication processing (querying whether buffer data exists or not) through the id.
In the second part, the ACK processing unit stores the data and then pushes the message to the application unit, and in the stage of storing the data in the buffer area or in the stage of pushing, if the ACK processing unit has faults such as power failure, the message cannot be pushed to the application unit. Even if the previous process is normal, the message is successfully pushed to the application unit, the application unit has an exception in the process of writing the message into the local DB, the data is not successfully put in a database, and the application unit cannot see the data although the message is successfully delivered in the network layer. Aiming at the problems, an ACK mechanism of a service layer is realized by referring to an ACK mechanism of a TCP layer.
For example, the ACK processing unit may carry an identifier sid in the pushing process (step 4), which is similar to the security identifier sequence id in the TCP protocol, and maintain an "ACK message queue", after receiving the message, the application unit may return an ACK packet carrying the sid to the ACK processing unit (step 6), and after receiving the message, the ACK processing unit deletes the message from the "ACK message queue", and the whole pushing process is completely ended.
The following problems of failure also occur during the process of pushing messages to the application unit:
the application unit network is already in an unreachable state, and the push message has no receiver;
messages are lost before reaching the application unit;
the application unit crashes without completing the local warehousing process;
in this embodiment, for the above problem, based on the retransmission mechanism of the TCP protocol, the "ACK message queue" has a corresponding timeout timer (step 5), and if no ACK packet of the application unit is received within a certain time, the information is found from the "ACK message queue" and delivered again. At this time, similar to the problem in step 3, the failure of the returned ACK packet or the loss of the ACK packet triggers a retransmission mechanism, which may cause the application unit to receive the repeatedly pushed information. The application unit also needs to perform deduplication processing on the received information by using the unique identifier sid, which is a message for the application unit itself.
There is also a case that the ACK processing unit fails to respond to the retransmission mechanism temporarily when encountering a failure, and for an application unit, the ACK processing unit needs to know that the data of the application unit is not synchronized, and needs to check the integrity of the data. Therefore, a timestamp comparison mechanism (self-increment sequence is similar) is introduced, and fig. 5 is a timing diagram of interaction based on timestamps in an application layer according to an embodiment of the present invention, which includes:
step 1: the ACK processing unit pushes msg1 to the application processing unit, and carries the latest timestamp 1;
step 2: the application processing unit updates the local latest message timestamp1 after analyzing the data;
and step 3: the application processing unit feeds back an ACK notification to the ACK processing unit;
and 4, step 4: when the ACK processing unit pushes the second piece of information msg2, the connection with the receiving side application processing unit is disconnected due to some reasons, so that the push of msg2 is unsuccessful;
and 5: when the application processing unit is on-line again and carries the local latest timestamp of 1, the request ACK processing unit packs all unsuccessfully pushed messages with the time greater than timestamp1 into msg 2;
step 6: the ACK processing unit acquires a message (msg2) larger than the timestamp1 and retransmits the message to the application processing unit;
and 7: after the application processing unit successfully receives the msg2, updating a local latest message timestamp 2;
through the above process, the application processing unit successfully enables the lost data to be transmitted in a compensation mode.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, a data transmission device and a data transmission system are further provided, which are used to implement the foregoing embodiments and preferred embodiments, and are not described again after being described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram of a data transmission apparatus according to an embodiment of the present invention, where the data transmission apparatus includes: a first receiving module 60, a second receiving module 62, a deduplication module 64, wherein,
a first receiving module 60, configured to receive first information sent by a first node, where the first information carries first data and a first session identifier;
a second receiving module 62, configured to receive second information sent by the first node after the first information is successfully cached, where the second information carries second data and a second session identifier;
a deduplication module 64, configured to perform deduplication on the first data and the second data according to the first session identifier and the second session identifier.
Optionally, the apparatus further comprises: a feedback module, configured to feed back, to the first node, a first acknowledgement message of the first data after the first receiving module receives the first information sent by the first node and before the second receiving module receives the second information sent by the first node.
Optionally, the apparatus further comprises: the pushing module is configured to push third information to a second node after the deduplication module deduplicates the first data and the second data according to the first session identifier and the second session identifier, and store the third information in a local message queue, where the third information carries the first data and a first timing identifier; the processing module is configured to search for the third information in a local message queue and retransmit the third information to the second node when a second acknowledgement message fed back by the second node for the first data is not received within a preset time; and deleting the third information in the local message queue when a second confirmation message fed back by the second node aiming at the first data is received within a preset time.
Optionally, the push module includes one of: a first pushing unit, configured to push third information to a second node, where the third information carries the first data and a first timestamp, and the first timestamp is used for the second node to update a local latest message time; a second pushing unit, configured to push third information to a second node, where the third information carries the first data and a first self-increment sequence, and the first self-increment sequence is used for the second node to update a local latest message sequence in a distributed network.
Optionally, when the first timing identifier is a first timestamp, the apparatus further includes: a third receiving module, configured to receive a first retransmission request sent by a second node after the pushing module pushes third information to the second node, where the first retransmission request carries a second timestamp, and the second timestamp is a local latest message time of the second node; the first judging module is used for judging whether the first timestamp is later than the second timestamp; a first retransmission module, configured to retransmit, to the second node, all messages of the local message queue after the second timestamp, when the first timestamp is later than the second timestamp.
Optionally, when the first timing sequence is identified as a first self-increment sequence, the apparatus further includes: a fourth receiving module, configured to receive a second retransmission request sent by a second node after the pushing module pushes third information to the second node, where the second retransmission request carries a second self-increment sequence, and the second self-increment sequence is a local latest message sequence of the second node; the second judging module is used for judging whether the first self-increment sequence is larger than the second self-increment sequence; a second retransmission module, configured to retransmit all messages of the local message queue after the second self-increment sequence to the second node when the first self-increment sequence is greater than the second self-increment sequence.
Fig. 7 is a block diagram of a data transmission system according to an embodiment of the present invention, including: a first node 70 applied at a network layer, a second node 72 applied at an application layer, and an ACK node 74 connected between the network layer and the application layer, wherein the ACK node is connected with the first node and the second node, and comprises the apparatus described in the above embodiments; the first node is used for transmitting data to the ACK node; and the second node is used for receiving the data pushed by the ACK node.
Optionally, the first node is an energy data acquisition unit, and the second node is an application processing unit.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in an aspect of the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, receiving first information sent by a first node, wherein the first information carries first data and a first session identifier;
s2, after the first information is cached successfully in the local area, receiving second information sent by the first node, wherein the second information carries second data and a second session identifier;
s3, the first data and the second data are deduplicated according to the first session identification and the second session identification.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in an aspect of this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving first information sent by a first node, wherein the first information carries first data and a first session identifier;
s2, after the first information is cached successfully in the local area, receiving second information sent by the first node, wherein the second information carries second data and a second session identifier;
s3, the first data and the second data are deduplicated according to the first session identification and the second session identification.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A method for transmitting data, comprising:
receiving first information sent by a first node, wherein the first information carries first data and a first session identifier;
after the first information is cached successfully in the local area, receiving second information sent by the first node, wherein the second information carries second data and a second session identifier;
and carrying out duplicate removal on the first data and the second data according to the first session identification and the second session identification.
2. The method of claim 1, wherein after receiving the first information sent by the first node and before receiving the second information sent by the first node, the method further comprises:
feeding back a first acknowledgement message of the first data to the first node.
3. The method of claim 1, wherein after the de-duplicating the first data and the second data according to the first session identification and the second session identification, the method further comprises:
pushing third information to a second node, and storing the third information in a local message queue, wherein the third information carries the first data and a first timing identifier;
when a second confirmation message fed back by the second node aiming at the first data is not received within preset time, searching the third information in a local message queue, and retransmitting the third information to the second node; and deleting the third information in the local message queue when a second confirmation message fed back by the second node aiming at the first data is received within a preset time.
4. The method of claim 3, wherein pushing the third information to the second node comprises one of:
third information is pushed to a second node, wherein the third information carries the first data and a first timestamp, and the first timestamp is used for updating local latest message time by the second node;
and pushing third information to a second node, wherein the third information carries the first data and a first self-increment sequence, and the first self-increment sequence is used for updating a local latest message sequence in a distributed network by the second node.
5. The method of claim 3, wherein when the first timing is identified as a first timestamp, after pushing third information to the second node, the method further comprises:
receiving a first retransmission request sent by the second node, wherein the first retransmission request carries a second timestamp, and the second timestamp is a local latest message time of the second node;
judging whether the first timestamp is later than the second timestamp;
and when the first timestamp is later than the second timestamp, retransmitting all messages of the local message queue after the second timestamp to the second node.
6. The method of claim 3, wherein when the first timing identification is a first self-increment sequence, after pushing third information to a second node, the method further comprises:
receiving a second retransmission request sent by the second node, wherein the second retransmission request carries a second self-increment sequence, and the second self-increment sequence is a local latest message sequence of the second node;
judging whether the first self-increment sequence is larger than the second self-increment sequence;
retransmitting all messages of the local message queue after the second self-increasing sequence to the second node when the first self-increasing sequence is greater than the second self-increasing sequence.
7. An apparatus for transmitting data, comprising:
the first receiving module is used for receiving first information sent by a first node, wherein the first information carries first data and a first session identifier;
a second receiving module, configured to receive second information sent by the first node after the first information is successfully cached, where the second information carries second data and a second session identifier;
and the duplicate removal module is used for carrying out duplicate removal on the first data and the second data according to the first session identifier and the second session identifier.
8. A system for transmitting data, comprising: a first node applied at a network layer, a second node applied at an application layer, and an ACK node connected between the network layer and the application layer, wherein,
the ACK node, coupled to the first node and the second node, comprising the apparatus of claim 7;
the first node is used for transmitting data to the ACK node;
and the second node is used for receiving the data pushed by the ACK node.
9. The system of claim 8, wherein the first node is an energy data acquisition unit and the second node is an application processing unit.
10. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 6 when executed.
11. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 6.
CN201911072280.6A 2019-11-05 2019-11-05 Data transmission method, device and system Active CN111064674B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911072280.6A CN111064674B (en) 2019-11-05 2019-11-05 Data transmission method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911072280.6A CN111064674B (en) 2019-11-05 2019-11-05 Data transmission method, device and system

Publications (2)

Publication Number Publication Date
CN111064674A true CN111064674A (en) 2020-04-24
CN111064674B CN111064674B (en) 2021-02-26

Family

ID=70298094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911072280.6A Active CN111064674B (en) 2019-11-05 2019-11-05 Data transmission method, device and system

Country Status (1)

Country Link
CN (1) CN111064674B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115102807A (en) * 2022-05-27 2022-09-23 深圳技术大学 Method, device, server, client and storage medium for data transmission of internet of things gateway

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764099A (en) * 1998-08-27 2006-04-26 英特尔公司 Method and apparatus for input/output link retry, failure and recovery in a computer network
CN101146341A (en) * 2006-09-12 2008-03-19 华为技术有限公司 A method and device for avoiding duplicate transaction execution in media independent switching
CN102076052A (en) * 2010-12-31 2011-05-25 深圳市北川电子有限公司 Automatic relay route method
US20110299400A1 (en) * 2010-06-04 2011-12-08 Leanics Corporation System for congestion control in packet networks
CN103593384A (en) * 2012-08-14 2014-02-19 国际商业机器公司 Method and system for data transfer optimization through destination analytics and data de-duplication
CN104038322A (en) * 2014-06-16 2014-09-10 北京邮电大学 Intermediate node, communication network and data transmission control method
CN104104608A (en) * 2013-04-15 2014-10-15 华为技术有限公司 Message receiving method and device
CN105357302A (en) * 2015-11-12 2016-02-24 成都科来软件有限公司 Method and device for breakpoint transmission of network data packages
US20160072711A1 (en) * 2014-09-09 2016-03-10 Hitachi Metals, Ltd. Relay System and Relay Device
CN106101026A (en) * 2016-06-07 2016-11-09 深圳证券通信有限公司 A kind of UDP multicasting method of highly reliable low latency

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764099A (en) * 1998-08-27 2006-04-26 英特尔公司 Method and apparatus for input/output link retry, failure and recovery in a computer network
CN101146341A (en) * 2006-09-12 2008-03-19 华为技术有限公司 A method and device for avoiding duplicate transaction execution in media independent switching
US20110299400A1 (en) * 2010-06-04 2011-12-08 Leanics Corporation System for congestion control in packet networks
CN102076052A (en) * 2010-12-31 2011-05-25 深圳市北川电子有限公司 Automatic relay route method
CN103593384A (en) * 2012-08-14 2014-02-19 国际商业机器公司 Method and system for data transfer optimization through destination analytics and data de-duplication
CN104104608A (en) * 2013-04-15 2014-10-15 华为技术有限公司 Message receiving method and device
CN104038322A (en) * 2014-06-16 2014-09-10 北京邮电大学 Intermediate node, communication network and data transmission control method
US20160072711A1 (en) * 2014-09-09 2016-03-10 Hitachi Metals, Ltd. Relay System and Relay Device
CN105357302A (en) * 2015-11-12 2016-02-24 成都科来软件有限公司 Method and device for breakpoint transmission of network data packages
CN106101026A (en) * 2016-06-07 2016-11-09 深圳证券通信有限公司 A kind of UDP multicasting method of highly reliable low latency

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115102807A (en) * 2022-05-27 2022-09-23 深圳技术大学 Method, device, server, client and storage medium for data transmission of internet of things gateway
CN115102807B (en) * 2022-05-27 2023-11-28 深圳技术大学 Method, device, server, client and storage medium for gateway data transmission of Internet of things

Also Published As

Publication number Publication date
CN111064674B (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN108933727B (en) Message receipt processing method and device
EP3570631B1 (en) Data packet transmission method and device
WO2017219557A1 (en) Data transmission method and data transmission apparatus
US20060013169A2 (en) Reliable message distribution in an ad hoc mesh network
GB2589211A (en) Methods and systems of using remote subscriber identification modules at device
CN101686145A (en) Equipment capable of upgrading, upgrading method and system
CN112118171A (en) Message intercommunication system, method, device, computer equipment and readable storage medium
CN113721966B (en) Node upgrading method and device, storage medium and electronic device
CN103440142A (en) GPRS (General Packet Radio Service)-based remote upgrade and dynamic loading method
KR100976259B1 (en) System for providing two-way push service based on dynamic IP in wireless network environment
CN110022369A (en) Message treatment method, device, electronic equipment and computer readable storage medium
CN111064674B (en) Data transmission method, device and system
CN105978796A (en) Message communication method and system based on unstable mobile network
EP1580916B1 (en) System and method for transmitting units of messages in a mobile communication system
CN107786607B (en) Message retransmission method, message retransmission server and user equipment
KR20070036729A (en) Method and apparatus for initiating a storage window in a wireless communications system
US20210029228A1 (en) Point-to-Point Database Synchronization Over a Transport Protocol
WO2006102624A2 (en) Wireless data device with confirmation and retry capabilities for pushed data
CN113794622B (en) Message processing method and device, electronic equipment and storage medium
CN110266446A (en) A kind of method and apparatus based on SACK mode adjustment random ordering duration
CN102137346A (en) Method for processing multimedia messaging service (MMS) as well as related equipment and system
CN114422573A (en) Message sending method and device, storage medium and electronic device
WO2019087240A1 (en) Terminal apparatus, base station apparatus, communication method, and wireless communication system
CN104184665A (en) Topological collection method and device
KR100548387B1 (en) Mms message transmitting system and method using a mms proxy server

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
GR01 Patent grant
GR01 Patent grant