CN116033585A - Data transmission method, device, communication equipment and storage medium - Google Patents

Data transmission method, device, communication equipment and storage medium Download PDF

Info

Publication number
CN116033585A
CN116033585A CN202310293458.XA CN202310293458A CN116033585A CN 116033585 A CN116033585 A CN 116033585A CN 202310293458 A CN202310293458 A CN 202310293458A CN 116033585 A CN116033585 A CN 116033585A
Authority
CN
China
Prior art keywords
data
target
physical channel
channel
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310293458.XA
Other languages
Chinese (zh)
Inventor
曾嘉
刘美辰
徐晓春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kaihong Digital Industry Development Co Ltd
Original Assignee
Shenzhen Kaihong Digital Industry Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kaihong Digital Industry Development Co Ltd filed Critical Shenzhen Kaihong Digital Industry Development Co Ltd
Priority to CN202310293458.XA priority Critical patent/CN116033585A/en
Publication of CN116033585A publication Critical patent/CN116033585A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

The embodiment of the invention provides a data transmission method, a data transmission device, communication equipment and a storage medium, and belongs to the field of communication. The method comprises the following steps: packaging data to be transmitted into a target message; determining the importance level of a target message, and acquiring the priority of each physical channel in N physical channels for transmitting data; selecting M physical channels from N physical channels as target physical channels according to the importance level and the priority of data transmission of each physical channel; and transmitting the target message to the communication equipment of the opposite terminal through M target physical channels. The method improves the timeliness and reliability of data transmission between communication devices.

Description

