CN116961696A - Dual-mode module communication method and device, electronic equipment and storage medium - Google Patents

Dual-mode module communication method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116961696A
CN116961696A CN202310807457.2A CN202310807457A CN116961696A CN 116961696 A CN116961696 A CN 116961696A CN 202310807457 A CN202310807457 A CN 202310807457A CN 116961696 A CN116961696 A CN 116961696A
Authority
CN
China
Prior art keywords
channel
data units
dual
data
target data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310807457.2A
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.)
State Grid Corp of China SGCC
Marketing Service Center of State Grid Hebei Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Marketing Service Center of State Grid Hebei Electric Power 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 State Grid Corp of China SGCC, Marketing Service Center of State Grid Hebei Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202310807457.2A priority Critical patent/CN116961696A/en
Publication of CN116961696A publication Critical patent/CN116961696A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • H04B3/544Setting up communications; Call and signalling arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The invention provides a dual-mode module communication method, a dual-mode module communication device, electronic equipment and a storage medium. The method comprises the following steps: the primary and backup channels of the dual mode module are determined. Based on the communication rates of the main channel and the standby channel, dividing n data units arranged according to a preset sequence in a target data packet into a first part and a second part. The transmitting step is performed. And if m is greater than or equal to the number of the data units in the second part, taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step. According to the dual-channel data transmission method, on one hand, the data packet is subjected to dual-channel decomposition transmission according to the dual-channel data transmission speed, so that the advantages of dual-mode communication are fully exerted, the data packet transmission time can be reduced, and the data transmission efficiency is improved. On the other hand, the complete transmission is ensured by dividing the data packets in real time, and the receiving terminal can carry out packet grouping, so that the data transmission speed is increased on the premise of not increasing the packet loss quantity.

Description

