Data transmission method, device, communication system, storage medium and processor
Through the splicing and polling mechanism, the bandwidth waste problem during link conversion is solved, link transmission performance is maximized, and maximum bandwidth utilization of high-bit wide links is ensured.
Patent Information
- Application Number
- CN202080094285.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-27
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2040-11-27
AI Technical Summary
The prior art has wasted bandwidth during link conversion, and it is impossible to maximize the performance of the high-speed transmission link.
By acquiring multiple data packets, splicing into data packets that meet the high-bit wide communication link, and transmitting them on the high-bit wide link, the data packets are read and distributed using the polling mechanism to ensure that the packet size matches the link bandwidth, and realizes that the data packet size is the same as the link bandwidth. Maximize bandwidth utilization.
It effectively avoids bandwidth waste of communication links, maximizes link transmission performance, and improves transmission efficiency and bandwidth utilization.
Smart Images

Figure CN115004654B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data transmission, and in particular to a data transmission method, device, communication system, storage medium and processor. Background Art
[0002] During the data transmission process, due to changes in the transmission environment, it may sometimes be necessary to convert to a transmission link with a higher transmission rate for transmission. For example, converting from an ordinary network cable link to an optical fiber link can achieve transmission with a long transmission distance and a high transmission speed. However, in the related art, when performing link conversion, the optical fiber interface and the network cable interface are simply converted according to the bit width ratio, but such a conversion method will result in a waste of bandwidth of the optical fiber link. Therefore, how to break through the limit of link conversion and maximize the link transmission performance is a technical problem that needs to be solved urgently.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a data transmission method, device, communication system, storage medium and processor to at least solve the technical problem of how to break through the limit of link conversion in the related art to maximize the link transmission performance.
[0005] According to one aspect of an embodiment of the present invention, there is provided a data transmission method, comprising: acquiring a plurality of data packets, wherein the plurality of data packets are transmitted by a first communication link; splicing the plurality of data packets to obtain a spliced data packet, wherein the size of the spliced data packet is equal to a second bit width of a second communication link; and transmitting the spliced data packet via the second communication link.
[0006] Optionally, splicing the multiple data packets to obtain a spliced data packet includes: splicing multiple data packets in the same first communication link to obtain the spliced data packet.
[0007] Optionally, transmitting the spliced data packet through the second communication link includes: polling and reading a plurality of spliced data packets spliced on the same first communication link, and transmitting them on the second communication link.
[0008] Optionally, multiple data packets in the same first communication link are spliced to obtain the spliced data packet, including: obtaining first identification information, wherein the first identification information is used to identify the same first communication link; inserting the first identification information at the interval between a first predetermined data packet and a second predetermined data packet in the multiple data packets in the same first communication link; and splicing the multiple data packets into which the first identification information is inserted at the interval between the first predetermined data packet and the second predetermined data packet to obtain the spliced data packet.
[0009] Optionally, splicing the multiple data packets to obtain a spliced data packet includes: splicing multiple data packets of different first communication links to obtain the spliced data packet.
[0010] Optionally, splicing multiple data packets from different first communication links to obtain the spliced data packet includes: polling and reading data packets on multiple different first communication links; and splicing data packets read from the multiple different first communication links to obtain the spliced data packet.
[0011] Optionally, the data packets read from the multiple different first communication links are spliced to obtain the spliced data packet, including: obtaining second identification information, wherein the second identification information includes: a starting communication link identifier corresponding to a starting data packet in the read data packet, and an ending communication link identifier corresponding to an ending data packet; inserting the second identification information into the interval between a third predetermined data packet and a fourth predetermined data packet in the read data packet; after inserting the second identification information into the interval between the third predetermined data packet and the fourth predetermined data packet, splicing the read data packets to obtain the spliced data packet.
[0012] Optionally, the first communication link includes: a network cable link, and the second communication link includes: an optical fiber link.
[0013] According to another aspect of an embodiment of the present invention, there is provided a data transmission method, comprising: receiving a spliced data packet transmitted by a second communication link, wherein the size of the spliced data packet is equal to the second bit width of the second communication link; splitting the spliced data packet to obtain a plurality of data packets, wherein the size of each data packet in the plurality of data packets is equal to the first bit width of a first communication link; and transmitting the plurality of data packets on the first communication link.
[0014] Optionally, transmitting the multiple data packets on the first communication link includes: transmitting the multiple data packets on the same first communication link.
[0015] Optionally, transmitting the multiple data packets on the same first communication link includes: polling and distributing the multiple data packets obtained by splitting the multiple spliced data packets respectively to the corresponding same first communication link, and transmitting them on the corresponding same first communication link.
[0016] Optionally, the multiple data packets obtained by splitting the multiple spliced data packets are polled and distributed to the corresponding same first communication link, including: splitting the multiple spliced data packets separately to obtain first identification information, wherein the first identification information is used to identify the same first communication link corresponding to a predetermined spliced data packet among the multiple spliced data packets; according to the first identification information, the multiple data packets obtained by splitting the multiple spliced data packets are polled and distributed to the corresponding same first communication link.
[0017] Optionally, transmitting the multiple data packets on the first communication link includes: transmitting the multiple data packets on different first communication links.
[0018] Optionally, transmitting the multiple data packets on different first communication links includes: distributing the multiple data packets to different first communication links by polling the multiple first communication links to distribute the data packets, and transmitting the multiple data packets on the different first communication links.
[0019] Optionally, distributing the multiple data packets to different first communication links by polling the multiple first communication links to distribute the data packets includes: acquiring second identification information, wherein the second identification information includes: a starting communication link identifier corresponding to a starting data packet among the multiple data packets, and an ending communication link identifier corresponding to an ending data packet; and distributing the multiple data packets to different first communication links by polling the multiple first communication links to distribute the data packets according to the second identification information.
[0020] Optionally, the first communication link includes: a network cable link, and the second communication link includes: an optical fiber link.
[0021] According to another aspect of an embodiment of the present invention, there is provided a data transmission device, comprising: an acquisition module, used to acquire multiple data packets, wherein the multiple data packets are transmitted by a first communication link; a splicing module, used to splice the multiple data packets to obtain a spliced data packet, wherein the size of the spliced data packet is equal to the second bit width of a second communication link; and a first transmission module, used to transmit the spliced data packet through the second communication link.
[0022] According to another aspect of an embodiment of the present invention, there is also provided a data transmission device, including: a receiving module, used to receive a spliced data packet transmitted by a second communication link, wherein the size of the spliced data packet is equal to the second bit width of the second communication link; a splitting module, used to split the spliced data packet to obtain a plurality of data packets, wherein the size of each data packet in the plurality of data packets is equal to the first bit width of the first communication link; and a second transmission module, used to transmit the plurality of data packets on the first communication link.
[0023] According to another aspect of an embodiment of the present invention, a communication system is also provided, including a sending device and a receiving device, the sending device including a first processor, the receiving device including a second processor, wherein the first processor is used to run a first program, wherein when the first program is running, any one of the above-mentioned data transmission methods executed by the sending device is executed, and the second processor is used to run a second program, wherein when the second program is running, any one of the above-mentioned data transmission methods executed by the receiving device is executed.
[0024] According to another aspect of an embodiment of the present invention, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute any one of the above-mentioned data transmission methods.
[0025] According to another aspect of the embodiments of the present invention, a processor is provided, wherein the processor is used to run a program, wherein the program executes any one of the above-mentioned data transmission methods when running.
[0026] In an embodiment of the present invention, a method of acquiring multiple data packets transmitted by a first communication link is adopted, and multiple data packets are spliced to obtain a spliced data packet whose size is equal to the second bit width of the second communication link, and the spliced data packet is transmitted through the second communication link. Since the spliced data packet can be transmitted in a manner that conforms to the maximum transmission bandwidth of the second communication link, the purpose of effectively avoiding the waste of the transmission bandwidth of the communication link is achieved, thereby achieving the technical effect of maximizing the transmission performance of the communication link, and further solving the technical problem of how to break through the limit of link conversion in the related art to maximize the link transmission performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0028] Figure 1 is a flowchart of a data transmission method 1 provided according to Embodiment 1 of the present invention;
[0029] Figure 2 is a flowchart of a second data transmission method provided according to an embodiment of the present invention;
[0030] Figure 3 It is a schematic diagram of network cable transmission data in the field of LED control cited in an optional implementation manner of the present invention;
[0031] Figure 4 It is a fiber-to-network cable conversion diagram in the field of LED control cited in an optional embodiment of the present invention;
[0032] Figure 5 It is a schematic diagram of the distribution of optical fiber bit width corresponding to network cable bit width in the related technology;
[0033] Figure 6 is a schematic diagram of an input end data transmission method according to an optional implementation manner of the present invention;
[0034] Figure 7 is a schematic diagram of a polling mechanism according to an optional implementation mode of the present invention;
[0035] Figure 8 is a schematic diagram of a data transmission method at a receiving end according to an optional implementation manner of the present invention;
[0036] Fig. 9 is a structural block diagram of a data transmission device 1 provided according to Embodiment 2 of the present invention;
[0037] Fig.10 is a structural block diagram of a second data transmission device provided according to Embodiment 3 of the present invention;
[0038] Fig.11 is a structural block diagram of a communication system provided according to Embodiment 4 of the present invention;
[0039] Fig.12 It is a structural block diagram of a computer terminal according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0041] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0042] According to an embodiment of the present invention, a method embodiment of data transmission is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0043] Example 1
[0044] Figure 1 is a flow chart of a data transmission method 1 provided according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0045] Step S102, acquiring a plurality of data packets, wherein the plurality of data packets are transmitted via a first communication link;
[0046] Step S104, concatenating the multiple data packets to obtain a concatenated data packet, wherein the size of the concatenated data packet is equal to the second bit width of the second communication link;
[0047] Step S106: Transmit the spliced data packet through the second communication link.
[0048] Through the above steps, a method of obtaining multiple data packets transmitted by the first communication link is adopted, and multiple data packets are spliced to obtain a spliced data packet whose size is equal to the second bit width of the second communication link, and the spliced data packet is transmitted through the second communication link. Since the spliced data packet can be transmitted in a manner that meets the maximum transmission bandwidth of the second communication link, the purpose of effectively avoiding the waste of the transmission bandwidth of the communication link is achieved, thereby achieving the technical effect of maximizing the transmission performance of the communication link, and further solving the technical problem of how to break through the limit of link conversion in the related art to maximize the link transmission performance.
[0049] As an optional embodiment, since it may be necessary to splice multiple data packets of multiple first communication links, multiple data packets read from multiple first communication links can be stored during the splicing process. In addition, when the second communication link adopts a polling method to transmit the spliced data packets, the multiple spliced data packets can also be stored first. Compared with the related art, which directly realizes the conversion from the first communication link to the second communication link based on the bit width, since the processing method of splicing and polling transmission involves the storage of the read data packet or the spliced data packet, it is necessary to expand the data storage method accordingly. For example, the depth of the buffer can be expanded accordingly. For example, the space originally used to cache 64-bit data is expanded to a cache space with a depth of 16, that is, expanded to 16 64-bit spaces.
[0050] As an optional embodiment, when splicing multiple data packets to obtain a spliced data packet, multiple methods can be used. For example, the following method can be used to implement: splicing multiple data packets in the same first communication link to obtain a spliced data packet. By splicing multiple data packets in the same first communication link to obtain a spliced data packet whose size is equal to the second bit width of the second communication link, the spliced data packet can be transmitted in a manner that complies with the maximum transmission bandwidth of the second communication link.
[0051] As an optional embodiment, the application scenario of the above method can be a scenario where the transmission bandwidth of the first communication link is smaller than the transmission bandwidth of the second communication link, that is, the communication link with a smaller transmission bandwidth is converted to a communication link with a larger transmission bandwidth. Among them, the above second communication link can match the transmission of multiple first communication links, for example, the number of matched first communication links is at least greater than the ratio of the bit width of the second communication link to the bit width of the first communication link. Through the above splicing processing, the bandwidth of the second communication link can be fully used when transmitting in the second communication link, and the problem of partial bandwidth resource waste of the second communication link in the process of transmitting data will not occur.
[0052] For example, when the bit width of the first communication link is 8 bits and the bit width of the second communication link is 64 bits, 8 data packets with a bit width of 8 bits of the same first communication link are spliced to obtain a spliced data packet with a length of 64 bits. Assume that the bandwidth of the first communication link is 1 Gbps and the bandwidth of the second communication link is 10 Gbps. After the data packets of the first communication link are spliced, multiple first communication links are polled to read the spliced data packets, and then transmitted on the second communication link. In this way, within 1 second, 10G of data is transmitted on 10 first communication links, and 10G of data is also transmitted on 1 second communication link. This is equivalent to transmitting 1G data of the first first communication link in the first tenth of 1s, transmitting 1G data of the second first communication link in the second tenth of 1s, transmitting 1G data of the third first communication link in the third tenth of 1s, and so on. If polling continues in this way, 1G data of the tenth first communication link can be transmitted in the tenth tenth of 1s, and finally the data of 10 first communication links in 1s are just transmitted within 1s. Therefore, one second communication link can realize the data transmission of 10 first communication links. Compared with the related art, when the conversion between the first communication link and the second communication link is realized according to the corresponding relationship of the bit width, the second communication link can only meet the data transmission of 8 first communication links, which effectively uses the transmission resources of the second communication link, thereby enabling the second communication link to transmit in the form of maximum transmission bandwidth, thereby maximizing the transmission performance of the communication link.
[0053] As an optional embodiment, when multiple data packets in multiple identical first communication links are spliced to obtain a spliced data packet, for each first communication link in the multiple first communication links, multiple data packets transmitted in the first communication link are spliced to obtain a spliced data packet, so that each first communication link in the multiple first communication links has multiple spliced data packets. For example, as above, the multiple first communication links are 10: first communication link 1, first communication link 2, first communication link 3, ..., first communication link 10. Then, multiple spliced data packets are spliced on each of the 10 first communication links. When the spliced data packet is transmitted through the second communication link, the spliced data packets spliced on multiple identical first communication links can be polled and read, and transmitted on the second communication link. The number of spliced data packets polled and read on the same communication link can be flexibly selected according to the specific situation. For example, for the above-mentioned 10 first communication links, the following polling method can be adopted (each first communication link reads a spliced data packet): read a spliced data packet from the first communication link 1, read a spliced data packet from the first communication link 2, read a spliced data packet from the first communication link 3, ..., read a spliced data packet from the first communication link 10 in sequence; continue to read a spliced data packet from the first communication link 1, read a spliced data packet from the first communication link 2, read a spliced data packet from the first communication link 3, ..., read a spliced data packet from the first communication link 10, until the data transmission is completed. For another example, for the above-mentioned 10 first communication links, the following polling method can also be used (each first communication link reads two spliced data packets): read two spliced data packets from the first communication link 1, read two spliced data packets from the first communication link 2, read two spliced data packets from the first communication link 3, ..., read two spliced data packets from the first communication link 5; read two spliced data packets from the first communication link 6, read two spliced data packets from the first communication link 7, ..., read two spliced data packets from the first communication link 10; continue to read two spliced data packets from the first communication link 1, read two spliced data packets from the first communication link 2, read two spliced data packets from the first communication link 3, ..., until the data transmission is completed. It should be noted that the number of spliced data packets read from the first communication link at one time is not limited to the above one or two, and the above one or two is only an example.
[0054] It should be noted that no matter whether one spliced data packet is read in a first communication link or two spliced data packets are read in a first communication link, as long as the bandwidth of the second transmission link matches the bandwidth of the first transmission link, the bandwidth utilization of the second transmission link can be maximized.
[0055] Since the transmission bandwidth is bit width*frequency, when matching the bandwidth of the second transmission link with the bandwidth of the first transmission link, the size of the spliced data packet can be determined based on the physical bit width of the second transmission link. For example, when the bit width of the second transmission link is 64 bits, the size of the data packet spliced on the first transmission link can be 64 bits, which meets the bandwidth matching requirements of the first transmission link and the second transmission link; when the bit width of the second transmission link is 32 bits, the size of the data packet spliced on the first transmission link can be 32 bits. At this time, relative to the case where the bit width is 64 bits, it is only necessary to double the frequency accordingly to meet the bandwidth matching requirements of the first transmission link and the second transmission link; when the bit width of the second transmission link is 16 bits, the size of the data packet spliced on the first transmission link is 32 bits. The size can be 16 bits. At this time, compared with the case where the bit width is 64 bits, it is only necessary to increase the frequency by three times (that is, the frequency is four times the original) to meet the bandwidth matching requirements of the first transmission link and the second transmission link; the bit width of the second transmission link is further reduced to 8 bits, and the size of the data packet spliced on the first transmission link can be directly 8 bits (relative to not splicing the data). At this time, compared with the case where the bit width is 64 bits, it is only necessary to increase the frequency by seven times (that is, the frequency is eight times the original) to meet the bandwidth matching requirements of the first transmission link and the second transmission link.
[0056] It should be pointed out that the scenario in which the bandwidth of the second transmission link matches the bandwidth of the first transmission link is only an example. In specific operations, the size of the spliced data packet can be flexibly determined based on the bit width of the second transmission link in combination with the complexity of the specific splicing and the impact of the frequency increase on the performance, so that the second communication link can be transmitted in a manner with the maximum transmission bandwidth, thereby maximizing the transmission performance of the communication link.
[0057] Typically, the bandwidth of the first communication link is much smaller than that of the second communication link. Therefore, multiple data packets of the first communication link are spliced to obtain multiple spliced data packets. The multiple spliced data packets can be transmitted on the second communication link in a manner that complies with the maximum transmission bandwidth of the second communication link, thereby maximizing the use of the bandwidth resources of the second communication link.
[0058] As an optional implementation, multiple data packets in the same first communication link are spliced to obtain a spliced data packet, and the data packets of the same first communication link are spliced to obtain a spliced data packet whose bit width is equal to the bit width of the second communication link; the same operation is performed on multiple first communication links, and multiple spliced data packets are obtained for each of the multiple first communication links; thereafter, the spliced data packets of the multiple first communication links are read by polling, and the multiple spliced data packets are polled and transmitted through the second communication link. When the above splicing and transmission are adopted, the number of the above first communication links can be determined according to the bandwidth of the first communication link and the second communication link. For example, when the bandwidth of the first communication link is 1 / n of the second communication link, the number of the first communication links can be n. In this way, when polling once, all the first communication links read the spliced data packet once. The operation is simple and intuitive, and it is relatively easy to mark the spliced data packets.
[0059] As an optional implementation, when the spliced data packet read by polling is sent through the second communication link, that is, the mode of sending the spliced data packets of multiple first communication links is the mode of polling reading and sending. In order to distinguish the spliced data packets read from multiple first communication links, the corresponding first communication link identification information can be embedded in the spliced data packet, so that in the subsequent data transmission and reading and parsing process, different spliced data packets can be correctly sent to the first communication link corresponding to it. For example, according to a predetermined identification rule, the data packet to be transmitted of the first communication link can be preprocessed to realize the identification of the first communication link. The specific identification method can include multiple, which is not limited here. It should be noted that since the reading of the spliced data packet of the first communication link is in a polling manner, that is, there are certain rules when reading the spliced data packet, therefore, when identifying the first communication link, it is not necessary to identify each first communication link. For example, for multiple first communication links, as long as the spliced data packet corresponding to one of the first communication links is known, the spliced data packets corresponding to other first communication links can be known according to the polling rule. For example, a spliced data packet is obtained on each of the above-mentioned 10 first communication links, and the polling method is to read the spliced data packet from the first first communication link, and then read the spliced data packet from the second first communication link, ..., and so on until the spliced data packet is read from the tenth first communication link. For example, as long as the first spliced data packet is marked as belonging to the first first communication link, then according to the polling rule, the second spliced data packet must belong to the second first communication link, so there is no need to mark the second spliced data packet, and other spliced data packets are also based on the same principle and do not need to be marked. Of course, considering actual needs, a simple and convenient processing method can also be used to mark each spliced data packet.
[0060] As an optional implementation, when multiple data packets in the same first communication link are spliced to obtain a spliced data packet, if the spliced data packet belongs to a spliced data packet to be identified, it can be implemented in the following manner: obtaining first identification information, wherein the first identification information is used to identify the same first communication link; inserting the first identification information at the interval between the first predetermined data packet and the second predetermined data packet in the multiple data packets in the same first communication link; splicing the multiple data packets with the first identification information inserted at the interval between the first predetermined data packet and the second predetermined data packet to obtain a spliced data packet. The first identification information is inserted at the interval between two predetermined data packets in the multiple data packets used to obtain the spliced data packet. Since the interval between data packets is also an idle resource, the first identification information is used to transmit the first identification information. On the one hand, it can improve resource utilization, and on the other hand, it does not affect the transmission and splicing of data packets.
[0061] As an optional implementation, in order to distinguish multiple data packets transmitted on the first communication link, multiple data packets transmitted on the first communication link with the first bit width may be identified; and the identified multiple data packets may be spliced to obtain a spliced data packet. Similar to the above-mentioned method of embedding identification information into multiple spliced data packets, multiple data packets transmitted on the first communication link may also be identified, and the identified data packets may be spliced. For example, the data of the first communication link may be preprocessed according to a predetermined identification rule, and the data packets may be identified using a unified predetermined format. The specific identification method may include multiple methods, which are not limited here.
[0062] It should be noted that for multiple different first communication links, the data packets transmitted in each first communication link can be identified according to the same identification rule. Since the output data processing method of the spliced data packets corresponding to different first communication links can be consistent, the output data format of the spliced data packets corresponding to different first communication links can also be consistent. Therefore, the consistency of the format of the data output by the first communication link can be guaranteed through the above processing, and the second communication link does not need to process the data according to the different first communication links. The second communication link only needs to send data according to the clock.
[0063] As an optional implementation, when identifying multiple data packets transmitted on the first communication link with the first bit width, the following method can be used: convert the multiple data transmitted on the first communication link with the first bit width into a predetermined format, wherein the predetermined format includes one of the following: rising edge, valid data, falling edge; since the multiple data packets included in the spliced data packet all adopt the above-mentioned unified predetermined format, therefore, when inserting the first identification information of the corresponding first communication link into the spliced data packet read by polling, inserting the above-mentioned first identification information at the interval between the first predetermined data packet and the second predetermined data packet in the multiple data packets can be: inserting the first identification information at the interval between the falling edge of the first predetermined data packet and the rising edge of the second predetermined data packet.
[0064] By preprocessing the data packet, the original data packet on the first communication link can be converted into a data packet including a unified predetermined format, and the unified predetermined format includes: rising edge, valid data, and falling edge. It should be noted that the rising edge and falling edge in the above predetermined format are not functionally the same as the edge information following the spliced data packet (i.e., the identification information at the interval referred to above). The rising edge and falling edge in the above predetermined format are used to identify multiple data packets transmitted on the first communication link. Through the predetermined data conversion rules, the data packet is converted into a format including at least a rising edge, valid data, and a falling edge. When the data is parsed later, the valid data of different data packets can be distinguished by the rising edge and / or the falling edge, so as to correctly parse the valid data in the data packet of the first communication link. The above edge information is the identification information corresponding to the first communication link embedded in the spliced data packet, which is used to identify the first communication link corresponding to the above spliced data packet. When the data is parsed, the different first communication links corresponding to different spliced data packets can be effectively distinguished by parsing the edge information.
[0065] As an optional embodiment, the following method can be used to splice multiple data packets on the first communication link to obtain a spliced data packet: splice multiple data packets from different first communication links to obtain a spliced data packet. For example, data packets on multiple different first communication links can be read by polling; and data packets read from multiple different first communication links are spliced to obtain a spliced data packet. For example, for multiple first communication links, a predetermined number of data packets are polled and read from each first communication link, and then according to the bit width relationship between the first communication link and the second communication link, the obtained data packets are spliced to obtain a spliced data packet with a bit width equal to the bit width of the second communication link, and the spliced data packet is transmitted in the second communication link.
[0066] For example, when the bit width of the first communication link is 8 bits and the bit width of the second communication link is 64 bits, 8 data packets with a bit width of 8 bits of different first communication links are spliced to obtain a spliced data packet with a length of 64 bits. Assume that the bandwidth of the first communication link is 1 Gbps and the bandwidth of the second communication link is 10 Gbps. After the data packets read from the multiple first communication links are spliced, they are transmitted on the second communication link. For example, the first spliced packet transmitted on the second transmission link is spliced by transmitting data packets from the 1st first communication link to the 8th first communication link, and the second spliced packet transmitted on the second transmission link is spliced by transmitting data packets from the 9th first communication link to the 6th first communication link polled for the second time. In this way, within 1 second, 10G of data is transmitted on 10 first communication links, and 10G of data is also transmitted on 1 second communication link. It is also equivalent to that one second communication link can realize the data transmission of 10 first communication links. Compared with the related art, when the conversion between the first communication link and the second communication link is realized according to the corresponding relationship of the bit width, the second communication link can only meet the data transmission of 8 first communication links, which effectively utilizes the transmission resources of the second communication link, thereby enabling the second communication link to transmit in a manner with the maximum transmission bandwidth, thereby maximizing the transmission performance of the communication link.
[0067] It should be noted that the number of data packets read from a first communication link each time can be flexibly selected according to specific needs. For example, it can be one or more. For example, if the above-mentioned multiple first communication links are 10: first communication link 1, first communication link 2, first communication link 3, ... first communication link 10, when splicing data packets, the following method can be used to splice and obtain the required spliced data packets: a data packet can be read from the first communication link 1, a data packet can be read from the first communication link 2, a data packet can be read from the first communication link 3, ..., a data packet can be read from the first communication link 8 in sequence, and the read data packets are spliced to obtain a first spliced data packet; then continue to read a data packet from the first communication link 9, read a data packet from the first communication link 10, read a data packet from the first communication link 1 polled for the second time, ..., read a data packet from the first communication link 6 polled for the second time, and splice the read data packets to obtain a second spliced data packet, .... The following methods can also be used to splice as needed to obtain the required spliced data packets: two data packets can be read from the first communication link 1, two data packets can be read from the first communication link 2, two data packets can be read from the first communication link 3, and two data packets can be read from the first communication link 4, so as to splice the read data packets to obtain a first spliced data packet; two data packets can be read from the first communication link 5, two data packets can be read from the first communication link 6, two data packets can be read from the first communication link 7, and two data packets can be read from the first communication link 8, so as to splice the read data packets to obtain a second spliced data packet; two data packets can be read from the first communication link 9, two data packets can be read from the first communication link 10, two data packets can be read from the first communication link 1 polled for the second time, and two data packets can be read from the first communication link 2 polled for the second time, so as to splice the read data packets to obtain a third spliced data packet, ... It should be noted that the above-mentioned first communication links are 10, and reading one data packet and reading two data packets are examples, and are not limited to this.
[0068] In addition, when a plurality of data packets of different first communication links are spliced to obtain a spliced data packet, the number of the first communication links may be determined according to the bandwidth of the first communication link and the bandwidth of the second communication link.
[0069] Since the bit width ratio and bandwidth ratio of the first communication link and the second communication link are different, at the same time, the number of first communication links participating in data transmission and the number of first communication links participating in data packet splicing may be different. For example, when the bit width ratio of the first communication link and the second communication link is 1:8, and the bandwidth ratio is 1:10, through the optional embodiment of the present invention, ten first communication links can be supported to participate in the transmission of data packets through the second communication link at the same time, but when the data packets are spliced into spliced data packets, single data packets of eight first communication links are polled and read in the ten first communication links, and the above eight data packets are spliced into one spliced data packet and transmitted in the second communication link. The data packets of the two first communication links that do not participate in the data packet splicing work will enter the next round of data packet polling and reading, participate in the next round of data packet splicing work, and ensure that the ten first communication links can send data to the second communication link in real time at the same time and transmit it in the second communication link.
[0070] As an optional embodiment, the data packets read from multiple different first communication links are spliced to obtain a spliced data packet. In order to distinguish different spliced data packets, the spliced data packets can also be identified. For example, the following method can be used to implement: obtain the second identification information, wherein the second identification information includes: the starting communication link identification corresponding to the starting data packet in the read data packet, and the ending communication link identification corresponding to the ending data packet; insert the second identification information into the interval between the third predetermined data packet and the fourth predetermined data packet in the read data packet; after inserting the second identification information into the interval between the third predetermined data packet and the fourth predetermined data packet, the read data packets are spliced to obtain a spliced data packet. Since the data packets included in the spliced data packet are read from multiple first communication links, when the spliced data packet is identified, the communication link identification corresponding to the starting data packet and the communication link identification corresponding to the ending data packet in the spliced data packet can be directly used to represent it. Based on the principle similar to the above-mentioned first identification information, since reading data packets from the first communication link has certain polling rules, not every spliced data packet needs to be identified. As long as the second identification information corresponding to one of the spliced data packets is known, it is possible to know which first communication links the data packets included in the other spliced data packets come from. The details are as described above for the first identification information, which will not be repeated here.
[0071] It should be noted that the above-mentioned first communication link can be a network cable link, and the second communication link can be a fiber optic link, and of course it can also be other communication links that need to be converted. The above-mentioned embodiment and optional embodiment of the data transmission method one are mainly described from the scenario of converting the first communication link to the second communication link. The following embodiment and optional implementation of the data transmission method two are mainly described from the scenario of the second communication link correspondingly converted back to the first communication link. The same principles or similar operations explained in the previous scenarios can be applied in the following scenarios, and will not be repeated.
[0072] Figure 2 is a flowchart of a second data transmission method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0073] Step S202, receiving a spliced data packet transmitted by the second communication link, wherein the size of the spliced data packet is equal to the second bit width of the second communication link;
[0074] Step S204, splitting the spliced data packet to obtain multiple data packets, wherein the size of each data packet in the multiple data packets is equal to the first bit width of the first communication link;
[0075] Step S206: transmit the multiple data packets on the first communication link.
[0076] In an embodiment of the present invention, a method of receiving a spliced data packet is adopted, and the spliced data packet is split to obtain multiple data packets whose sizes are equal to the first bit width of the first communication link, and the multiple data packets are transmitted through the first communication link. Since the spliced data packet can be transmitted in a manner that meets the maximum transmission bandwidth of the second communication link, the purpose of effectively avoiding the waste of the transmission bandwidth of the communication link is achieved, thereby achieving the technical effect of maximizing the transmission performance of the communication link, and further solving the technical problem of how to break through the limit of link conversion in the related technology to maximize the link transmission performance.
[0077] As an optional embodiment, transmitting the multiple data packets on the first communication link includes: transmitting the multiple data packets on the same first communication link. In the case where the data packets from which the spliced data packets are obtained belong to the same first communication link at the sending end, after receiving the spliced data packet, the spliced data packet is split to obtain multiple data packets, and the multiple data packets obtained by the splitting are correspondingly transmitted on the same first communication link at the receiving end.
[0078] As an optional embodiment, in the case where there are multiple first communication links, transmitting multiple data packets on the same first communication link includes: polling and distributing the multiple data packets obtained by splitting the multiple spliced data packets to the corresponding same first communication link, and transmitting them on the corresponding same first communication link. Since the multiple spliced data packets are obtained by polling the multiple first communication links at the sending end, and each spliced data packet comes from the same first communication link, when the multiple spliced data packets are received, the spliced data packets are split respectively, and the data packets obtained after the split are polled and distributed to the first communication link corresponding to the receiving end for transmission.
[0079] As an optional embodiment, the multiple data packets obtained by splitting the multiple spliced data packets are polled and distributed to the corresponding same first communication link, and the multiple spliced data packets can be distinguished based on the identification information. For example, it can be implemented in the following way: the multiple spliced data packets are split respectively to obtain the first identification information, wherein the first identification information is used to identify the same first communication link corresponding to the predetermined spliced data packet among the multiple spliced data packets; according to the first identification information, the multiple data packets obtained by splitting the multiple spliced data packets are polled and distributed to the corresponding same first communication link. Since not every spliced data packet carries the identification information, after obtaining the spliced data packet carrying the first identification information, the first communication link corresponding to other spliced data packets can be determined based on the first identification information and the polling rule for reading the spliced data packet from the first communication link.
[0080] As an optional embodiment, the transmission of multiple data packets on the first communication link may be carried out in the following manner: when there are multiple first communication links, the multiple data packets are transmitted on different first communication links. For example, when the spliced data packets transmitted in the second communication link include data packets corresponding to multiple first communication links, the data packets corresponding to the multiple first communication links may be sent to the corresponding first communication links respectively and transmitted therein.
[0081] As an optional embodiment, when transmitting multiple data packets on different first communication links, it includes: distributing the multiple data packets to different first communication links by polling the multiple first communication links, and transmitting them on different first communication links. When the spliced data packet transmitted on the second communication link is a data packet of multiple first communication links spliced together in a certain order, the same rule can be followed in splitting the spliced data packet and sending it to multiple first communication links. For example, when the data packets of multiple first communication links are spliced in a polling manner, the spliced data packet is split to obtain multiple data packets, and the multiple data packets can be sent to the corresponding first communication links in sequence according to the polling order when splicing.
[0082] As an optional embodiment, when distributing multiple data packets to different first communication links by polling multiple first communication links to distribute data packets, the following processing method can be adopted: obtaining second identification information, wherein the second identification information includes: a starting communication link identifier corresponding to a starting data packet in the multiple data packets, and an ending communication link identifier corresponding to an ending data packet; according to the second identification information, distributing multiple data packets to different first communication links by polling multiple first communication links to distribute data packets. It should be noted that the above second identification information is not required to be carried by each spliced data packet, and the first communication link corresponding to other spliced data packets can also be obtained based on the corresponding second identification information carried by one of the spliced data packets.
[0083] As an optional embodiment, the first communication link may include a network cable link, and the second communication link may include an optical fiber link. The following takes the first communication link as a network cable link and the second communication link as an optical fiber link as an example to illustrate the optional implementation of the present invention.
[0084] In the related technology, the bandwidth of the optical fiber link is much larger than the bandwidth of the network cable link. At the same time, the bandwidth ratio of the optical fiber link to the network cable link is also larger than the bit width ratio of the optical fiber link to the network cable link. Therefore, if the channel width in the optical fiber is allocated according to the bit width ratio of the optical fiber link to the network cable link, it will cause a waste of bandwidth resources in the optical fiber link.
[0085] Figure 3 Schematic diagram of network cable data transmission in the field of LED control cited in an optional implementation manner of the present invention. Figure 3 As shown, since the LED display screen may be composed of multiple screens, when the controller controls multiple LED display screens, each LED display screen has a network cable responsible for signal transmission. However, when the distance between the controller end and the display end is too large, it may exceed the range allowed by the network cable transmission distance. Therefore, at this time, a medium that meets the needs of long-distance signal transmission can be used to replace the network cable. In the related art, the common practice is to use optical fiber for long-distance signal transmission.
[0086] Although the cost of optical fiber is much higher than that of network cables, it can provide much greater bandwidth than network cables. For example, optical fiber with a bandwidth of 10Gbps can be used to replace multiple network cables with a bandwidth of 1Gbps for long-distance signal transmission. Figure 4 This is a fiber-to-network cable conversion diagram in the field of LED control cited in an optional embodiment of the present invention. Figure 4 As shown, the control signal is sent from the controller and transmitted to the optical fiber-network cable converter through the optical fiber. The converted signal data is then sent to the corresponding LED display screen through multiple network cables.
[0087] Generally speaking, the data bit width of the network port is 8 bits and the data bit width of the optical fiber is 64 bits. Figure 5 This is a schematic diagram of the distribution of fiber bit width to network cable bit width in related technologies. Figure 5 As shown, in the related art, when using optical fiber transmission, for the convenience of processing, the common practice is to simply split the 64-bit data bit width of the optical fiber into 8-bit*8 mode, and distribute them to 8 network cables for communication. Each network cable link occupies one eighth of the optical fiber bit width. Each network cable link operates independently to achieve the purpose of independent transmission.
[0088] However, since the bandwidth ratio of the optical fiber link to the network cable link is greater than the bit width ratio of the optical fiber link to the network cable link, according to the method of evenly distributing the data bit width of the optical fiber, the links in the optical fiber sometimes have idle status, which will cause a waste of communication resources. For example, the data bandwidth of the optical fiber is 10Gbps, while the data bandwidth of a single network cable is 1Gbps. Originally, the data transmission capacity of a single optical fiber can support the data transmission of 10 network cables, but according to the allocation mechanism of the relevant method, the load performance of the link cannot be improved.
[0089] Figure 6 Schematic diagram of an input end data transmission method according to an optional embodiment of the present invention. Figure 6 As shown, through encoding conversion, the data from network cable 1 to network cable 10 are packaged according to certain rules and transmitted to the optical fiber link at the same time, so that the data of 10 network cables can be transmitted through one optical fiber link at the same time, achieving the purpose of increasing the carrying capacity of the optical fiber link.
[0090] The output end pretreatment (Transmitter Pretreatment, referred to as TxPre) module is responsible for data preprocessing of the network port data. For example, the data packet transmitted in the original network cable link can be converted into a data format including a rising edge, valid data, and a falling edge according to a predetermined rule and output. According to an optional implementation of the present invention, the data transmitted in the original network cable link has a packet header, and the packet header has 8 bits, including an Ethernet frame start delimiter (Start Frame Delimiter, referred to as SFD), wherein the SFD (one byte) and the preamble (seven bytes) are used to synchronize the transmitting device and the receiving device. The first eight bytes of the frame are used to attract the attention of the receiving device. Its actual function is to inform the receiving device to prepare to receive a new frame. However, in the process of optical fiber transmission, these bytes are not needed, so when preprocessing at the output end, the packet header of the original data can be removed.
[0091] The output data packaging processing (Transmitter Package, TxPkg for short) module is responsible for packaging the edge information and valid data of the data packet according to certain rules, and splicing the 8-bit width data of each channel into 64-bit width data. TxPkg can process the 10 channels in the same way, so the output data format after the final processing can also be consistent.
[0092] The TxArbit module is responsible for polling and sending out the 64-bit data of the 10 network ports. Because the bandwidth of the processed network cable splicing data packet is completely matched with the optical fiber bandwidth, this module does not waste any clock cycles, and does not need to perform special processing when the network port data is invalid data. It only needs to send one data per clock for data transmission, and the transmitted data is read from the 10 output port data packaging processing modules TxPkg of the previous stage in sequence.
[0093] Figure 7 Schematic diagram of a polling mechanism according to an optional implementation of the present invention. Figure 7 As shown in the figure, the processor at the sending end will query each network port in turn according to the number order. As the sending end, the network port needs to inform the back end of three types of packet information: rising edge, falling edge, and valid data. However, at the same time, only one type of packet is valid for each network port. Since the amount of information carried by the 64-bit wideband is sufficient to represent both the rising edge and the falling edge, when the state machine polls and sends, the network port number information can be embedded in the 64 bits and transmitted along with the edge information.
[0094] As an optional implementation, after parsing the spliced data packets, the identification information of the first communication link corresponding to each spliced data packet is obtained; and the spliced data packet is distributed to the first communication link corresponding to the identification information. By parsing the identification information corresponding to the spliced data packet, multiple spliced data packets corresponding to multiple first communication links in the optical fiber data can be accurately identified, and restored to the data format that can be transmitted by the corresponding first communication link through the data processing module.
[0095] The receiving end data analysis and processing (Receiver DePackage, RxDePkg for short) module can analyze the identification information in the spliced data packet, and determine the network cable link corresponding to the spliced data packet by obtaining and analyzing the identification information. In this way, the network port relationship mapping can also be done at the signal receiving end, otherwise the signal receiving end cannot confirm which network port the currently received data packet belongs to. According to an optional embodiment of the present invention, the correspondence between the spliced data packet and the network port can be obtained through the network port number carried by the edge information embedded in the spliced data packet.
[0096] The following description will be given by taking an example where the first communication link is a network cable link and the second communication link is an optical fiber link. Figure 8 is a schematic diagram of a receiving end data transmission method according to an optional embodiment of the present invention, such as Figure 8 As shown:
[0097] The RxDePkg module is responsible for parsing the data packets of 10 network ports from the optical fiber data. Since the TX end sends data packets according to the polling processing mechanism, the RX end also parses them according to the polling processing mechanism. After the data is parsed, it is distributed to each network cable data processing module according to the network port number.
[0098] The RxRePkg module is responsible for completing the network data packet reassembly. Since the input data is 64 bits and the network cable output is 8 bits, it is necessary to convert the 64-bit data into 8-bit data output.
[0099] Here, a 64-bit input and 8-bit output cache is used to achieve bit width conversion. Note that the cache is processed in big-endian mode when doing bit width conversion, that is, the high bit is output first and the low bit is output later. The specific processing method is to start to reassemble the data packet header SFD locally when the cache is not empty, and start to read the cached data after the data packet header reassembly is completed, reading 8 bits each time until the cache is empty, then pull down the read enable, and indicate that the current data packet has been read completely, so that the network cable data information that is completely consistent with the Tx end before the optical fiber conversion can be obtained, thereby directly driving the subsequent network port sending logic.
[0100] Through the above-mentioned embodiments and optional implementation methods, the use of data polling scheduling and multi-channel arbitration not only improves bandwidth utilization, increases the load area, and reduces customer usage costs; but also increases system portability and scalability.
[0101] Example 2
[0102] According to an embodiment of the present invention, a device for implementing the above-mentioned data transmission method 1 is also provided. Fig. 9 is a structural block diagram of a data transmission device 1 provided according to Embodiment 2 of the present invention, such as Fig. 9 As shown, the data transmission device 900 includes: an acquisition module 902, a splicing module 904 and a first transmission module 906. The signal processing device 900 is described in detail below.
[0103] An acquisition module 902 is used to acquire multiple data packets, wherein the multiple data packets are transmitted by a first communication link;
[0104] A splicing module 904, connected to the acquisition module 902, is used to splice multiple data packets to obtain a spliced data packet, wherein the size of the spliced data packet is equal to the second bit width of the second communication link;
[0105] The first transmission module 906 is connected to the splicing module 904 and is used to transmit the spliced data packet through the second communication link.
[0106] It should be noted here that the above-mentioned acquisition module 902, splicing module 904 and first transmission module 906 correspond to steps S102 to S106 in Example 1, and the instances and application scenarios implemented by the three modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1.
[0107] Example 3
[0108] According to an embodiment of the present invention, a device for implementing the second data transmission method is also provided. Fig.10 is a structural block diagram of a second data transmission device provided according to Embodiment 3 of the present invention, such as Fig.10 As shown, the data transmission device 1000 includes: a receiving module 1002, a splitting module 1004 and a second transmission module 1006. The data transmission device 1000 is described in detail below.
[0109] The receiving module 1002 is used to receive a spliced data packet transmitted by the second communication link, wherein the size of the spliced data packet is equal to the second bit width of the second communication link;
[0110] A splitting module 1004, connected to the receiving module 1002, is used to split the spliced data packet to obtain multiple data packets, wherein the size of each data packet in the multiple data packets is equal to the first bit width of the first communication link;
[0111] The second transmission module 1006 is connected to the splitting module 1004 and is used to transmit multiple data packets on the first communication link.
[0112] It should be noted here that the above-mentioned receiving module 1002, splitting module 1004 and second transmission module 1006 correspond to steps S202 to S206 in Example 1, and the three modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1.
[0113] Example 4
[0114] Fig.11 is a structural block diagram of a communication system provided according to Embodiment 4 of the present invention. Fig.11 As shown, the communication system 1100 includes: a transmitting end device 1102 and a receiving end device 1104. The communication system 1100 is described in detail below.
[0115] The sending end device 1102 includes a first processor, wherein the first processor is used to run a first program, wherein when the first program is run, any of the above data transmission methods executed by the sending end device 1102 is executed;
[0116] The receiving device 1104 is connected to the sending device 1102 via a communication link, and includes a second processor, wherein the second processor is used to run a second program, wherein when the second program is run, any of the above-mentioned data transmission methods executed by the receiving device 1104 is executed.
[0117] Example 5
[0118] According to an embodiment of the present invention, a storage medium is further provided. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the data transmission method provided in the first embodiment.
[0119] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0120] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: obtaining multiple data packets, wherein the multiple data packets are transmitted by a first communication link; splicing the multiple data packets to obtain a spliced data packet, wherein the size of the spliced data packet is equal to the second bit width of the second communication link; and transmitting the spliced data packet through the second communication link.
[0121] Optionally, in this embodiment, the storage medium is further configured to store program codes for executing the following steps: splicing multiple data packets to obtain a spliced data packet, including: splicing multiple data packets in the same first communication link to obtain a spliced data packet.
[0122] Optionally, in this embodiment, the storage medium is further configured to store program code for executing the following steps: transmitting the spliced data packet through the second communication link, including: polling and reading multiple spliced data packets spliced on the same first communication link, and transmitting them on the second communication link.
[0123] Optionally, in this embodiment, the storage medium is also configured to store program codes for executing the following steps: splicing multiple data packets in the same first communication link to obtain a spliced data packet, including: obtaining first identification information, wherein the first identification information is used to identify the same first communication link; inserting the first identification information at the interval between a first predetermined data packet and a second predetermined data packet in multiple data packets in the same first communication link; splicing multiple data packets in which the first identification information is inserted at the interval between the first predetermined data packet and the second predetermined data packet to obtain a spliced data packet.
[0124] Optionally, in this embodiment, the storage medium is further configured to store program codes for executing the following steps: splicing multiple data packets to obtain a spliced data packet, including: splicing multiple data packets of different first communication links to obtain a spliced data packet.
[0125] Optionally, in this embodiment, the storage medium is also configured to store program codes for executing the following steps: splicing multiple data packets from different first communication links to obtain a spliced data packet, including: polling and reading data packets on multiple different first communication links; splicing data packets read from multiple different first communication links to obtain a spliced data packet.
[0126] Optionally, in this embodiment, the storage medium is also configured to store program code for executing the following steps: splicing data packets read from multiple different first communication links to obtain a spliced data packet, including: obtaining second identification information, wherein the second identification information includes: a starting communication link identifier corresponding to a starting data packet in the read data packet, and an ending communication link identifier corresponding to an ending data packet; inserting the second identification information into the interval between a third predetermined data packet and a fourth predetermined data packet in the read data packet; after inserting the second identification information into the interval between the third predetermined data packet and the fourth predetermined data packet, splicing the read data packets to obtain a spliced data packet.
[0127] Optionally, in this embodiment, the storage medium is further configured to store program codes for executing the following steps: the first communication link includes: a network cable link, and the second communication link includes: an optical fiber link.
[0128] Optionally, in this embodiment, the storage medium is also configured to store program code for executing the following steps: receiving a spliced data packet transmitted by the second communication link, wherein the size of the spliced data packet is equal to the second bit width of the second communication link; splitting the spliced data packet to obtain multiple data packets, wherein the size of each of the multiple data packets is equal to the first bit width of the first communication link; and transmitting the multiple data packets on the first communication link.
[0129] Optionally, in this embodiment, the storage medium is further configured to store program codes for executing the following steps: transmitting multiple data packets on the first communication link, including: transmitting multiple data packets on the same first communication link.
[0130] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: transmitting multiple data packets on the same first communication link, including: polling and distributing multiple data packets obtained by splitting multiple spliced data packets respectively to the corresponding same first communication link, and transmitting them on the corresponding same first communication link.
[0131] Optionally, in this embodiment, the storage medium is also configured to store program codes for executing the following steps: splitting a plurality of spliced data packets separately to obtain first identification information, wherein the first identification information is used to identify a same first communication link corresponding to a predetermined spliced data packet among the plurality of spliced data packets; and according to the first identification information, polling and distributing a plurality of data packets obtained by splitting the plurality of spliced data packets separately to the corresponding same first communication link.
[0132] Optionally, in this embodiment, the storage medium is further configured to store program codes for executing the following steps: transmitting the multiple data packets on the first communication link, including: transmitting the multiple data packets on different first communication links.
[0133] Optionally, in this embodiment, the storage medium is also configured to store program code for performing the following steps: transmitting multiple data packets on different first communication links, including: distributing multiple data packets to different first communication links by polling and distributing data packets to multiple first communication links, and transmitting them on different first communication links.
[0134] Example 6
[0135] The embodiment of the present invention can provide a computer terminal, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal can also be replaced by a terminal device such as a mobile terminal.
[0136] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0137] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the signal processing method of the application: obtaining multiple data packets, wherein the multiple data packets are transmitted by the first communication link; splicing the multiple data packets to obtain a spliced data packet, wherein the size of the spliced data packet is equal to the second bit width of the second communication link; and transmitting the spliced data packet through the second communication link.
[0138] Optionally, Fig.12 is a structural block diagram of a computer terminal according to an embodiment of the present invention. Fig.12 As shown, the computer terminal may include: one or more (only one is shown in the figure) processors 1202, a memory 1204, etc.
[0139] Among them, the memory 1204 can be used to store software programs and modules, such as program instructions / modules corresponding to the signal processing method and device in the embodiment of the present invention. The processor 1202 executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned Internet of Things testing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0140] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain multiple data packets, wherein the multiple data packets are transmitted by the first communication link; splice the multiple data packets to obtain a spliced data packet, wherein the size of the spliced data packet is equal to the second bit width of the second communication link; and transmit the spliced data packet through the second communication link.
[0141] Optionally, the processor may also execute program code of the following steps: splicing a plurality of data packets to obtain a spliced data packet, including: splicing a plurality of data packets in the same first communication link to obtain a spliced data packet.
[0142] Optionally, the processor may also execute program code of the following steps: transmitting the spliced data packet through the second communication link, including: polling and reading multiple spliced data packets spliced on the same first communication link, and transmitting them on the second communication link.
[0143] Optionally, the processor may also execute program code for the following steps: splicing multiple data packets in the same first communication link to obtain a spliced data packet, including: obtaining first identification information, wherein the first identification information is used to identify the same first communication link; inserting the first identification information at the interval between a first predetermined data packet and a second predetermined data packet in multiple data packets in the same first communication link; and splicing multiple data packets in which the first identification information is inserted at the interval between the first predetermined data packet and the second predetermined data packet to obtain a spliced data packet.
[0144] Optionally, the processor may also execute program code of the following steps: splicing a plurality of data packets to obtain a spliced data packet, including: splicing a plurality of data packets of different first communication links to obtain a spliced data packet.
[0145] Optionally, the processor may also execute program code for the following steps: splicing multiple data packets from different first communication links to obtain a spliced data packet, including: polling and reading data packets on multiple different first communication links; splicing data packets read from multiple different first communication links to obtain a spliced data packet.
[0146] Optionally, the processor may also execute program code for the following steps: splicing data packets read from multiple different first communication links to obtain a spliced data packet, including: obtaining second identification information, wherein the second identification information includes: a starting communication link identifier corresponding to a starting data packet in the read data packet, and an ending communication link identifier corresponding to an ending data packet; inserting the second identification information into the interval between a third predetermined data packet and a fourth predetermined data packet in the read data packet; and after inserting the second identification information into the interval between the third predetermined data packet and the fourth predetermined data packet, splicing the read data packets to obtain a spliced data packet.
[0147] Optionally, the processor may also execute program codes of the following steps: the first communication link includes a network cable link, and the second communication link includes an optical fiber link.
[0148] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: receive a spliced data packet transmitted by the second communication link, wherein the size of the spliced data packet is equal to the second bit width of the second communication link; split the spliced data packet to obtain multiple data packets, wherein the size of each of the multiple data packets is equal to the first bit width of the first communication link; and transmit the multiple data packets on the first communication link.
[0149] Optionally, the processor may also execute program code of the following steps: transmitting multiple data packets on the first communication link, including: transmitting multiple data packets on the same first communication link.
[0150] Optionally, the processor may also execute the program code of the following steps: transmitting multiple data packets on the same first communication link, including: polling and distributing multiple data packets obtained by splitting multiple spliced data packets respectively to the corresponding same first communication link, and transmitting them on the corresponding same first communication link.
[0151] Optionally, the processor may also execute the program code of the following steps: splitting a plurality of spliced data packets separately to obtain first identification information, wherein the first identification information is used to identify the same first communication link corresponding to a predetermined spliced data packet among the plurality of spliced data packets; and according to the first identification information, polling and distributing the plurality of data packets obtained by splitting the plurality of spliced data packets separately to the corresponding same first communication link.
[0152] Optionally, the processor may also execute program code of the following steps: transmitting multiple data packets on the first communication link, including: transmitting multiple data packets on different first communication links.
[0153] Optionally, the processor may also execute program code for the following steps: transmitting multiple data packets on different first communication links, including: distributing multiple data packets to different first communication links by polling multiple first communication links to distribute data packets, and transmitting them on different first communication links.
[0154] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0155] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0156] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0157] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0158] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0159] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0160] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A data transmission method, It is characterized in that include: Acquire a plurality of data packets, wherein the plurality of data packets are transmitted by a first communication link; splicing the multiple data packets to obtain a spliced data packet, wherein the size of the spliced data packet is equal to the second bit width of the second communication link; the bandwidth ratio of the second communication link to the first communication link is greater than the bit width ratio of the second communication link to the first communication link, and the sum of the bandwidths of the first communication links is equal to the bandwidth of the second communication link; The spliced data packet is transmitted via the second communication link; wherein one spliced data packet is transmitted in each clock cycle of the second communication link.
2. The method according to claim 1, It is characterized in that The multiple data packets are spliced together to obtain a spliced data packet, including: Multiple data packets in the same first communication link are spliced to obtain the spliced data packet.
3. The method according to claim 2, It is characterized in that Transmitting the spliced data packet through the second communication link includes: The plurality of spliced data packets spliced on the same first communication link are read in a polling manner and transmitted on the second communication link.
4. The method according to claim 3, It is characterized in that The method comprises: splicing a plurality of data packets in the same first communication link to obtain the spliced data packet, comprising: Acquire first identification information, wherein the first identification information is used to identify the same first communication link; inserting the first identification information at an interval between a first predetermined data packet and a second predetermined data packet in a plurality of data packets in the same first communication link; A plurality of data packets into which the first identification information is inserted at intervals between the first predetermined data packet and the second predetermined data packet are spliced to obtain the spliced data packet.
5. The method according to claim 1, It is characterized in that The multiple data packets are spliced together to obtain a spliced data packet, including: Multiple data packets of different first communication links are spliced to obtain the spliced data packet.
6. The method according to claim 5, It is characterized in that The method comprises: splicing a plurality of data packets of different first communication links to obtain the spliced data packet, comprising: Polling and reading data packets on a plurality of different first communication links; The data packets read from the multiple different first communication links are spliced to obtain the spliced data packet.
7. The method according to claim 6, It is characterized in that The method comprises: splicing the data packets read from the plurality of different first communication links to obtain the spliced data packet, comprising: Acquire second identification information, wherein the second identification information includes: a start communication link identifier corresponding to a start data packet in the read data packet, and an end communication link identifier corresponding to an end data packet; inserting the second identification information into the interval between the third predetermined data packet and the fourth predetermined data packet in the read data packet; After the second identification information is inserted into the interval between the third predetermined data packet and the fourth predetermined data packet, the read data packets are spliced to obtain the spliced data packet.
8. The method according to any one of claims 1 to 7, It is characterized in that The first communication link includes: a network cable link, and the second communication link includes: an optical fiber link.
9. A data transmission method, It is characterized in that include: receiving a spliced data packet transmitted by a second communication link, wherein a size of the spliced data packet is equal to a second bit width of the second communication link, and one spliced data packet is transmitted in each clock cycle of the second communication link; Splitting the spliced data packet to obtain a plurality of data packets, wherein the size of each data packet in the plurality of data packets is equal to the first bit width of the first communication link; the bandwidth ratio of the second communication link to the first communication link is greater than the bit width ratio of the second communication link to the first communication link, and the sum of the bandwidths of the first communication links is equal to the bandwidth of the second communication link; The plurality of data packets are transmitted over the first communication link.
10. The method according to claim 9, It is characterized in that Transmitting the plurality of data packets over the first communication link comprises: The multiple data packets are transmitted over the same first communication link.
11. The method according to claim 10, It is characterized in that Transmitting the multiple data packets over the same first communication link comprises: The multiple data packets obtained by splitting the multiple spliced data packets are polled and distributed to the corresponding same first communication link, and transmitted on the corresponding same first communication link.
12. The method according to claim 11, It is characterized in that The method of polling and distributing the multiple data packets obtained by splitting the multiple spliced data packets to the corresponding same first communication link includes: Splitting the plurality of spliced data packets respectively to obtain first identification information, wherein the first identification information is used to identify a same first communication link corresponding to a predetermined spliced data packet among the plurality of spliced data packets; According to the first identification information, the multiple data packets obtained by splitting the multiple spliced data packets are polled and distributed to the same corresponding first communication link.
13. The method according to claim 9, It is characterized in that Transmitting the plurality of data packets over the first communication link comprises: The multiple data packets are transmitted over different first communication links.
14. The method according to claim 13, It is characterized in that Transmitting the multiple data packets over different first communication links comprises: The multiple data packets are distributed to different first communication links in a manner of polling and distributing the data packets to the multiple first communication links, and are transmitted on the different first communication links.
15. The method according to claim 14, It is characterized in that The method of distributing the plurality of data packets to different first communication links by polling the plurality of first communication links for distributing data packets comprises: Acquire second identification information, wherein the second identification information includes: a start communication link identifier corresponding to a start data packet among the multiple data packets, and an end communication link identifier corresponding to an end data packet; According to the second identification information, the multiple data packets are distributed to different first communication links by polling the multiple first communication links to distribute the data packets.
16. The method according to any one of claims 9 to 15, It is characterized in that The first communication link includes: a network cable link, and the second communication link includes: an optical fiber link.
17. A data transmission device, It is characterized in that include: An acquisition module, configured to acquire a plurality of data packets, wherein the plurality of data packets are transmitted via a first communication link; a splicing module, configured to splice the multiple data packets to obtain a spliced data packet, wherein the size of the spliced data packet is equal to the second bit width of the second communication link; the bandwidth ratio of the second communication link to the first communication link is greater than the bit width ratio of the second communication link to the first communication link, and the sum of the bandwidths of the first communication links is equal to the bandwidth of the second communication link; The first transmission module is used to transmit the spliced data packet through the second communication link; wherein, one spliced data packet is transmitted in each clock cycle of the second communication link.
18. A data transmission device, It is characterized in that include: A receiving module, configured to receive a spliced data packet transmitted by a second communication link, wherein a size of the spliced data packet is equal to a second bit width of the second communication link, and one spliced data packet is transmitted in each clock cycle of the second communication link; a splitting module, configured to split the spliced data packet to obtain a plurality of data packets, wherein the size of each data packet in the plurality of data packets is equal to the first bit width of the first communication link; the bandwidth ratio of the second communication link to the first communication link is greater than the bit width ratio of the second communication link to the first communication link, and the sum of the bandwidths of the first communication links is equal to the bandwidth of the second communication link; The second transmission module is used to transmit the multiple data packets on the first communication link.
19. A communication system, It is characterized in that The method comprises a sending end device and a receiving end device, wherein the sending end device comprises a first processor, and the receiving end device comprises a second processor, wherein the first processor is used to run a first program, wherein when the first program is run, the data transmission method described in any one of claims 1 to 8 is executed, and the second processor is used to run a second program, wherein when the second program is run, the data transmission method described in any one of claims 9 to 16 is executed.
20. A storage medium, It is characterized in that The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the data transmission method according to any one of claims 1 to 16.
21. A processor, It is characterized in that The processor is used to run a program, wherein the program executes the data transmission method according to any one of claims 1 to 16 when running.