Data transmission method, device, communication equipment and storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to a data transmission method, apparatus, communication device, and storage medium.
Background
The communication between the communication devices at present is mostly implemented by using a single channel, for example, a twisted pair, a coaxial cable, an optical fiber, or other wired channels, and for example, a wifi, bluetooth, zigbee, or a mobile network, or other wireless channels. When selecting a channel between communication devices, it is generally necessary to select one channel for communication by considering factors such as transmission distance, data amount, confidentiality, etc., and when a channel fails to cause a large amount of data, it is considered that another channel is used for reinitiating communication. The single channel communication mode has long retransmission interval period when network failure occurs, and is slow in response, so that timeliness and reliability of data transmission between communication devices cannot be guaranteed. Therefore, how to improve the timeliness and reliability of data transmission between communication apparatuses is a problem to be solved at present.
Disclosure of Invention
The embodiment of the invention provides a data transmission method, a data transmission device, communication equipment and a storage medium, aiming at improving timeliness and reliability of data transmission between communication equipment.
In a first aspect, an embodiment of the present invention provides a data transmission method, applied to a communication device, where the communication device supports N physical channels, where N is an integer greater than or equal to 2, and the method includes:
packaging data to be transmitted into a target message;
determining the importance level of the target message, and acquiring the priority of each physical channel of the N physical channels for transmitting data;
selecting M physical channels from the N physical channels as target physical channels according to the importance level and the priority of data transmission of each physical channel, wherein M is smaller than or equal to N;
and transmitting the target message to communication equipment of an opposite terminal through the M target physical channels, wherein when the communication equipment of the opposite terminal receives the target message, if the message ID of the target message is different from the stored message ID, the target message is reserved, and if not, the target message is discarded.
In a second aspect, an embodiment of the present invention further provides a data transmission apparatus, which is applied to a communication device, where the communication device supports N physical channels, where N is an integer greater than or equal to 2, and the data transmission apparatus includes:
The message packaging module is used for packaging the data to be transmitted into a target message;
the determining module is used for determining the importance level of the target message and acquiring the priority of the transmission data of each physical channel in the N physical channels;
a channel selection module, configured to select M physical channels from the N physical channels as target physical channels according to the importance level and the priority of data transmitted by each physical channel, where M is smaller than or equal to N;
and the data transmission module is used for transmitting the target message to communication equipment of an opposite terminal through the M target physical channels, wherein when the communication equipment of the opposite terminal receives the target message, if the message ID of the target message is different from the stored message ID, the target message is reserved, and if not, the target message is discarded.
In a third aspect, an embodiment of the present invention further provides a communication apparatus, where the communication apparatus includes a communication device, a processor, a memory, a computer program stored on the memory and executable by the processor, and a data bus for implementing connection communication among the communication device, the processor, and the memory, where the communication device supports N physical channels, and N is an integer greater than or equal to 2, where the computer program when executed by the processor implements the data transmission method according to the first aspect.
In a fourth aspect, embodiments of the present invention further provide a storage medium for computer-readable storage, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the data transmission method according to the first aspect.
The embodiment of the invention provides a data transmission method, a device, communication equipment and a storage medium, wherein the data to be transmitted is packaged into a target message, the importance level of the target message is determined, then the priority of data transmission of each physical channel in a plurality of physical channels supported by the communication equipment is obtained, and a plurality of target physical channels suitable for transmitting the target message are selected from the plurality of physical channels according to the importance level of the target message and the priority of data transmission of each physical channel, so that the target message can be transmitted to the communication equipment at the opposite end through the plurality of target physical channels, the data to be transmitted carried by the target message can be timely and completely transmitted to the opposite end, and the timeliness and reliability of data transmission between the communication equipment are greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a data transmission method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a scenario in which a target physical channel transmits a target message according to an embodiment of the present invention;
fig. 3 is a schematic diagram of another scenario in which a target physical channel transmits a target message according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of a data transmission device according to an embodiment of the present invention;
fig. 5 is a schematic block diagram of a communication device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
It is to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The communication between the communication devices at present is mostly implemented by using a single channel, for example, a twisted pair, a coaxial cable, an optical fiber, or other wired channels, and for example, a wifi, bluetooth, zigbee, or a mobile network, or other wireless channels. When selecting a channel between communication devices, it is generally necessary to select one channel for communication by considering factors such as transmission distance, data amount, confidentiality, etc., and when a channel fails to cause a large amount of data, it is considered that another channel is used for reinitiating communication. The single channel communication mode has long retransmission interval period when network failure occurs, and is slow in response, so that timeliness and reliability of data transmission between communication devices cannot be guaranteed.
The embodiment of the invention provides a data transmission method, a data transmission device, communication equipment and a storage medium. According to the data transmission method, data to be transmitted is packaged into a target message based on a preset packaging rule, the importance level of the target message is determined, then the priority of data transmission of each physical channel in a plurality of physical channels supported by the communication equipment is obtained, and a plurality of target physical channels suitable for transmitting the target message are selected from the plurality of physical channels according to the importance level of the target message and the priority of data transmission of each physical channel, so that the target message can be transmitted to the communication equipment of an opposite terminal through the plurality of target physical channels, the data to be transmitted carried by the target message can be timely and completely transmitted to the opposite terminal, and the timeliness and reliability of data transmission between the communication equipment are greatly improved.
Wherein the communication device supports N physical channels, N being an integer greater than or equal to 2. The physical channel may be any one of a wired channel, a wireless channel, a mobile phone, a camera, a tablet computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, a personal computer (personal computer, PC), a netbook, a personal digital assistant (personal digital assistant, PDA), and a server, to which the embodiment of the present invention is not limited.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a flow chart of a data transmission method according to an embodiment of the invention. The data transmission method is applied to communication equipment, the communication equipment supports N physical channels, N is an integer greater than or equal to 2, and the physical channels can be wired channels or wireless channels.
As shown in fig. 1, the data transmission method includes steps S101 to S104.
Step S101, packaging data to be transmitted into a target message.
In this embodiment, the data to be transmitted may be operation data inside the communication device, or may be sensing data outside the communication device, where the data to be transmitted is different in different scenarios. For example, in order to protect a certain forest, cameras are arranged in an area where the forest to be protected is located, the cameras are connected with communication equipment, and data to be transmitted are image data acquired by the cameras. For example, in order to find out whether a fire disaster occurs in a certain forest in time, a smoke detector is arranged in an area where the forest to be monitored is located, the smoke detector is connected with communication equipment, and data to be transmitted are alarm signals output by the smoke detector.
In some embodiments, the manner of encapsulating the data to be transmitted into the target message may be: acquiring a target data length, wherein the target data length is determined according to the configuration value of a corresponding maximum transmission unit (Maximum Transmission Unit, MTU) of each physical channel; acquiring the data length of data to be transmitted, and determining whether the data length is smaller than or equal to the target data length; and under the condition that the data length is smaller than or equal to the target data length, packaging the data to be transmitted into a target message. The target data length is determined according to the configuration value of the corresponding maximum transmission unit (Maximum Transmission Unit, MTU) of each physical channel, so that when the data length of the data to be transmitted is smaller than or equal to the target data length, the data to be transmitted is packaged into a target message, each physical channel can transmit the target message at one time, and the transmission rate and the error rate of each physical channel are ensured.
In some embodiments, in the case that the data length is greater than the target data length, splitting the data to be transmitted into a plurality of data segments, the data length of the data segments being less than or equal to the target data length; and packaging the plurality of data fragments into a plurality of target messages, wherein one data fragment corresponds to one target message. The target data length is determined according to the configuration value of the corresponding maximum transmission unit (Maximum Transmission Unit, MTU) of each physical channel, so that when the data length of the data to be transmitted is larger than the target data length, the data to be transmitted is split into a plurality of data fragments, each data fragment is packaged into a corresponding target message, each physical channel can transmit the target message at one time, and the transmission rate and the error rate of each physical channel are ensured.
In some embodiments, the manner of obtaining the target data length may be: acquiring a configuration value of each MTU corresponding to each physical channel; determining the minimum configuration value in the plurality of configuration values, and acquiring the data length corresponding to the minimum configuration value; and determining the data length corresponding to the minimum configuration value as a target data length, or calculating the product of the data length corresponding to the minimum configuration value and a preset coefficient, and determining the product as the target data length.
In some embodiments, the manner of encapsulating the data to be transmitted into the target message may be: determining the importance level of the data to be transmitted, and acquiring an event identifier corresponding to the importance level; and packaging the data to be transmitted and the event identifier into a target message. The target message carries an event identifier corresponding to the importance level of the data to be transmitted and a message body containing the data to be transmitted, and the event identifier is used for identifying the importance level of the data to be transmitted carried by the target message. The importance level and the event identifier are in one-to-one correspondence, and the correspondence between the importance level and the event identifier may be set in advance by the user, which is not particularly limited in the embodiment of the present invention. The data to be transmitted and the event identification corresponding to the importance level are packaged together to form the target message, so that when the communication equipment transmits the target message, the importance level of the target message can be accurately determined through the event identification carried in the target message, and the target message can be adaptively transmitted through a physical channel, thereby improving the timeliness and reliability of data transmission.
In some embodiments, the manner of encapsulating the plurality of data fragments into the plurality of target messages may be: determining the importance level of the data to be transmitted, and acquiring an event identifier corresponding to the importance level; and allocating an identification ID to each data segment, and packaging the data segment, the identification ID corresponding to the data segment and the event identification corresponding to the importance level into a target message for each data segment. Wherein the identification IDs of the different data segments are different, the identification IDs being used for uniquely identifying the data segments. By introducing the identification ID of the data segment when the target message is packaged, after the target message is transmitted to the receiving end, the receiving end can reorganize a plurality of received data segments according to the identification ID, and complete data is obtained.
Step S102, determining the importance level of the target message, and acquiring the priority of each physical channel in the N physical channels for transmitting data.
In this embodiment, the higher the importance level of the target message is, the more important the data carried by the target message is, and the lower the importance level of the target message is, the less important the data carried by the target message is, and the different priorities of transmitting data through different physical channels may be different or the same. Wherein each of the N physical channels is a wired channel, or each of the N physical channels is a wireless channel, or the N physical channels include at least one wired channel and at least one wireless channel. For example, the communication device supports fibre channel, ethernet channel, mobile network channel, etc., and the mobile network may be a 4G network or a 5G network, etc.
In some embodiments, the manner of determining the importance level of the target message may be: acquiring an event identifier carried by a target message; inquiring a mapping relation table between event identifications and importance levels stored in a memory file system to obtain the importance levels corresponding to the event identifications; and determining the importance level obtained by the query as the importance level of the target message. The memory file system includes at least one of tmpfs (temporary file system), ramfs (file system based on random access memory), shmfs (shared memory file system) and hugetlbfs (memory file system based on megapages), and the mapping relation table between the event identifier and the importance level may be set by the user at his own. By storing the mapping relation table between the event identification and the importance level in the memory file system, the mapping relation table can be quickly queried based on the event identification carried by the message, and the importance level of the target message can be further quickly determined.
In some embodiments, the priority of the physical channel for transmitting data may vary with the channel parameters of the physical channel. Wherein the channel parameters include transmission rate and/or bit error rate. The priority of the physical channel for transmitting data can be changed along with the change of the channel parameters of the physical channel, so that the dynamic change of the priority of the physical channel can be realized, different physical channels can be dynamically selected when a message is transmitted, and the timeliness and the reliability of data transmission can be ensured.
In some embodiments, the channel parameters of each of the N physical channels are obtained at a preset interval time; and adjusting the priority of each physical channel for transmitting data according to the channel parameters of each physical channel. The channel parameters include a transmission rate and/or an error rate, and the preset interval time may be set based on actual situations, which is not specifically limited in the embodiment of the present invention. For example, the preset interval time is 30 minutes or 1 hour. The priority of the physical channel transmission data is adjusted based on the channel parameters of the physical channel regularly, so that the dynamic change of the priority of the physical channel can be realized, different physical channels can be dynamically selected when a message is transmitted, and the timeliness and the reliability of the data transmission can be ensured.
In some embodiments, according to the channel parameter of each physical channel, the manner of adjusting the priority of transmitting data of each physical channel may be: determining the target priority of the transmission data of each physical channel according to the transmission rate and/or the error rate of each physical channel; and adjusting the current priority of each physical channel to be the corresponding target priority. The target priority of the data transmitted by each physical channel can be accurately determined through the transmission rate and/or the error rate of each physical channel, so that the current priority of each physical channel can be accurately adjusted, the priority of the physical channel can be matched with the transmission rate and/or the error rate of the physical channel, and the subsequent selection of a proper message for transmission based on the message is facilitated, so that the timeliness and the reliability of the data transmission are ensured.
In some embodiments, the manner of determining the target priority of transmitting data for each physical channel according to the transmission rate and/or the bit error rate of each physical channel may be: for each physical channel, inquiring a first mapping relation file between a pre-stored transmission rate and a priority to obtain a first priority corresponding to the transmission rate of the physical channel, and determining the inquired first priority as a target priority of data transmission of the physical channel; or inquiring a second mapping relation file between the prestored error rate and the priority to obtain a second priority corresponding to the error rate of the physical channel, and determining the inquired second priority as the target priority of the physical channel transmission data; or, inquiring a third mapping relation file between the pre-stored transmission rate, the bit error rate and the priority, acquiring a third priority corresponding to the transmission rate and the bit error rate of the physical channel, and determining the third priority obtained by inquiry as the target priority of the transmission data of the physical channel.
In some embodiments, the manner of determining the target priority of transmitting data for each physical channel according to the transmission rate and the error rate of each physical channel may be: for each physical channel, inquiring a first mapping relation file between a pre-stored transmission rate and a priority to obtain a first priority corresponding to the transmission rate of the physical channel; inquiring a second mapping relation file between the prestored error rate and the priority to obtain a second priority corresponding to the error rate of the physical channel; the smaller one of the first priority and the second priority is determined as the target priority of the physical channel for transmitting data. The first mapping relationship file, the second mapping relationship file and the third mapping relationship file may be set by the user based on actual situations, which is not particularly limited in the embodiment of the present invention. The priority of the physical channel transmission data can be accurately determined by comprehensively considering the transmission rate and the error rate of the physical channel.
In some embodiments, the manner of determining the target priority for each physical channel to transmit data according to the transmission rate of each physical channel may be: and sequencing each physical channel according to the sequence from high to low of the transmission rate of each physical channel to obtain a first physical channel queue, determining the first priority of the physical channel for transmitting data according to the sequence of the physical channel in the first physical channel queue, and determining the first priority of the physical channel for transmitting data as the target priority of the physical channel for transmitting data. Wherein the earlier the physical channel is ordered in the first physical channel queue, the higher the first priority of the physical channel for transmitting data.
For example, the communication device supports physical channel a, physical channel B and physical channel C, and if the transmission rates of physical channel a, physical channel B and physical channel C are a, B and C respectively, and a is greater than C, C is greater than B, then the physical channel a, physical channel B and physical channel C are ordered in order from high to low of the transmission rates of physical channel a, physical channel B and physical channel C, so as to obtain a first physical channel queue [ a, C, B ], and then the first priority of data transmission of physical channel a is the highest, and then the first priority of data transmission of physical channel C is the lowest.
In some embodiments, the manner of determining the target priority for each physical channel to transmit data according to the bit error rate or bit error rate of each physical channel may be: and sequencing each physical channel according to the sequence of the error rate of each physical channel from low to high to obtain a second physical channel queue, determining the second priority of the physical channel for transmitting data according to the sequence of the physical channel in the second physical channel queue, and determining the second priority of the physical channel for transmitting data as the target priority of the physical channel for transmitting data. Wherein the earlier the physical channel is ordered in the second physical channel queue, the higher the second priority of the physical channel for transmitting data.
For example, the communication device supports physical channel a, physical channel B, and physical channel C, and the bit error rates of physical channel a, physical channel B, and physical channel C are P a 、P b And P c And P is b Greater than P a ,P a Greater than P c The physical channel A, the physical channel B and the physical channel C are ordered according to the order of the error rates of the physical channel A, the physical channel B and the physical channel C from low to high, and a second physical channel queue [ B, A, C ] can be obtained]The first priority of the data transmission of the physical channel B is highest, the second priority of the data transmission of the physical channel a is next highest, and the first priority of the data transmission of the physical channel C is lowest.
In some embodiments, the manner of determining the target priority of transmitting data for each physical channel according to the transmission rate and/or the bit error rate of each physical channel may be: sequencing each physical channel according to the sequence from high to low of the transmission rate of each physical channel to obtain a first physical channel queue, and determining a first priority of the physical channel transmission data according to the sequencing of the physical channels in the first physical channel queue; sequencing each physical channel according to the sequence from low to high of the error rate of each physical channel to obtain a second physical channel queue, and determining a second priority of the physical channel transmission data according to the sequence of the physical channel in the second physical channel queue; the smaller one of the first priority and the second priority is determined as the target priority of the physical channel for transmitting data. The priority of the physical channel transmission data can be accurately determined by comprehensively considering the transmission rate and the error rate of the physical channel.
Step S103, selecting M physical channels from N physical channels as target physical channels according to the importance level and the priority of data transmission of each physical channel.
In this embodiment, according to the importance level of the target message and the priority of the transmission data of each physical channel, M target physical channels suitable for transmitting the target message may be selected from N physical channels. For example, the communication device supports fibre channel, ethernet channel, and 4G network channel, and is ordered from high to low in order of priority of transmission data: the data to be transmitted is the alarm information output by the smoke detector, the importance level of the alarm information is highest, the priority of the data transmitted by the optical fiber channel is highest, the optical fiber channel is preferentially selected as a target physical channel for transmitting a target message carrying the alarm information, or the optical fiber channel, the Ethernet channel and the 4G network channel can be simultaneously selected as the target physical channel for transmitting the target message carrying the alarm information.
In some embodiments, according to the importance level and the priority of transmitting data on each physical channel, the manner of selecting M physical channels from the N physical channels as the target physical channels may be: for each physical channel, acquiring a preset importance level corresponding to the priority of the physical channel transmission data; and determining the physical channel as a target physical channel under the condition that the importance level of the target message is greater than or equal to the preset importance level. The communication device stores a mapping relation file between the priority of the physical channel transmission data and a preset importance level, and the preset importance level corresponding to the priority of the physical channel transmission data can be obtained through quick inquiry by the mapping relation file. Because the importance level of the target message is greater than or equal to the preset importance level corresponding to the target physical channel, the priority of the physical channel can be ensured to be matched with the importance level of the target message, and data can be timely and reliably transmitted.
For example, the communication device supports fibre channel, ethernet channel, and 4G network channel, and is ordered from high to low in order of priority of transmission data: the importance levels of the optical fiber channel, the Ethernet channel and the 4G network channel are divided into 5 levels, namely L1, L2, L3, L4 and L5, wherein L1 is lowest, L5 is highest, the preset importance level corresponding to the priority of the optical fiber channel transmission data is L1, which means that the optical fiber channel does not discard the messages with the importance levels of L1, L2, L3, L4 and L5, the preset importance level corresponding to the priority of the Ethernet channel transmission data is L2, which means that the Ethernet channel needs to discard the message with the importance level of L1, the message with the importance level of L2, L3, L4 and L5, the preset importance level corresponding to the priority of the 4G network channel transmission data is L4, which means that the 4G network channel discards the message with the importance level of L1 to L3, and the message with the importance level of L4 and L5.
In this regard, in the case where the alarm information with the importance level of L4 needs to be transmitted, since the data length of the alarm information is smaller than the target data length, and the step of transmitting is not required, the alarm information may be packaged into a target packet a, where the importance level of the target packet a is L4, the preset importance level corresponding to the optical fiber channel is L1, the preset importance level corresponding to the ethernet channel is L2, and the preset importance level corresponding to the 4G network channel is L4, so that the optical fiber channel, the ethernet channel, and the 4G network channel may be selected as target physical channels for transmitting the target packet a.
In the case of transmitting the image data with the importance level of L2, since the data length of the image data is greater than the target data length, and the image data needs to be transmitted in a segmented manner, the image data can be split into a plurality of data segments, so that the data length of each data segment is smaller than or equal to the target data length, then the plurality of data segments are packaged into a plurality of target messages B, the identifiers ID in different target messages B are different, for each target message B, the importance level of the target message B is L2, the preset importance level of the optical fiber channel is L1, the preset importance level of the ethernet channel is L2, and the preset importance level of the 4G network channel is L4, so that the optical fiber channel and the ethernet channel are selected as target physical channels for transmitting the target message a, and the 4G network channel does not need to be selected.
Step S104, transmitting the target message to the communication equipment of the opposite terminal through M target physical channels.
In this embodiment, the communication device of the sending section may transmit the target packet to the communication device of the opposite end through the M target physical channels, so that when the communication device of the opposite end receives the target packet, it is determined whether the packet ID of the received target packet is different from the stored packet ID, if the packet ID of the target packet is different from the stored packet ID, the target packet is reserved, and if the packet ID of the target packet is the same as the stored packet ID, the target packet is discarded.
In some embodiments, in a case that the target physical channel includes at least one data forwarding node connected to a communication network implemented based on a distributed soft bus, if the data forwarding node receives the target packet, the data forwarding node transfers the target packet to a target device in the communication network when determining that a routing channel of a next hop of the target physical channel is not available, so that the target device transfers the target packet to a communication device of an opposite end, where the target device is a device capable of communicating with the communication device of the opposite end in the communication network. The device may be any one of a mobile phone, a camera, a tablet computer, a wearable device, a vehicle-mounted device, a notebook computer, a personal computer (personal computer, PC). By transmitting the target message to the target device in the communication network realized based on the distributed soft bus under the condition that the routing channel of the next hop of the data forwarding node is not communicated, the target message can be ensured to be transmitted to the communication device at the opposite end.
For example, as shown in fig. 2, the node involved in the target physical channel 10 includes a device a, a device B and a device C, where in the process that the device a sends the target message to the device B through the target physical channel 10, the device B is a data forwarding node, when the device B receives the target message, if a routing channel between the device B and the device C is not communicated, since the device B is in the communication network 20 implemented based on the distributed soft bus and the device E and the device C in the communication network 20 can communicate, the device B transfers the target message to the device E, and the device E transmits the target message to the device C.
For another example, as shown in fig. 3, when the device B receives the target message, if the routing channel between the device B and the device C is not open, since the device B is in the communication network 20 implemented based on the distributed soft bus, and the device E in the communication network 20 can communicate with the device C through the device F, the device B transfers the target message to the device E, the device E transfers the target message to the device F, and finally the device F transfers the target message to the device C.
In some embodiments, the data forwarding node determines whether the importance level of the target message is greater than a preset threshold value under the condition that it is determined that the routing channel of the next hop of the target physical channel is not enabled; transmitting the target message to target equipment in the communication network under the condition that the importance level of the target message is greater than or equal to a preset threshold value, so that the target equipment can transmit the target message to communication equipment at an opposite end; and discarding the target message under the condition that the importance level of the target message is smaller than a preset threshold value. Under the condition that a target physical channel fails or is blocked, a target message with the importance level larger than or equal to a preset threshold value is sent to target equipment in the communication network, so that the message with the high importance level can be transmitted to communication equipment at an opposite end, and timeliness and reliability of data transmission are improved.
According to the data transmission method provided by the embodiment, the data to be transmitted is packaged into the target message, the importance level of the target message is determined, then the priority of the data transmission of each physical channel in the plurality of physical channels supported by the communication equipment is obtained, and a plurality of target physical channels suitable for transmitting the target message are selected from the plurality of physical channels according to the importance level of the target message and the priority of the data transmission of each physical channel, so that the target message can be transmitted to the communication equipment at the opposite end through the plurality of target physical channels, the data to be transmitted carried by the target message can be timely and completely transmitted to the opposite end, and the timeliness and reliability of data transmission between the communication equipment are greatly improved.
Referring to fig. 4, fig. 4 is a schematic block diagram of a data transmission device according to an embodiment of the invention.
As shown in fig. 4, the data transmission apparatus 200 includes:
the message encapsulation module 210 is configured to encapsulate data to be transmitted into a target message;
a determining module 220, configured to determine a level of importance of the target packet, and obtain a priority of transmission data of each of the N physical channels;
A channel selection module 230, configured to select M physical channels from the N physical channels as target physical channels according to the importance level and the priority of the data transmitted by each physical channel, where M is less than or equal to N;
and the data transmission module 240 is configured to transmit the target message to a communication device of an opposite end through the M target physical channels, where when the communication device of the opposite end receives the target message, if a message ID of the target message is different from a stored message ID, the target message is reserved, and if not, the target message is discarded.
In an embodiment, the channel selection module 230 is further configured to:
for each physical channel, acquiring a preset importance level corresponding to the priority of the transmission data of the physical channel;
and determining the physical channel as a target physical channel under the condition that the importance level of the target message is greater than or equal to the preset importance level.
In one embodiment, the data transmission device 200 further includes:
the acquisition module is used for acquiring the channel parameters of each physical channel in the N physical channels at preset interval time;
And the priority adjustment module is used for adjusting the priority of the transmission data of each physical channel according to the channel parameter of each physical channel.
In an embodiment, the channel parameter includes a transmission rate and/or an error rate, and the priority adjustment module is further configured to:
determining the target priority of the transmission data of each physical channel according to the transmission rate and/or the error rate of each physical channel;
and adjusting the current priority of each physical channel to be the corresponding target priority.
In an embodiment, in a case that the target physical channel includes at least one data forwarding node connected to a communication network implemented based on a distributed soft bus, if the data forwarding node receives the target packet, the data forwarding node transmits the target packet to a target device in the communication network, where the target device transmits the target packet to a communication device of the opposite end, where the target device is capable of communicating with the communication device of the opposite end in the communication network, in a case that it is determined that a routing channel of a next hop of the target physical channel is not available.
In an embodiment, the packet encapsulation module 210 is further configured to:
acquiring a target data length, wherein the target data length is determined according to the configuration value of the corresponding Maximum Transmission Unit (MTU) of each physical channel;
acquiring the data length of the data to be transmitted, and determining whether the data length is smaller than or equal to the target data length;
under the condition that the data length is smaller than or equal to the target data length, packaging the data to be transmitted into a target message;
splitting the data to be transmitted into a plurality of data fragments under the condition that the data length is larger than the target data length, wherein the data length of the data fragments is smaller than or equal to the target data length;
and packaging the plurality of data fragments into a plurality of target messages, wherein one data fragment corresponds to one target message.
It should be noted that, for convenience and brevity of description, specific working processes of the above-described apparatus and each module and unit may refer to corresponding processes in the foregoing data transmission method embodiments, which are not described herein again.
The apparatus provided by the above embodiments may be implemented in the form of a computer program which may be run on a computer device as shown in fig. 5.
Referring to fig. 5, fig. 5 is a schematic block diagram of a communication device according to an embodiment of the present invention.
As shown in fig. 5, the communication apparatus 300 includes a processor 301, a memory 302, and a communication device 303, and the processor 301, the memory 302, and the communication device 303 are connected by a bus 304, such as an I2C (Inter-integrated Circuit) bus.
In particular, the processor 301 is configured to provide computing and control capabilities to support the operation of the overall communication device. The processor 301 may be a central processing unit (Central Processing Unit, CPU), the processor 301 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Specifically, the Memory 302 may be a Flash chip, a Read-Only Memory (ROM) disk, an optical disk, a U-disk, a removable hard disk, or the like. The communication device 303 supports N physical channels, N being an integer greater than or equal to 2.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of a portion of the structure associated with an embodiment of the present invention and is not limiting of the communication device to which an embodiment of the present invention is applied, and that a particular communication device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
The processor 301 is configured to execute a computer program stored in the memory 302, and implement any one of the data transmission methods provided by the embodiments of the present invention when the computer program is executed.
In an embodiment, the processor 301 is configured to execute a computer program stored in the memory 302, and when executing the computer program, implement the following steps:
packaging data to be transmitted into a target message;
determining the importance level of the target message, and acquiring the priority of each physical channel of the N physical channels for transmitting data;
Selecting M physical channels from the N physical channels as target physical channels according to the importance level and the priority of data transmission of each physical channel, wherein M is smaller than or equal to N;
and transmitting the target message to communication equipment of an opposite terminal through the M target physical channels, wherein when the communication equipment of the opposite terminal receives the target message, if the message ID of the target message is different from the stored message ID, the target message is reserved, and if not, the target message is discarded.
In one embodiment, the processor 301 is configured to, when implementing the selection of M physical channels from the N physical channels as the target physical channels according to the importance level and the priority of data transmission of each of the physical channels, implement:
for each physical channel, acquiring a preset importance level corresponding to the priority of the transmission data of the physical channel;
and determining the physical channel as a target physical channel under the condition that the importance level of the target message is greater than or equal to the preset importance level.
In an embodiment, the processor 301 is further configured to implement the following steps:
Acquiring channel parameters of each physical channel in the N physical channels at preset interval time;
and adjusting the priority of each physical channel for transmitting data according to the channel parameters of each physical channel.
In an embodiment, the channel parameters include a transmission rate and/or an error rate, and the processor 301 is configured to, when implementing the adjustment of the priority of the transmission data of each physical channel according to the channel parameter of each physical channel, implement:
determining the target priority of the transmission data of each physical channel according to the transmission rate and/or the error rate of each physical channel;
and adjusting the current priority of each physical channel to be the corresponding target priority.
In an embodiment, in a case that the target physical channel includes at least one data forwarding node connected to a communication network implemented based on a distributed soft bus, if the data forwarding node receives the target packet, the data forwarding node transmits the target packet to a target device in the communication network, where the target device transmits the target packet to a communication device of the opposite end, where the target device is capable of communicating with the communication device of the opposite end in the communication network, in a case that it is determined that a routing channel of a next hop of the target physical channel is not available.
In an embodiment, when implementing packaging the data to be transmitted into the target packet, the processor 301 is configured to implement:
acquiring a target data length, wherein the target data length is determined according to the configuration value of the corresponding Maximum Transmission Unit (MTU) of each physical channel;
acquiring the data length of the data to be transmitted, and determining whether the data length is smaller than or equal to the target data length;
under the condition that the data length is smaller than or equal to the target data length, packaging the data to be transmitted into a target message;
splitting the data to be transmitted into a plurality of data fragments under the condition that the data length is larger than the target data length, wherein the data length of the data fragments is smaller than or equal to the target data length;
and packaging the plurality of data fragments into a plurality of target messages, wherein one data fragment corresponds to one target message.
It should be noted that, for convenience and brevity of description, a person skilled in the art may clearly understand that, for the specific working process of the communication device described above, reference may be made to a corresponding process in the foregoing embodiment of the data transmission method, which is not described herein again.
The embodiment of the invention also provides a storage medium for computer readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement any one of the data transmission methods provided in the embodiment specification of the invention.
The storage medium may be an internal storage unit of the communication device according to the foregoing embodiment, for example, a hard disk or a memory of the communication device. The storage medium may also be an external storage device of the communication device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the communication device.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware embodiment, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
It should be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments. While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. A data transmission method, applied to a communication device, the communication device supporting N physical channels, N being an integer greater than or equal to 2, the method comprising:
packaging data to be transmitted into a target message;
determining the importance level of the target message, and acquiring the priority of each physical channel of the N physical channels for transmitting data;
selecting M physical channels from the N physical channels as target physical channels according to the importance level and the priority of data transmission of each physical channel, wherein M is smaller than or equal to N;
and transmitting the target message to communication equipment of an opposite terminal through the M target physical channels, wherein when the communication equipment of the opposite terminal receives the target message, if the message ID of the target message is different from the stored message ID, the target message is reserved, and if not, the target message is discarded.
2. The data transmission method according to claim 1, wherein said selecting M physical channels from the N physical channels as target physical channels according to the importance level and the priority of data transmission per physical channel comprises:
For each physical channel, acquiring a preset importance level corresponding to the priority of the transmission data of the physical channel;
and determining the physical channel as a target physical channel under the condition that the importance level of the target message is greater than or equal to the preset importance level.
3. The data transmission method according to claim 1, characterized in that the method further comprises:
acquiring channel parameters of each physical channel in the N physical channels at preset interval time;
and adjusting the priority of each physical channel for transmitting data according to the channel parameters of each physical channel.
4. A data transmission method according to claim 3, wherein said channel parameters include a transmission rate and/or an error rate, and said adjusting the priority of transmission data of each of said physical channels according to the channel parameters of each of said physical channels comprises:
determining the target priority of the transmission data of each physical channel according to the transmission rate and/or the error rate of each physical channel;
and adjusting the current priority of each physical channel to be the corresponding target priority.
5. The method according to claim 1, wherein in case the target physical channel includes at least one data forwarding node connected to a communication network implemented based on a distributed soft bus, if the data forwarding node receives the target packet, the data forwarding node transfers the target packet to a target device in the communication network for the target device to transfer the target packet to a communication device of the opposite end in case it is determined that a routing channel of a next hop of the target physical channel is not available, the target device being a device capable of communicating with the communication device of the opposite end in the communication network.
6. The method for data transmission according to any one of claims 1 to 5, wherein the encapsulating the data to be transmitted into the target message includes:
acquiring a target data length, wherein the target data length is determined according to the configuration value of the corresponding Maximum Transmission Unit (MTU) of each physical channel;
acquiring the data length of the data to be transmitted, and determining whether the data length is smaller than or equal to the target data length;
And under the condition that the data length is smaller than or equal to the target data length, packaging the data to be transmitted into a target message.
7. The data transmission method according to claim 6, wherein after determining whether the data length is less than or equal to the target data length, further comprising:
splitting the data to be transmitted into a plurality of data fragments under the condition that the data length is larger than the target data length, wherein the data length of the data fragments is smaller than or equal to the target data length;
and packaging the plurality of data fragments into a plurality of target messages, wherein one data fragment corresponds to one target message.
8. A data transmission apparatus, characterized by being applied to a communication device that supports N physical channels, N being an integer greater than or equal to 2, comprising:
the message packaging module is used for packaging the data to be transmitted into a target message;
the determining module is used for determining the importance level of the target message and acquiring the priority of the transmission data of each physical channel in the N physical channels;
a channel selection module, configured to select M physical channels from the N physical channels as target physical channels according to the importance level and the priority of data transmitted by each physical channel, where M is smaller than or equal to N;
And the data transmission module is used for transmitting the target message to communication equipment of an opposite terminal through the M target physical channels, wherein when the communication equipment of the opposite terminal receives the target message, if the message ID of the target message is different from the stored message ID, the target message is reserved, and if not, the target message is discarded.
9. A communication device, characterized in that the communication device comprises communication means, a processor, a memory, a computer program stored on the memory and executable by the processor, and a data bus for enabling a connection communication between the communication means, the processor and the memory, the communication means supporting N physical channels, N being an integer greater than or equal to 2, wherein the computer program, when executed by the processor, implements the data transmission method according to any of claims 1 to 7.
10. A storage medium for computer-readable storage, wherein the storage medium stores one or more programs executable by one or more processors to implement the data transmission method of any of claims 1-7.
CN202310293458.XA 2023-03-24 2023-03-24 Data transmission method, device, communication equipment and storage medium Pending CN116033585A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310293458.XA CN116033585A (en) 2023-03-24 2023-03-24 Data transmission method, device, communication equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310293458.XA CN116033585A (en) 2023-03-24 2023-03-24 Data transmission method, device, communication equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116033585A true CN116033585A (en) 2023-04-28