Dual-mode module communication method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of power communication technologies, and in particular, to a dual-mode module communication method, device, electronic apparatus, and storage medium.
Background
In the field of power communication, an intelligent ammeter or other intelligent electric equipment can communicate with a host terminal through a dual-mode module. The dual mode module supports a wireless communication mode and a power carrier wired communication mode. In practical application, a communication mode with higher efficiency and faster communication rate is adopted. At present, after detecting the communication rates of a wireless channel and a wired channel, a channel with better communication performance is used as a communication channel to transmit a power data packet.
However, in the single-channel communication mode after detecting the communication rate, on one hand, channel resources are wasted, on the other hand, the communication speed is affected by the channel, and the communication speed is continuously changed, so that the advantages of dual-mode communication cannot be fully exerted. Therefore, the existing single-mode communication mode for selecting the optimal channel communication has lower data transmission efficiency.
Disclosure of Invention
The embodiment of the invention provides a dual-mode module communication method, a dual-mode module communication device, electronic equipment and a storage medium, which are used for solving the problem that the data transmission efficiency of the existing single-mode communication mode for selecting optimal channel communication is low.
In a first aspect, an embodiment of the present invention provides a dual-mode module communication method, including: and determining a main channel and a standby channel of the dual-mode module, wherein the communication rate of the main channel is larger than that of the standby channel. Based on the communication rates of the main channel and the standby channel, dividing n data units arranged according to a preset sequence in a target data packet into a first part and a second part. And executing a transmission step, wherein the transmission step comprises the steps of transmitting the data units in the first part through a main channel positive sequence, simultaneously transmitting n data units of a target data packet through a standby channel reverse sequence, and acquiring the number of the data units transmitted by the standby channel when the main channel finishes transmitting the first part, and marking the number as m. And if m is greater than or equal to the number of the data units in the second part, taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step.
In one possible implementation manner, if m is greater than or equal to the number of data units in the second portion, the next group of data packets is taken as a target data packet, the target data packet is divided into a first portion and a second portion according to a preset sequence based on m, and the performing the transmitting step includes: and if m is greater than or equal to the number of the data units in the second part and m is not greater than n/2, taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step. And if m is greater than or equal to the number of the data units in the second part and m is greater than n/2, exchanging the main channel with the standby channel. Dividing the target data packet into a first part and a second part according to a preset sequence based on m, and executing a transmission step based on the exchanged main channel and standby channel.
In one possible implementation manner, if m is greater than or equal to the number of data units in the second portion and m is greater than n/2, exchanging the primary channel with the backup channel includes: and if m is greater than or equal to the number of the data units in the second part and m is greater than the number of the data units in the first part, exchanging the main channel with the standby channel.
In one possible implementation manner, the dividing the n data units in the target data packet according to the preset sequence into the first portion and the second portion based on the communication rates of the main channel and the standby channel includes: and transmitting the test data packet through the main channel positive sequence and simultaneously transmitting the test data packet through the standby channel negative sequence, wherein the test data packet comprises n data units arranged according to a preset sequence. And when the main channel finishes transmitting the test data packet, acquiring the number of data units transmitted by the standby channel. Dividing n data units arranged according to a preset sequence in the target data packet into a first part and a second part based on the total number of data units in the test data packet and the number of data units sent by the standby channel.
In a possible implementation manner, after the performing the transmitting step, the method further includes: and if m is smaller than the number of the data units in the second part, sending the data units which are not sent in the second part through the main channel in the positive sequence, and sending the data units which are not sent in the second part through the standby channel in the reverse sequence until the sum of the numbers of the data units sent by the main channel and the standby channel is n. When the sum of the number of data units transmitted by the main channel and the spare channel is n, the total number of data units transmitted by the spare channel is taken as m. And taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step.
In one possible implementation, the dual mode module includes a wireless channel and a wired channel. The determining the main channel and the standby channel of the dual-mode module comprises: and transmitting communication frames through the wireless channel and the wired channel respectively, and obtaining the communication rates of the wireless channel and the wired channel. The channel with the larger communication rate of the wireless channel and the wired channel is determined as the main channel. And determining the channel with smaller communication rate from the wireless channel and the wired channel as the standby channel.
In a second aspect, an embodiment of the present invention provides a dual-mode module communication device, including: and the determining module is used for determining a main channel and a standby channel of the dual-mode module, wherein the communication rate of the main channel is greater than that of the standby channel. The dividing module is used for dividing n data units arranged according to a preset sequence in the target data packet into a first part and a second part based on the communication rates of the main channel and the standby channel. And the transmission module is used for executing the transmission step, wherein the transmission step comprises the steps of sending the data units in the first part through the positive sequence of the main channel, simultaneously sending n data units of the target data packet through the reverse sequence of the standby channel, and acquiring the number of the data units sent by the standby channel when the main channel finishes sending the first part, and marking the number as m. And the circulation module is used for taking the next group of data packets as target data packets if m is greater than or equal to the number of the data units in the second part, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step.
In one possible implementation manner, if m is greater than or equal to the number of data units in the second portion, the next group of data packets is taken as a target data packet, the target data packet is divided into a first portion and a second portion according to a preset sequence based on m, and the transmitting step includes: and if m is greater than or equal to the number of the data units in the second part and m is not greater than n/2, taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step. And if m is greater than or equal to the number of the data units in the second part and m is greater than n/2, exchanging the main channel with the standby channel. Dividing the target data packet into a first part and a second part according to a preset sequence based on m, and executing a transmission step based on the exchanged main channel and standby channel.
In a third aspect, an embodiment of the present invention provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to the first aspect or any one of the possible implementations of the first aspect, when the computer program is executed by the processor.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method as described above in the first aspect or any one of the possible implementations of the first aspect.
The embodiment of the invention provides a dual-mode module communication method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: and determining a main channel and a standby channel of the dual-mode module, wherein the communication rate of the main channel is larger than that of the standby channel. Based on the communication rates of the main channel and the standby channel, dividing n data units arranged according to a preset sequence in a target data packet into a first part and a second part. And executing a transmission step, wherein the transmission step comprises the steps of transmitting the data units in the first part through the positive sequence of the main channel, simultaneously transmitting n data units of the target data packet through the negative sequence of the standby channel, and acquiring the number of the data units transmitted by the standby channel when the main channel finishes transmitting the first part, and recording the number as m. And if m is greater than or equal to the number of the data units in the second part, taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step. The invention divides the target data packet and the double channels to be transmitted respectively through the communication rate of the main channel and the standby channel, and then divides a group of data packets again according to the result of the double channel transmission, and then the double channels to be transmitted respectively. On the one hand, according to the dual-channel data transmission speed, the data packet is subjected to dual-channel decomposition transmission, so that the advantages of dual-mode communication are fully exerted, the data packet transmission time can be reduced, and the data transmission efficiency is improved. On the other hand, through dividing the data packet in real time, ensure complete transmission, can carry out the group package by receiving terminal, under the prerequisite that does not increase the packet loss quantity to thereby accelerate data transmission speed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is an application scenario diagram of a dual-mode module communication method provided by an embodiment of the present invention;
FIG. 2 is a flow chart of an implementation of a dual-mode module communication method provided by an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a dual-module communication device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the following description will be made by way of specific embodiments with reference to the accompanying drawings.
Fig. 1 is an application scenario diagram of a dual-mode module communication method according to an embodiment of the present invention. As shown in fig. 1, the embodiment of the invention can be applied to various application scenarios, such as power communication between an intelligent ammeter and a host, and power communication between an intelligent ammeter and an intelligent ammeter. These scenarios involve the transmission of power data. The specific application scenario is not limited herein. For example, in one application scenario, the smart power meter sends power data to the communication host. The intelligent ammeter and the communication host comprise dual-mode modules. The dual mode module supports a wireless communication mode and a power carrier wired communication mode.
At present, after detecting the communication rates of a wireless channel and a wired channel, a channel with better communication performance is used as a communication channel to transmit a power data packet.
However, in the single-mode communication mode after detecting the communication rate, on one hand, channel resources are wasted, on the other hand, the communication speed is affected by the channel, and the communication speed is continuously changed, so that the advantages of the dual-mode communication cannot be fully exerted. Therefore, the existing single-mode communication mode for selecting the optimal channel communication has lower data transmission efficiency.
The embodiment of the invention provides a communication method, a device, electronic equipment and a storage medium of a dual-mode module, which can be applied to the dual-mode module to solve the problem of low data transmission efficiency of the existing single-mode communication mode for selecting optimal channel communication by splitting data packets in real time and respectively transmitting the data packets through a main channel and a standby channel.
Fig. 2 is a flowchart of an implementation of a dual-mode module communication method according to an embodiment of the present invention, and details are as follows with reference to fig. 2:
in step 201, a primary channel and a backup channel of the dual mode module are determined, wherein the communication rate of the primary channel is greater than the backup channel.
Illustratively, the communication rate indicates how fast or slow the channel is transmitting data.
In some embodiments, the dual mode module includes a wireless channel and a wired channel. The communication rate of the two channels of the dual mode module is not constant, subject to changes in the communication environment.
In some embodiments, the communication rates of two channels of a dual mode module are obtained. The channel with larger communication rate is used as a main channel, and the channel with smaller communication rate is used as a standby channel.
In some embodiments, according to the existing channel rate detection mode, a communication frame is sent, channel rate detection is performed, it is determined that the channel is preferentially used as wired or wireless, and the channel with better channel performance is used as a main channel, and the other channel is used as a standby channel.
In step 202, n data units in the target data packet, which are arranged according to a preset sequence, are divided into a first portion and a second portion based on the communication rates of the main channel and the backup channel.
In one possible implementation, the implementation of step 202 may be: and acquiring the communication rates of the main channel and the standby channel which are obtained in advance. The ratio of the communication rates of the main channel and the backup channel is calculated. Based on the ratio of the communication rates of the main channel and the standby channel, dividing n data units arranged according to a preset sequence in the target data packet into a first part and a second part.
Illustratively, the ratio of the communication rates of the primary channel and the backup channel is equal to the ratio of the numbers of data units of the first portion and the second portion.
For example, the target packet includes 10 data units. The ratio of the communication rates of the main channel and the standby channel is 8:2, and the divided first part comprises 8 data units and the second part comprises 2 data units.
In one possible implementation manner, based on the communication rates of the main channel and the backup channel, dividing n data units in the target data packet, which are arranged according to a preset sequence, into a first portion and a second portion includes: and transmitting the test data packet through the main channel positive sequence and simultaneously transmitting the test data packet through the standby channel negative sequence, wherein the test data packet comprises n data units arranged according to a preset sequence. And when the main channel finishes transmitting the test data packet, acquiring the number of data units transmitted by the standby channel. Dividing n data units arranged according to a preset sequence in a target data packet into a first part and a second part based on the total number of data units in the test data packet and the number of data units sent by a standby channel.
In some embodiments, 10 data units are included in the test data packet. The data units are arranged according to a preset sequence. For example, each data unit may be numbered sequentially from 1 to 10. For another example, the predetermined order may be an order of data combination.
In some embodiments, the test data packets are sent in positive sequence through the main channel, i.e., each data unit may be sent in sequence from small to large in number. For example, 1, 2, 3 … … 10.
In some embodiments, the test data packets are sent in reverse order through the backup channel at the same time, i.e. when the primary channel is sent, each data unit may be sent sequentially from the large number to the small number at the same time. For example, 10, 9, 8, … ….
In some embodiments, when the primary channel completes transmitting the test data packet, the number of data units transmitted by the backup channel is obtained and may be denoted as m1. For example, when the main channel finishes transmitting the 10 th data unit of the end from the small number to the large number, the number of the data units sequentially transmitted by the standby channel from the large number to the small number is obtained. For example, the backup channel has sent 2 data units, m1 being 2.
In some embodiments, dividing the n data units arranged in the predetermined order in the target data packet into the first portion and the second portion based on the total number of data units in the test data packet and the number of data units sent by the backup channel includes: dividing n data units arranged in a preset sequence in a target data packet into a first part and a second part according to the proportion of (n-m 1) m1, wherein n represents the total number of the data units in the test data packet.
For example, m1 is 2, dividing 10 data units in the target data packet into 8 data units numbered 1-8 in a first portion and 2 data units numbered 9, 10 in a second portion.
In some embodiments, if m1 is equal to n, then the process jumps to step 201, where the primary and backup channels of the dual mode module are redetermined.
Illustratively, if m1 equals n, the backup channel has also completely transmitted the test packet after the primary channel has completely transmitted the test packet. The speed relationship of the main channel and the standby channel can not be judged at the moment. The process jumps to step 201, the primary channel and the backup channel of the dual-mode module are redetermined, wherein the communication rate of the primary channel is greater than that of the backup channel.
In some embodiments, the data unit of the first portion is for transmission over a primary channel. The data units of the second portion are for transmission over the backup channel.
In step 203, a transmission step is performed, where the transmission step includes sending data units in the first portion in positive sequence through the main channel, and simultaneously sending n data units of the target data packet in reverse sequence through the backup channel, and when the main channel finishes sending the first portion, the number of data units sent by the backup channel is obtained and recorded as m.
In some embodiments, the target data packet includes 10 data units therein. The data units are arranged according to a preset sequence. For example, each data unit may be numbered sequentially from 1 to 10.
In some embodiments, the data units in the first portion are sent in positive sequence through the primary channel, i.e., the data units are sent sequentially from smaller to larger in number. For example 1, 2, 3 … …, 8.
In some embodiments, n data units of the target data packet are sent in reverse order through the backup channel at the same time, that is, when the backup channel is sent, each data unit may be sent sequentially from large to small according to the number at the same time. For example 10, 9, … ….
In some embodiments, when the primary channel completes transmitting the first portion, the primary channel and the backup channel stop transmitting data, and the number of data units transmitted by the backup channel is obtained. For example, the first portion includes 8 data units and the second portion includes 2 data units. When the main channel transmits the first part, the standby channel continuously transmits the whole target data packet in reverse order. After the primary channel finishes transmitting 8 data units of the first part, the number of the data units transmitted by the standby channel is acquired.
In some embodiments, the integrity of the transmitted data may be determined after the transmitting step. For example, the transmitted data units may be combined at the receiving end to determine whether the transmitted data units may be completely formed into the target data packet.
Under the condition that the accuracy of the data packet is required to be ensured, after the data packet is completely transmitted, the data packet is assembled and analyzed through the receiving end, and the original main and standby channels can be reselected according to whether the high stability is achieved or not, and the transmission of other data packets is continuously completed according to the sequence. The receiving end can combine the part transmitted by the main channel and the part transmitted by the standby channel to form a data packet backup for comparison with the analyzed data packet group.
In step 204, if m is greater than or equal to the number of data units in the second portion, the next group of data packets is used as the target data packet, the target data packet is divided into a first portion and a second portion according to a preset sequence based on m, and the transmission step is performed.
In some embodiments, if m is greater than or equal to the number of data units in the second portion, the data units sent by the primary channel and the backup channel may completely form the target data packet.
In some embodiments, the dual mode module may need to send multiple data packets in sequence. When the target packet is completely transmitted, the next packet in the transmission queue may be used as the target packet, and the transmission step is performed again, i.e. step 203.
In some embodiments, dividing the target data packet into a first portion and a second portion in a preset order based on m comprises: dividing n data units arranged in a preset sequence in a target data packet into a first part and a second part according to the proportion of (n-m): m.
After the last group of transmission is finished, the corresponding m value of the last group is obtained, namely the number of data units which are already transmitted by the standby channel when the last group of data packets are transmitted. The dividing ratio is redetermined based on the m value of the previous group, and the next group of data packets is divided. Real-time division is realized.
According to the embodiment of the invention, the target data packet is divided by the communication rate of the main channel and the standby channel, the double channels are respectively transmitted, and then a group of data packets are divided again according to the result of the double channel transmission, and the double channels are respectively transmitted. On the one hand, according to the dual-channel data transmission speed, the data packet is subjected to dual-channel decomposition transmission, so that the advantages of dual-mode communication are fully exerted, the data packet transmission time can be reduced, and the data transmission efficiency is improved. On the other hand, through dividing the data packet in real time, ensure complete transmission, can carry out the group package by receiving terminal, under the prerequisite that does not increase the packet loss quantity to thereby accelerate data transmission speed.
According to the dynamic communication channel data packet transmission scheme, according to the data transmission speed, the data packets are decomposed and transmitted by utilizing the pareto to optimize a group of data packets, and the terminal can group the data packets, so that the data transmission speed is increased on the premise of not increasing the packet loss quantity. In the high-speed and high-throughput mode, the data packet transmission time can be reduced, the data transmission efficiency can be increased, the advantages of dual-mode communication can be fully exerted, and in the high-reliability mode, the aim of increasing the channel reliability can be fulfilled by utilizing dual channels while the speed is increased. Through the pareto optimization, the data packet group is distributed, the data packet transmission of the original time consumption n is finally realized, the data packet transmission is reduced to m (m is more than n/2), the short-time data throughput and the data transmission efficiency can be increased, the wired and wireless directions are fully utilized, and the dual-mode transmission efficiency is optimized.
The communication rate of the primary channel is typically determined to be greater than the communication rate of the backup channel and to maintain a size relationship for a period of time. But the communication rate is changing as the communication environment changes.
In one possible implementation manner, if m is greater than or equal to the number of data units in the second portion, the next group of data packets is taken as a target data packet, the target data packet is divided into a first portion and a second portion according to a preset sequence based on m, and the performing the transmitting step includes: and if m is greater than or equal to the number of the data units in the second part and m is not greater than n/2, taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step. And if m is greater than or equal to the number of the data units in the second part and m is greater than n/2, exchanging the main channel with the standby channel. Dividing the target data packet into a first part and a second part according to a preset sequence based on m, and executing a transmission step based on the exchanged main channel and standby channel.
In some embodiments, if m is greater than or equal to the number of data units in the second portion, and m is greater than n/2, this indicates that the communication rate of the backup channel is increased from the initial time (i.e., at step 201). At this time, the communication rates of the main channel and the standby channel are close, and the complete transmission of the target data packet can be ensured before and after the switching of the main channel and the standby channel. Ensuring the stability of the transmission.
The embodiment of the invention judges the relation between the data units transmitted by the backup channels and the total data unit number based on the transmission condition of the previous group of data packets so as to switch the main and backup channels in real time, ensure that the main channel adopts the channel with better stability and faster transmission speed, and ensure the stability of data transmission.
In one possible implementation, if m is greater than or equal to the number of data units in the second portion, and m is greater than n/2, exchanging the primary channel with the backup channel includes: and if m is greater than or equal to the number of the data units in the second part and m is greater than the number of the data units in the first part, exchanging the main channel with the standby channel.
In some embodiments, if m is greater than or equal to the number of data units in the second portion, and m is greater than n/2, and m is greater than the number of data units in the first portion, this indicates that the transmission rate of the backup channel is significantly greater than that of the primary channel. At this time, the main channel and the standby channel are exchanged, so that the channel with better stability and faster transmission speed can be used as the main channel, and the stability of data transmission can be ensured.
If the rate of the backup channel decreases when the primary channel transmits the target packet, the backup channel may not transmit the second portion when the primary channel completes transmitting the first portion.
In one possible implementation, after performing the transmitting step, the method further includes: and if m is smaller than the number of the data units in the second part, sending the data units which are not sent in the second part through the main channel in the positive sequence, and sending the data units which are not sent in the second part through the standby channel in the reverse sequence until the sum of the numbers of the data units sent by the main channel and the standby channel is n. When the sum of the number of data units transmitted by the main channel and the spare channel is n, the total number of data units transmitted by the spare channel is taken as m. And taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step.
In the embodiment of the invention, after the transmission step, the number of m and the second part of data units is judged, and when m is smaller than the number of the second part of data units, the main and standby channels continue to be transmitted until the transmission is completed. And the m value in complete transmission is used as the dividing basis of the next group of data. The integrity and stability of the data transmission is ensured.
In some embodiments, if m is 0, the process jumps to step 201, where the primary channel and the backup channel of the dual-mode module are redetermined, where the communication rate of the primary channel is greater than the backup channel.
In some embodiments, if m is 0, the standby channel may be stopped for a certain period (e.g., 5 minutes), and the main channel may be used alone. And then jumps to step 201.
In one possible implementation, the dual mode module includes a wireless channel and a wired channel. Determining the primary and backup channels of the dual mode module includes: and transmitting communication frames through the wireless channel and the wired channel respectively, and obtaining the communication rates of the wireless channel and the wired channel. The channel with the larger communication rate of the wireless channel and the wired channel is determined as the main channel. And determining the channel with smaller communication rate from the wireless channel and the wired channel as the standby channel.
The dual-mode communication method provided by the invention carries out data packet distribution according to the transmission speed of the previous data packet, continuously optimizes the data packet distribution proportion by utilizing pareto optimization, reduces the transmission time of the main data packet, ensures the data accuracy through forward and backward bidirectional transmission, is convenient for supplementing the lost data packet in a mode of reducing the transmission efficiency, and reduces the packet loss risk in the transmission process.
The dual mode communication method provided by the invention can select whether to have high reliability or high speed. In the high-speed and high-throughput mode, the data packet transmission time can be reduced, the data transmission efficiency can be increased, the advantages of dual-mode communication can be fully exerted, and in the high-reliability mode, the aim of increasing the channel reliability can be fulfilled by utilizing dual channels while the speed is increased.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
The following are device embodiments of the invention, for details not described in detail therein, reference may be made to the corresponding method embodiments described above.
Fig. 3 is a schematic structural diagram of a dual-module communication device according to an embodiment of the present invention, and for convenience of explanation, only a portion related to the embodiment of the present invention is shown, which is described in detail below:
referring to fig. 3, a dual-module communication apparatus 3 includes:
the determining module 31 is configured to determine a primary channel and a backup channel of the dual-mode module, where a communication rate of the primary channel is greater than that of the backup channel.
The dividing module 32 is configured to divide n data units in the target data packet, which are arranged according to a preset sequence, into a first portion and a second portion based on communication rates of the main channel and the backup channel.
And a transmission module 33, configured to perform a transmission step, where the transmission step includes sending the data units in the first portion in the positive sequence through the main channel, and sending the n data units of the target data packet in the negative sequence through the backup channel, and when the main channel finishes sending the first portion, obtaining the number of the data units sent by the backup channel, and recording as m.
And a circulation module 34, configured to divide the next group of data packets into a first portion and a second portion according to a preset sequence based on m, and perform the transmission step, if m is greater than or equal to the number of data units in the second portion, and the next group of data packets is used as the target data packets.
According to the embodiment of the invention, the target data packet is divided by the communication rate of the main channel and the standby channel, the double channels are respectively transmitted, and then a group of data packets are divided again according to the result of the double channel transmission, and the double channels are respectively transmitted. On the one hand, according to the dual-channel data transmission speed, the data packet is subjected to dual-channel decomposition transmission, so that the advantages of dual-mode communication are fully exerted, the data packet transmission time can be reduced, and the data transmission efficiency is improved. On the other hand, through dividing the data packet in real time, ensure complete transmission, can carry out the group package by receiving terminal, under the prerequisite that does not increase the packet loss quantity to thereby accelerate data transmission speed.
In one possible implementation manner, if m is greater than or equal to the number of data units in the second portion, the next group of data packets is taken as a target data packet, the target data packet is divided into a first portion and a second portion according to a preset sequence based on m, and the performing the transmitting step includes:
And if m is greater than or equal to the number of the data units in the second part and m is not greater than n/2, taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step.
And if m is greater than or equal to the number of the data units in the second part and m is greater than n/2, exchanging the main channel with the standby channel.
Dividing the target data packet into a first part and a second part according to a preset sequence based on m, and executing a transmission step based on the exchanged main channel and standby channel.
Fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42 stored in the memory 41 and executable on the processor 40. The steps of the respective dual-module communication method embodiments described above, such as steps 201 through 204 shown in fig. 2, are implemented when the processor 40 executes the computer program 42. Alternatively, the processor 40, when executing the computer program 42, performs the functions of the modules/units of the apparatus embodiments described above, such as the functions of the modules 31-34 shown in fig. 3.
Illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to complete the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used to describe the execution of the computer program 42 in the electronic device 4. For example, the computer program 42 may be split into the modules 31 to 34 shown in fig. 3.
The electronic device 4 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The electronic device 4 may include, but is not limited to, a processor 40, a memory 41. It will be appreciated by those skilled in the art that fig. 4 is merely an example of the electronic device 4 and is not meant to be limiting of the electronic device 4, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the electronic device may further include an input-output device, a network access device, a bus, etc.
The processor 40 may be a central processing unit (Central Processing Unit, CPU), 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. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the electronic device 4, such as a hard disk or a memory of the electronic device 4. The memory 41 may be an external storage device of the electronic device 4, 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 electronic device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 41 is used for storing the computer program and other programs and data required by the electronic device. The memory 41 may also be used for temporarily storing data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. For example, the apparatus/electronic device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of the communication method embodiments of each dual mode module described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (10)

