Disclosure of Invention
The embodiment of the application provides a many-to-many data transmission method and a heterogeneous data transmission layer, and solves the technical problems that a traditional chain data transmission system is simple in structure and single in data source, and data many-to-many transmission between users in each layer and between users outside each layer in a three-layer architecture cannot be realized.
In view of the above, a first aspect of the present application provides a method for many-to-many transmission of data, the method including:
receiving at least one data packet sent by at least one user terminal, wherein the data packet carries address information of a data receiver;
analyzing the data packet;
if the address information of the data receiver comprises two or more than two, cloning the data packets and respectively transmitting the data packets to the data receiver corresponding to the address information.
Optionally, after cloning the data packet, the method further includes:
respectively configuring the transmission priority of two or more than two data receivers;
and respectively transmitting the data packets to the data receivers corresponding to the address information according to the transmission priority.
Optionally, after cloning the data packet, the method further includes:
respectively configuring the transmission time of two or more data receivers;
and respectively transmitting the data packets to the data receiving party corresponding to the address information according to the transmission time.
Optionally, after the transmitting to the data receiving side corresponding to the address information, the method further includes:
and if the data delivery information fed back by the data receiver is not received, retransmitting the data packet to the data receiver after preset time.
Optionally, after retransmitting the data packet to the data receiver after the preset time, the method further includes:
and counting the times of retransmitting the data packet to the data receiver, and recording the data receiver and generating failure prompt information when the times reach a preset threshold value.
Optionally, after parsing the data packet, the method further includes:
and if the number of the data packets is two or more, respectively transmitting the data packets to data receivers corresponding to the address information according to the address information of the data receivers carried by the data packets.
Optionally, the respectively transmitting the data packets to the data receivers corresponding to the address information according to the address information of the data receivers carried by the data packets specifically includes:
determining the transmission sequence of two or more data packets according to the transmission flow of the two or more data packets;
and respectively transmitting the data packets to a data receiver corresponding to the address information according to the transmission sequence.
A second aspect of the present application provides a heterogeneous data transmission layer, including:
a receiving unit, configured to receive at least one data packet sent by at least one user terminal, where the data packet carries address information of a data receiving party;
the analysis unit is used for analyzing the data packet;
and the distribution unit is used for cloning the data packets and respectively transmitting the data packets to the data receivers corresponding to the address information if the address information of the data receivers comprises two or more than two address information.
Optionally, the method further includes:
and the retransmission unit is used for retransmitting the data packet to the data receiver after preset time if the data delivery information fed back by the data receiver is not received.
Optionally, the method further includes:
and the counting unit is used for counting the times of retransmitting the data packet to the data receiving party, and recording the data receiving party and generating failure prompt information when the times reach a preset threshold value.
According to the technical scheme, the embodiment of the application has the following advantages:
in the embodiment of the application, after at least one data packet sent by at least one user terminal is received, by analyzing address information of data receivers carried in the data packet, when the data packet has address information of two or more data receivers, the data packet is cloned and respectively routed to the corresponding data receivers, so that the data packet can be transmitted according to different data sources, different data receivers and multiple destinations.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The application designs a many-to-many data transmission method and a heterogeneous data transmission layer, and solves the technical problems that a traditional chain data transmission system is simple in structure and single in data source, and cannot realize many-to-many data transmission in a center or across centers.
For easy understanding, please refer to fig. 1, in which fig. 1 is a schematic flowchart of a first embodiment of a method for many-to-many data transmission according to an embodiment of the present application, and as shown in fig. 1, the method specifically includes:
101. receiving at least one data packet sent by at least one user terminal, wherein the data packet carries address information of a data receiver;
102. analyzing the data packet;
103. if the address information of the data receiver comprises two or more than two, cloning the data packets and respectively transmitting the data packets to the data receiver corresponding to the address information.
Specifically, examples of the header are as follows:
MSG Agent:user1@192.168.1.116:6000;ob VER/2.0
Via:GTS/2.0/UDP192.168.1.109;branch=z9hG4bK7d2d.c81637a3b770f96aedec401d6e0b849d.0
Via:GTS/2.0/UDP192.168.1.103:6000;received=192.168.1.103;branch=z9hG4bK.kpfY44c-6
Via:GTS/2.0/UDP192.168.1.103:6000;received=192.168.1.103;branch=z9hG4bK.kpfY44c-6
Route:192.168.1.111:6000;received=192.168.1.111;brach=z9hG4bk.kbpY44c-5
From:<gts:user2@192.168.1.109>;tag=0jXn~BEOH
To:gts:user1@192.168.1.109
CSeq:20MSG
Max-Forwards:69
Content-Type:application/txt
Content-Length:282
Date:Wed,28Aug 2019 00:02:37GMT
examples of the message body are as follows:
in the embodiment of the application, after at least one data packet sent by at least one user terminal is received, by analyzing address information of data receivers carried in the data packet, when the data packet has address information of two or more data receivers, the data packet is cloned and respectively routed to the corresponding data receivers, so that the data packet can be transmitted according to different data sources, different data receivers and multiple destinations.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a second embodiment of a method for many-to-many data transmission according to an embodiment of the present application, as shown in fig. 2, specifically:
201. receiving at least one data packet sent by at least one user terminal, wherein the data packet carries address information of a data receiver;
202. analyzing the data packet;
203. if the address information of the data receiver comprises two or more than two, cloning the data packet;
204. respectively configuring the transmission priority of two or more than two data receivers;
205. and respectively transmitting the data packets to the data receivers corresponding to the address information according to the transmission priority.
It should be noted that, by configuring the transmission priority of the data receiver, the data packet can be transmitted in sequence, so that data congestion is avoided, and it can be ensured that the data receiver with high priority can receive the data packet as soon as possible.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a third embodiment of a method for many-to-many data transmission according to an embodiment of the present application, as shown in fig. 3, specifically:
301. receiving at least one data packet sent by at least one user terminal, wherein the data packet carries address information of a data receiver;
302. analyzing the data packet;
303. if the address information of the data receiver comprises two or more than two, cloning the data packet;
304. respectively configuring the transmission time of two or more data receivers;
305. and respectively transmitting the data packets to the data receiving party corresponding to the address information according to the transmission time.
It should be noted that, by configuring the transmission time of the data packet to the data receiving side, it is determined that some data is transmitted to the data receiving side only in a specific time period.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating a fourth embodiment of a method for many-to-many data transmission according to the present embodiment, as shown in fig. 4, specifically:
401. receiving at least one data packet sent by at least one user terminal, wherein the data packet carries address information of a data receiver;
402. analyzing the data packet;
403. if the address information of the data receiver comprises two or more than two, cloning the data packets and respectively transmitting the data packets to the data receiver corresponding to the address information;
404. and if the data delivery information fed back by the data receiver is not received, retransmitting the data packet to the data receiver after preset time.
It should be noted that, if data delivery information fed back by the data receiving side is not received, which indicates that the data packet transmission fails, the data packet is retransmitted to the data receiving side after a preset time.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating a fifth embodiment of a method for many-to-many data transmission according to the embodiment of the present application, as shown in fig. 5, specifically:
501. receiving at least one data packet sent by at least one user terminal, wherein the data packet carries address information of a data receiver;
502. analyzing the data packet;
503. if the address information of the data receiver comprises two or more than two, cloning the data packets and respectively transmitting the data packets to the data receiver corresponding to the address information;
504. if the data delivery information fed back by the data receiver is not received, the data packet is transmitted to the data receiver again after preset time;
505. and counting the times of retransmitting the data packet to the data receiver, and recording the data receiver and generating failure prompt information when the times reach a preset threshold value.
It should be noted that, if data delivery information fed back by the data receiving side is not received, which indicates that the data packet transmission fails, the data packet is retransmitted to the data receiving side after a preset time. If the number of times of retransmission reaches a preset threshold value, the transmission problem that automatic repair cannot be performed may occur, and the data receiving party with transmission failure is recorded and failure prompt information is generated.
Referring to fig. 6, fig. 6 is a flowchart illustrating a sixth embodiment of a method for many-to-many data transmission according to the present application, as shown in fig. 6, specifically:
601. receiving at least one data packet sent by at least one user terminal, wherein the data packet carries address information of a data receiver;
602. analyzing the data packet;
603. if the address information of the data receiver comprises two or more than two, cloning the data packets and respectively transmitting the data packets to the data receiver corresponding to the address information;
604. and if the number of the data packets is two or more, respectively transmitting the data packets to data receivers corresponding to the address information according to the address information of the data receivers carried by the data packets.
It should be noted that, when the number of the data packets is two or more, after the address information of the data receiver carried by each data packet is determined, the data packets are respectively transmitted to the data receivers corresponding to the address information.
Referring to fig. 7, fig. 7 is a flowchart illustrating a seventh embodiment of a method for many-to-many data transmission according to the embodiment of the present application, as shown in fig. 7, specifically:
701. receiving at least one data packet sent by at least one user terminal, wherein the data packet carries address information of a data receiver;
702. analyzing the data packet;
703. if the address information of the data receiver comprises two or more than two, cloning the data packets and respectively transmitting the data packets to the data receiver corresponding to the address information;
704. if the number of the data packets is two or more, determining the transmission sequence of the two or more data packets according to the transmission flow of the two or more data packets;
705. and respectively transmitting the data packets to a data receiver corresponding to the address information according to the transmission sequence.
It should be noted that, when the number of the data packets is two or more, the transmission traffic size required for transmission of each data packet may be different, and after the transmission traffic size of each data packet is calculated, the transmission data of the data packet may be determined according to the transmission traffic size, that is, the data packet with the small transmission traffic is transmitted preferentially, the data packet with the large transmission traffic is transmitted late, and the data packets are transmitted to the data receiving side corresponding to the address information according to the transmission sequence.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a first embodiment of a heterogeneous data transmission layer according to an embodiment of the present application, as shown in fig. 8, specifically including:
a receiving unit 801, configured to receive at least one data packet sent by at least one user terminal, where the data packet carries address information of a data receiving party;
an analyzing unit 802, configured to analyze the data packet;
a distributing unit 803, configured to clone the data packets and transmit the data packets to the data receivers corresponding to the address information, if the address information of the data receivers includes two or more address information.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a second embodiment of a heterogeneous data transmission layer according to the embodiment of the present application, and as shown in fig. 9, the second embodiment specifically includes:
a receiving unit 901, configured to receive at least one data packet sent by at least one user terminal, where the data packet carries address information of a data receiving party;
an analyzing unit 902, configured to analyze the data packet;
a distributing unit 903, configured to clone the data packets and transmit the data packets to data receivers corresponding to the address information if the address information of the data receivers includes two or more address information;
a retransmission unit 904, configured to retransmit the data packet to the data receiver after a preset time if data delivery information fed back by the data receiver is not received;
a counting unit 905, configured to count the number of times of retransmitting the data packet to the data receiving side, and when the number of times reaches a preset threshold, record the data receiving side and generate failure prompt information.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The terms "first," "second," "third," "fourth," and the like in the description of the application and the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.