Family

ID=86070925

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310293458.XA Pending CN116033585A (en) 2023-03-24 2023-03-24 Data transmission method, device, communication equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116033585A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117858156A (en) * 2024-03-08 2024-04-09 国网山东省电力公司枣庄供电公司 Unmanned automatic material receiving information processing device and method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1606850A (en) * 2001-03-12 2005-04-13 光网络公司 Bandwidth reservation reuse in dynamically allocated ring protection and restoration technique
CN1773952A (en) * 2004-11-10 2006-05-17 华为技术有限公司 Bandwidth gurantee method for communication equipment or high-priority messaging during network at fault
WO2011058274A1 (en) * 2009-11-12 2011-05-19 France Telecom Method for selecting at least one transmission channel, corresponding access point and corresponding computer program
CN110913026A (en) * 2019-12-31 2020-03-24 奇安信科技集团股份有限公司 Message transmission method, device, electronic equipment and medium
CN113206875A (en) * 2021-04-27 2021-08-03 深圳市晨北科技有限公司 Data transmission method, device and storage medium
CN115835290A (en) * 2022-12-29 2023-03-21 深信服科技股份有限公司 Message transmission method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1606850A (en) * 2001-03-12 2005-04-13 光网络公司 Bandwidth reservation reuse in dynamically allocated ring protection and restoration technique
CN1773952A (en) * 2004-11-10 2006-05-17 华为技术有限公司 Bandwidth gurantee method for communication equipment or high-priority messaging during network at fault
WO2011058274A1 (en) * 2009-11-12 2011-05-19 France Telecom Method for selecting at least one transmission channel, corresponding access point and corresponding computer program
CN110913026A (en) * 2019-12-31 2020-03-24 奇安信科技集团股份有限公司 Message transmission method, device, electronic equipment and medium
CN113206875A (en) * 2021-04-27 2021-08-03 深圳市晨北科技有限公司 Data transmission method, device and storage medium
CN115835290A (en) * 2022-12-29 2023-03-21 深信服科技股份有限公司 Message transmission method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘显志;李向丽;邱保志;: "基于优先级的MPLS重路由转发机制", 微电子学与计算机, no. 03 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117858156A (en) * 2024-03-08 2024-04-09 国网山东省电力公司枣庄供电公司 Unmanned automatic material receiving information processing device and method
CN117858156B (en) * 2024-03-08 2024-05-10 国网山东省电力公司枣庄供电公司 Unmanned automatic material receiving information processing device and method