1. A method of dual-mode module communication, the method comprising:
determining a main channel and a standby channel of the dual-mode module, wherein the communication rate of the main channel is greater than that of the standby channel;
dividing n data units arranged according to a preset sequence in a target data packet into a first part and a second part based on the communication rates of a main channel and a standby channel;
executing a transmission step, wherein the transmission step comprises the steps of transmitting data units in a first part through a main channel positive sequence, simultaneously transmitting n data units of a target data packet through a standby channel reverse sequence, and acquiring the number of the data units transmitted by the standby channel as m when the main channel finishes transmitting the first part;
And if m is greater than or equal to the number of the data units in the second part, taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step.
2. The method for dual-mode module communication according to claim 1, wherein if m is greater than or equal to the number of data units in the second portion, the next group of data packets is taken as a target data packet, the target data packet is divided into a first portion and a second portion according to a preset sequence based on m, and the performing the transmitting step includes:
if m is greater than or equal to the number of the data units in the second part and m is not greater than n/2, taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing a transmission step;
if m is greater than or equal to the number of the data units in the second part and m is greater than n/2, exchanging the main channel with the standby channel;
dividing the target data packet into a first part and a second part according to a preset sequence based on m, and executing a transmission step based on the exchanged main channel and standby channel.
3. The method according to claim 2, wherein if m is greater than or equal to the number of data units in the second portion and m is greater than n/2, exchanging the primary channel with the backup channel comprises:
And if m is greater than or equal to the number of the data units in the second part and m is greater than the number of the data units in the first part, exchanging the main channel with the standby channel.
4. The method according to claim 1, wherein dividing the n data units arranged in the predetermined order in the target data packet into the first portion and the second portion based on the communication rates of the main channel and the backup channel comprises:
transmitting a test data packet through a main channel positive sequence and transmitting a test data packet through a standby channel negative sequence, wherein the test data packet comprises n data units arranged according to a preset sequence;
when the main channel finishes transmitting the test data packet, acquiring the number of data units transmitted by the standby channel;
dividing n data units arranged according to a preset sequence in the target data packet into a first part and a second part based on the total number of data units in the test data packet and the number of data units sent by the standby channel.
5. The dual-mode module communication method of claim 1, further comprising, after said performing the transmitting step:
if m is smaller than the number of the data units in the second part, sending the data units which are not sent in the second part through the main channel in a positive sequence, and sending the data units which are not sent in the second part through the standby channel in a reverse sequence until the sum of the numbers of the data units sent by the main channel and the standby channel is n;
When the sum of the data unit numbers transmitted by the main channel and the standby channel is n, taking the total transmitted data unit number of the standby channel as m;
and taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step.
6. The dual-mode module communication method of claim 1, wherein the dual-mode module comprises a wireless channel and a wired channel; the determining the main channel and the standby channel of the dual-mode module comprises:
transmitting communication frames through a wireless channel and a wired channel respectively, and obtaining communication rates of the wireless channel and the wired channel;
determining the channel with larger communication rate in the wireless channel and the wired channel as a main channel;
and determining the channel with smaller communication rate from the wireless channel and the wired channel as the standby channel.
7. A dual-mode module communication device, comprising:
the determining module is used for determining a main channel and a standby channel of the dual-mode module, wherein the communication rate of the main channel is greater than that of the standby channel;
the dividing module is used for dividing n data units arranged according to a preset sequence in the target data packet into a first part and a second part based on the communication rates of the main channel and the standby channel;
A transmission module, configured to perform a transmission step, where the transmission step includes sending data units in a first portion through a main channel in a positive sequence, and sending n data units of a target data packet through a backup channel in a reverse sequence, and when the main channel finishes sending the first portion, acquiring the number of data units sent by the backup channel, and recording the number as m;
and the circulation module is used for taking the next group of data packets as target data packets if m is greater than or equal to the number of the data units in the second part, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing the transmission step.
8. The dual-mode module communication device of claim 7, wherein if m is greater than or equal to the number of data units in the second portion, the next group of data packets is taken as a target data packet, the target data packet is divided into a first portion and a second portion according to a preset order based on m, and the transmitting step includes:
if m is greater than or equal to the number of the data units in the second part and m is not greater than n/2, taking the next group of data packets as target data packets, dividing the target data packets into a first part and a second part according to a preset sequence based on m, and executing a transmission step;
If m is greater than or equal to the number of the data units in the second part and m is greater than n/2, exchanging the main channel with the standby channel;
dividing the target data packet into a first part and a second part according to a preset sequence based on m, and executing a transmission step based on the exchanged main channel and standby channel.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the dual-mode module communication method according to any of the preceding claims 1 to 6 when the computer program is executed.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the dual-mode module communication method according to any of the preceding claims 1 to 6.
CN202310807457.2A 2023-07-03 2023-07-03 Dual-mode module communication method and device, electronic equipment and storage medium Pending CN116961696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310807457.2A CN116961696A (en) 2023-07-03 2023-07-03 Dual-mode module communication method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310807457.2A CN116961696A (en) 2023-07-03 2023-07-03 Dual-mode module communication method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116961696A true CN116961696A (en) 2023-10-27