Similar Documents

Publication Publication Date Title
KR102230580B1 (en) Method, apparatus, and communication system for transmitting service flow based on flexible Ethernet
JP2017212725A5 (en)
CN111225429B (en) SSID (service set identifier) acquisition method, device, equipment and system of router
CN112039796B (en) Data packet transmission method and device, storage medium and electronic equipment
US10355971B2 (en) System and method for data path validation and verification
US9014156B2 (en) Traffic forwarding in mesh networks
US20180041432A1 (en) Data transmission in a communications network
US10916106B2 (en) Systems and methods for efficient utilization of wireless bandwidth
US9094871B2 (en) Traffic management gateway for machine-to-machine network
US10666457B2 (en) Relay device
CN116033585A (en) Data transmission method, device, communication equipment and storage medium
CN112788060A (en) Data packet transmission method and device, storage medium and electronic equipment
CN110691139B (en) Data transmission method, device, equipment and storage medium
CN116016725B (en) Information transmission method, computer device and storage medium
CN111740922B (en) Data transmission method, device, electronic equipment and medium
CN108696455B (en) Method and device for processing service flow
US11245549B2 (en) Bus system, subscriber station therefor, and method for configuring a static bus system for a dynamic communication
CN111181848B (en) Network fragmentation method, system, router and storage medium
CN116781574A (en) In-band network telemetry method, in-band network telemetry device, in-band network telemetry equipment and storage medium
CN112838992A (en) Message scheduling method and network equipment
CN108243485B (en) Time division multiple access channel access method and device in wireless sensor network
CN106571865B (en) Telemetry data access transmission method of satellite constellation
CN114157455A (en) Data transmission method, device, equipment and storage medium
US11323375B2 (en) Communication device, communication method, and computer readable medium
EP1758306A1 (en) The method and the device for transmitting the control signal of the resilient packet ring media access control

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20230428