Family

ID=88457517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310807457.2A Pending CN116961696A (en) 2023-07-03 2023-07-03 Dual-mode module communication method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116961696A (en)

Similar Documents

Publication Publication Date Title
US20140068134A1 (en) Data transmission apparatus, system, and method
US11102322B2 (en) Data processing method and apparatus, server, and controller
CN109858621B (en) Debugging device and method of convolutional neural network accelerator and storage medium
CN111163018B (en) Network equipment and method for reducing transmission delay thereof
CN108762686B (en) Data consistency check flow control method and device, electronic equipment and storage medium
US11210127B2 (en) Method and apparatus for processing request
CN112214366B (en) Test method, device, system, equipment and medium
EP4246965A2 (en) Method and device, equipment, and storage medium for data processing
CN105487937A (en) RDMA (Remote Direct Memory Access) implementation method and device
US11023825B2 (en) Platform as a service cloud server and machine learning data processing method thereof
CN110377539B (en) Data transmission method, device and medium based on high-speed signal switching chip
CN111489279B (en) GPU acceleration optimization method and device and computer storage medium
CN116961696A (en) Dual-mode module communication method and device, electronic equipment and storage medium
CN112380001A (en) Log output method, load balancing device and computer readable storage medium
EP4328748A1 (en) Data processing method and apparatus, computer device, computer-readable storage medium, and computer program product
CN108762684B (en) Hot spot data migration flow control method and device, electronic equipment and storage medium
CN113296996B (en) Service request processing method, related device and storage medium
WO2022116901A1 (en) Iis bus decoding method and apparatus, oscilloscope and computer-readable storage medium
CN112243258A (en) Method and device for determining user perception rate
CN111371799A (en) Method, device and equipment for controlling data transmission and reception of MCTP (Multi-channel media processing protocol) controller
CN212873459U (en) System for data compression storage
CN112995067B (en) Coarse-grained reconfigurable data processing architecture and data processing method thereof
CN114968903B (en) External control circuit of many-core chip
CN114356541B (en) Configuration method, device and system of computing core and electronic equipment
US20240107457A1 (en) Method and apparatus for information reception, receiving device, storage medium and program product

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