CN111262787B - Data transmission method and electronic equipment - Google Patents

Data transmission method and electronic equipment Download PDF

Info

Publication number
CN111262787B
CN111262787B CN202010187704.XA CN202010187704A CN111262787B CN 111262787 B CN111262787 B CN 111262787B CN 202010187704 A CN202010187704 A CN 202010187704A CN 111262787 B CN111262787 B CN 111262787B
Authority
CN
China
Prior art keywords
mode
routing table
table entry
address
node device
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.)
Active
Application number
CN202010187704.XA
Other languages
Chinese (zh)
Other versions
CN111262787A (en
Inventor
李迎冬
邓敬贤
胡剑锋
张国松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Core Semiconductor Technology Beijing Co ltd
Original Assignee
Beijing Sigbean Information Technology 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 Beijing Sigbean Information Technology Co ltd filed Critical Beijing Sigbean Information Technology Co ltd
Priority to CN202010187704.XA priority Critical patent/CN111262787B/en
Publication of CN111262787A publication Critical patent/CN111262787A/en
Application granted granted Critical
Publication of CN111262787B publication Critical patent/CN111262787B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability

Abstract

A data transmission method and an electronic device are disclosed. Determining a working mode, determining a first routing table entry or a second routing table entry as an actual routing table entry according to the working mode, determining node equipment of a next hop according to the actual routing table entry, and sending a data packet to the node equipment of the next hop in a communication mode corresponding to the actual routing table entry. Therefore, the data packet can be transmitted in multiple modes, and the success rate of data transmission is improved.

Description

Data transmission method and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data transmission method and an electronic device.
Background
The broadband power line carrier communication network is a communication network which takes a power line as a communication medium and realizes the aggregation, transmission and interaction of the power utilization information of low-voltage power users.
The broadband power line carrier communication network in the prior art generally includes a single mode network and a dual mode network. Single mode networks communicate, such as power line carrier networks or wireless networks. However, in a single power line carrier network, each communication network is connected by a line, so that communication between each network node device can only be performed according to a predetermined path, which directly affects communication efficiency between a network node device at a lower level and a central node device. Although a single wireless network can well solve the hierarchy problem of the network node device and the central node device, the single wireless network cannot be applied to long-distance communication, and the connection of the single wireless network is easily interfered by the environment, so that the success rate of communication is influenced. In a dual-mode network, a single address mode is usually used, on one hand, wired communication and wireless communication exist in a route at the same time, and a wireless communication time slot needs to be divided from a wireless communication time slot, so that the route establishment and maintenance are complicated, and on the other hand, the length of a data forwarding path is basically fixed, the data transmission efficiency from one end to the other end is low, and the required time is longer.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a data transmission method and an electronic device, which can send data packets in multiple modes and improve the success rate of data sending.
In a first aspect, an embodiment of the present invention provides a data transmission method applied to a broadband power line carrier communication system, where the broadband power line carrier communication system includes a plurality of node devices, each node device includes a first routing table entry and a second routing table entry, where the first routing table entry includes a node device address of a next hop for sending data from a current node device to a target node device in a wired communication manner, and the second routing table entry includes a node device address of the next hop for sending data from the current node device to the target node device in a wireless communication manner, where the method includes:
acquiring data to be sent and target node equipment;
determining an operation mode, wherein the operation mode comprises a wired mode, a wireless mode and a mixed mode;
determining the first routing table entry or the second routing table entry as an actual routing table entry according to the working mode;
determining the node equipment of the next hop according to the actual routing table item;
generating a data packet according to the data to be sent and the address of the target node device, wherein the data packet has a mode flag bit, and the mode flag bit is used for designating the working mode; and
and sending the data packet to the node equipment of the next hop in a communication mode corresponding to the actual routing table entry.
Preferably, the determining the operation mode includes:
detecting a communication record;
determining the working mode as a wired mode in response to the existence of a first communication record which is characterized to pass through the wired mode and can be successfully transmitted from the current node equipment to the target node equipment;
in response to the existence of a second communication record which is characterized to pass through the wireless mode and can be successfully sent from the current node equipment to the target node equipment, determining the working mode as the wireless mode;
responding to a third communication record which is represented by a mixed mode and can be successfully sent from the current node equipment to the target node equipment, and determining the working mode as the mixed mode; and
in response to the absence of the first, second and third communication records, determining the operating mode according to a predetermined priority.
Preferably, the determining the operation mode according to the predetermined priority includes:
selecting a wired mode to determine as the working mode;
selecting a wireless mode to be determined as the operating mode in response to a failure to transmit data through a wired mode; and
in response to a failure to transmit data via the wireless mode, selecting a hybrid mode is determined to be the operating mode.
Preferably, determining that the first routing table entry or the second routing table entry is the actual routing table entry according to the operating mode includes:
in response to the working mode being the wired mode, determining that the first routing table entry is an actual routing table entry;
determining a second routing table entry as an actual routing table entry in response to the working mode being the wireless mode; and
and responding to the working mode being the mixed mode, and determining the first routing table entry or the second routing table entry as an actual routing table entry according to the communication record.
Preferably, the node device address in the first routing table entry is a first address, and the node device address in the second routing table entry is a second address.
Preferably, the sending the data packet to the node device of the next hop in the communication mode corresponding to the actual routing table entry includes:
obtaining a source address according to the actual routing table item, wherein the source address is the address of the current node equipment in the actual routing table item;
acquiring a destination address according to the actual routing table item, wherein the destination address is the address of the node equipment of the next hop in the actual routing table item; and
and sending the data packet to the node equipment of the next hop according to the source address and the destination address.
Preferably, the data packet further comprises a source address and a destination address.
In a second aspect, an embodiment of the present invention discloses a data transmission method applied to a broadband power line carrier communication system, where the broadband power line carrier communication system includes a plurality of node devices, each node device includes a first routing table entry corresponding to a wired communication mode and a second routing table entry corresponding to a wireless communication mode, where the first routing table entry includes a node device address of a next hop for sending data from a current node device to a target node device in the wired communication mode, and the second routing table entry includes a node device address of the next hop for sending data from the current node device to the target node device in the wireless communication mode, and the method includes:
receiving a data packet sent by previous node equipment;
analyzing the data packet to acquire data to be sent, an address of target node equipment and a mode flag bit, wherein the mode flag bit is used for designating the working mode, and the working mode comprises a wired mode, a wireless mode and a mixed mode;
determining a working mode according to the mode flag bit;
determining the first routing table entry or the second routing table entry as an actual routing table entry according to the working mode;
determining the node equipment of the next hop according to the actual routing table item;
and sending the data packet to the node equipment of the next hop in a communication mode corresponding to the actual routing table entry.
Preferably, the received data packet further includes a source address and a destination address;
the method further comprises the following steps:
and updating the source address and the destination address according to the actual routing table entry.
In a third aspect, an embodiment of the present invention discloses an electronic device, including:
a first communication unit configured to communicate by wire;
a second communication unit configured to communicate by wireless; and
a memory for storing one or more computer program instructions, and a processor, wherein the one or more computer program instructions are executed by the processor to implement the method of the first and second aspects.
The technical scheme of the embodiment of the invention determines the node equipment of the next hop according to the actual routing table item by determining the working mode and determining the first routing table item or the second routing table item as the actual routing table item according to the working mode, and sends the data packet to the node equipment of the next hop in a communication mode corresponding to the actual routing table item. Therefore, the data packet can be transmitted in multiple modes, and the success rate of data transmission is improved.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
fig. 1 is a schematic diagram of a broadband power line carrier communication system of an embodiment of the present invention;
fig. 2 is a schematic diagram of a broadband power line carrier communication network of an embodiment of the present invention;
FIG. 3 is a diagram of a first routing table entry according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a second routing table entry according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a protocol stack of a broadband power line carrier communication network of an embodiment of the present invention;
FIG. 6 is a schematic diagram of a central coordinator according to an embodiment of the present invention;
FIG. 7 is a flowchart of the operation of the central coordinator of an embodiment of the present invention;
FIG. 8 is a flow chart of the central coordinator determining an operation mode according to an embodiment of the present invention;
FIG. 9 is a flowchart of a central coordinator determining actual routing table entries, in accordance with an embodiment of the present invention;
FIG. 10 is a flow chart of the operation of the agent coordinator of an embodiment of the present invention.
Detailed Description
The present invention will be described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the present invention.
Further, those of ordinary skill in the art will appreciate that the drawings provided herein are for illustrative purposes and are not necessarily drawn to scale.
Meanwhile, it should be understood that, in the following description, a "circuit" refers to a conductive loop constituted by at least one element or sub-circuit through electrical or electromagnetic connection. When an element or circuit is referred to as being "connected to" another element or element/circuit is referred to as being "connected between" two nodes, it may be directly coupled or connected to the other element or intervening elements may be present, and the connection between the elements may be physical, logical, or a combination thereof. In contrast, when an element is referred to as being "directly coupled" or "directly connected" to another element, it is intended that there are no intervening elements present.
Unless the context clearly requires otherwise, throughout the description, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, what is meant is "including, but not limited to".
In the description of the present invention, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
Fig. 1 is a schematic diagram of a broadband power line carrier communication system according to an embodiment of the present invention. As shown in fig. 1, a plurality of node devices of a broadband power line carrier communication system according to an embodiment of the present invention include a CCO (Central Coordinator), a PCO (Proxy Coordinator), and an STA (Station). Further, as shown in the figure, the broadband power line carrier communication system uses a CCO as a center, uses a PCO (e.g., a smart meter, a type I collector communication unit, a broadband carrier type II collector) as a relay agent, and connects a tree network with multiple levels of associations of all STAs (e.g., a smart meter, a type I collector communication unit, a broadband carrier type II collector).
In this embodiment, a plurality of node devices in the broadband power line carrier communication system form a first network in a wired manner, and form a second network in a wireless manner. Specifically, the broadband power line carrier communication network according to the embodiment of the present invention is shown in fig. 2, where a solid line indicates a wired communication path and a dotted line indicates a wireless communication path. The first network and the second network of the embodiment of the invention use independent short addresses, independent routing tables, independent equipment levels and other network management information, and do not interfere with each other.
Further, in the first network, each node apparatus uses a first address, and in the second network, each node apparatus uses a second address.
In this embodiment, the first network and the second network maintain their respective routing table entries in the networking and maintenance processes, so as to forward data according to the routing table entries.
Furthermore, by arranging the two networks, the maintenance of the route is simpler, the working modes between the node devices are flexibly switched, the online rate of the node devices can be improved, and the robustness of the network is improved.
Furthermore, the dual network arrangement may make the method of the embodiment of the present invention compatible with the single mode chip in the current market.
As shown in fig. 2, the broadband power line carrier communication system according to the embodiment of the present invention includes node devices 1 to 7 as an example, where node device 1 is a CCO, node devices 3 and 4 are PCOs, and node devices 2, 5, 6, and 7 are STAs. For each node device, a corresponding MAC (Medium Access Control) sublayer, a first address TEI and a second address WLA are included. The MAC is a physical address of the node equipment, the first address is a wired communication mode address, and the second address is a wireless communication mode address.
In this embodiment, each node device includes two routers, a first router corresponding to a wired communication method and a second router corresponding to a wireless communication method.
Further, the first address is an address of the node device adopting a broadband power line carrier communication mode, and may be used to instruct the node device to transmit and receive data by using a power line carrier communication mode. The second address is an address of the node device in a wireless communication mode, and can be used for instructing the node device to transmit and receive data in the wireless communication mode.
In an alternative implementation, the allocation of addresses may be performed by the CCO. Taking a wireless network access mode as an example, the network access process of the node device is as follows: node devices which are not connected to the network respectively send beacon requests in all channels to search for CCOs and PCOs in the network, and the CCOs and the PCOs respond to the beacon requests after receiving the beacon requests. The node equipment which does not access the network records the response received on each channel, selects the CCO or PCO with better communication quality as the superior node equipment of the node equipment, and sends a network access request to the node equipment. After receiving the network access request, the superior node device allocates a second address to the node device applying for network access, and takes the node device as the subordinate node of the superior node device. And after receiving the distributed second address, the node equipment applying for network access sends the second address and the physical address thereof to the CCO. And the CCO judges whether the network access is agreed according to the network establishing mode and the information of the node equipment applying network access, if so, the CCO returns the network access agreement information to the node equipment applying network access, and the node equipment applying network access successfully accesses the network. And if the network access request does not agree with the network access request, returning network access refusing information to the node equipment applying network access, and installing the steps to access the network again until the network access is successful after the node equipment applying network access receives the network access refusing information.
Thus, according to the steps, a first network for performing wired communication and a second network for performing wireless communication can be formed.
In this embodiment, after networking is completed, each node device forms two routing table entries, where a first routing table entry includes a node device address of a next hop for sending data from a current node device to a target node device in a wired communication manner, and a second routing table entry includes a node device address of a next hop for sending data from the current node device to the target node device in a wireless communication manner. Specifically, taking the network shown in fig. 2 as an example, the corresponding first routing table entry and second routing table entry may refer to fig. 3 and fig. 4, respectively.
As shown in fig. 3, in the wired network, the target node device corresponding to the MAC3 may be MAC1, MAC4, MAC5, MAC6, and MAC 7.
Specifically, when the destination node device address MAC1 indicates that data is transmitted from a low level to a high level (for example, STA reports data to CCO), if the data is transmitted in a wired manner, the address of the destination node device at this time is TEI1, and the transmission path at this time is MAC3-MAC1, so that the address of the node device of the next hop is TEI 1.
When the destination node device address MAC4, data is transmitted from high level to low level (for example, CCO sends data to STA), if transmitted by wire, the address of the destination node device at this time is TEI4, and the transmission path at this time is MAC3-MAC4, so that the address of the node device of the next hop is TEI 4.
When the destination node device address MAC5, data is transmitted from high level to low level (for example, CCO sends data to STA), if transmitted by wire, the address of the destination node device at this time is TEI5, and the transmission path at this time is MAC3-MAC5, so that the address of the node device of the next hop is TEI 5.
When the destination node device address MAC6 is a high-level to low-level transmission (for example, CCO sends data to STA), if the data is transmitted by wire, the address of the destination node device at this time is TEI6, the transmission path at this time is MAC3-MAC4-MAC6, and thus the address of the node device of the next hop is TEI 4.
When the destination node device address MAC7 is a high-level to low-level transmission (for example, CCO sends data to STA), if the data is transmitted by wire, the address of the destination node device at this time is TEI7, the transmission path at this time is MAC3-MAC4-MAC7, and thus the address of the node device of the next hop is TEI 4.
As shown in fig. 4, in the wireless network, the target node device corresponding to the MAC3 may be a MAC1 and a MAC 7.
Specifically, when the address of the target node device is MAC1, data is transmitted from a low level to a high level (for example, data is reported by STA to CCO), if the data is transmitted wirelessly, the address of the target node device at this time is WLA1, and the transmission path is MAC3-MAC1, so that the address of the node device of the next hop is WLA 1.
When the target node device address MAC7, data is transferred from high level to low level (e.g., CCO sends data to STA), if transferred wirelessly, the address of the target node device at this time is WLA7, and the transmission path at this time is MAC3-MAC7, so that the address of the node device of the next hop is WLA 7.
Further, fig. 5 is a schematic diagram of a protocol stack of the broadband power line carrier communication network according to the embodiment of the present invention. As shown in fig. 5, the broadband power line carrier communication network protocol stack includes a physical layer a, a data link layer b, and an application layer c. The data link layer b is divided into a medium access control sublayer (MAC) b1 and a network management sublayer b 2. The application layer c realizes service data interaction between the local communication unit and the communication unit, and completes data transmission through the data link layer. The network management sublayer b2 mainly implements networking, network maintenance, routing management, and convergence and distribution of application layer messages of the broadband power line carrier communication network. The MAC sublayer competes for the physical channel mainly through two channel access mechanisms of CSMA/CA and ITDMA, and realizes reliable transmission of data messages. The physical layer a mainly realizes that the data message of the MAC sublayer is coded and modulated into a broadband carrier signal or wireless information, the broadband carrier signal or the wireless information is sent to a power line medium or a wireless transmission medium, the broadband carrier signal of the power line medium is received and demodulated into the data message, and the data message is sent to the MAC sublayer for processing.
Fig. 6 is a schematic structural diagram of a central coordinator according to an embodiment of the present invention. As shown in fig. 6, the central coordinator of the embodiment of the present invention includes a processor 11, a memory 12, a wired communication unit 13, and a wireless communication unit 14. Wherein the wired communication unit 13 is configured to communicate by wire. The wireless communication unit 14 is configured to communicate by wireless. The wired communication unit 13 and the wireless communication unit 14 are two functionally independent communication units, the node device includes a first address and a second address, the wired communication unit 13 is configured to perform data transmission through the first address, and the wireless communication unit 14 is configured to perform data transmission through the second address. Wherein the memory 12 stores instructions executable by the at least one processor 11, the instructions being executable by the at least one processor 11 to implement the method as shown in fig. 7:
and step S110, acquiring data to be transmitted and target node equipment.
In this embodiment, the CCO acquires data to be transmitted and a target node device in response to communication with a certain node device in the broadband power line carrier communication network.
And step S120, determining the working mode.
In this embodiment, the CCO determines an operation mode of performing data transmission this time, where the operation mode includes a hybrid mode, a wired mode, and a wireless mode.
Specifically, in response to the operating mode being the wired mode, each node device communicates in a wired communication manner. And responding to the working mode being a wireless mode, and enabling each node device to communicate in a wireless communication mode. And responding to the working mode being in the mixed mode, and enabling each node device to communicate in a wired communication mode or a wireless communication mode.
Specifically, the wired communication system is a power line carrier communication system, and power line carrier communication (power line carrier communication) is power system communication in which a power transmission line is a transmission medium of a carrier signal. Because the transmission line has very firm bearing structure, so the transmission line is used for transmitting carrier signals when transmitting power frequency current, and is economical and very reliable.
Specifically, the wireless communication method may use various existing wireless communication methods, for example, NB-IoT (Narrow Band Internet of Things), LORA, ZigBee, or GPRS (General Packet Radio Service). The NB-IoT has the characteristics of wide coverage, low power consumption, lower module cost and the like. The LORA is one of LPWAN (Low Power Wide Area Network), is an ultra-long distance wireless transmission scheme based on a spread spectrum technology, and has the characteristics of long distance, Low Power consumption, multi-node equipment, Low cost and the like. The ZigBee technology is a two-way wireless communication technology with short distance, low complexity, low power consumption, low speed and low cost. GPRS has the characteristics of high transmission rate, short access time and the like. Therefore, the coverage range of the wireless network can be enlarged by using the wireless network such as NB-IoT, LoRa, ZigBee or GPRS, and meanwhile, the network signal is stable and is not easy to interrupt.
Further, determining the operation mode, as referred to in fig. 8, comprises the steps of:
step S121 starts determining the operation mode.
And step S122, detecting a communication record.
In this embodiment, the node device collects and records the result of each data transmission in the data transmission process, and records the failure result and the success result in the communication record. The CCO detects the communication record which can be successfully sent from the current node equipment to the target node equipment, and determines the communication record according to the detection result.
Step S123, in response to that there is a communication record that can be successfully sent from the current node device to the target node device in the communication record, determining the corresponding working mode as the working mode of the current communication. The method specifically comprises the following steps:
step S1231, in response to the existence of the first communication record that represents that the communication from the current node device to the target node device can be successfully transmitted through the wired mode, determining the operating mode as the wired mode.
Step S1232, in response to the presence of the second communication record that the representation passes through the wireless mode and can be successfully transmitted from the current node device to the target node device, determining the operating mode as the wireless mode.
And S1233, responding to the third communication record which is represented by the mixed mode and can be successfully sent from the current node equipment to the target node equipment, and determining the working mode as the mixed mode.
And step S124, responding to the absence of the first communication record, the second communication record and the third communication record, and determining the working mode according to a preset priority.
In this embodiment, the predetermined priorities are, in order from high to low: wired mode, wireless mode, hybrid mode. The method specifically comprises the following steps:
step S1241, selecting the wired mode to determine the working mode.
In this embodiment, the wired mode is selected as the operation mode according to a predetermined priority for data transmission.
Step S1242, a communication result is detected.
In the present embodiment, the communication result in the wired mode is detected.
Step S1243, in response to a failure to transmit data in the wired mode, selecting the wireless mode to determine as the operating mode.
Further, in response to the success of the data transmission through the wired mode, the communication result is recorded.
In step S1244, in the present embodiment, the communication result in the wireless mode is detected.
Step S1245, in response to failure to transmit data in the wireless mode, selecting a hybrid mode to determine as the operating mode.
Further, in response to the success of the data transmission in the wireless mode, the communication result is recorded.
Thus, multiple communication modes can be tried to transmit the data packet to ensure the data packet is successfully transmitted.
Step S130, determining the first routing table entry or the second routing table entry as an actual routing table entry according to the working mode.
In this embodiment, the CCO determines, according to the operating mode, that the first routing table entry or the second routing table entry is an actual routing table entry. The method specifically comprises the following steps as shown in fig. 9:
step S131, in response to the working mode being the wired mode, determining that the first routing table entry is an actual routing table entry.
In this embodiment, when the operating mode is the wired mode, the first routing table entry is determined to be the actual routing table entry.
Step S132, in response to the operating mode being the wireless mode, determining the second routing table entry as the actual routing table entry.
In this embodiment, when the operating mode is the wireless mode, the second routing table entry is determined to be an actual routing table entry.
Step S133, in response to the operation mode being the hybrid mode, determining the first routing table entry or the second routing table entry as an actual routing table entry according to the communication record.
In this embodiment, when the operation mode is the hybrid mode, one of the first routing table entry or the second routing table entry is selected as the actual routing table entry.
Specifically, the node device of the next hop when data is sent in a wired communication mode is determined according to a first routing table item, the node device of the next hop when the data is sent in a wireless communication mode is determined according to a second routing table item, then whether the data can be successfully sent to the node device of the next hop in the wired communication mode or the wireless communication mode is respectively inquired according to communication records, if only one communication mode can successfully send the data, the corresponding routing table item is selected as an actual routing table item, if both the two modes can be successfully sent to the node device of the next hop, evaluation can be carried out according to information such as data volume and node device level, and one of the first routing table item or the second routing table item is selected to be determined as an actual routing table item.
Step S140, determining the node device of the next hop according to the actual routing table entry.
In this embodiment, after the actual routing table entry is determined through the above steps, the node device of the next hop is determined according to the actual routing table entry.
And step S150, generating a data packet according to the data to be sent and the address of the target node equipment.
In this embodiment, the CCO generates a packet to be transmitted.
Further, the data packet includes data to be sent, an address of the target node device, a mode flag bit, a source address and a destination address.
Further, the mode flag bit is used to specify the operation mode, which includes a hybrid mode, a wired mode, and a wireless mode.
Further, the source address is the address of the current node device in the actual routing table entry.
Further, the destination address is an address of a node device of a next hop in the actual routing table entry.
For example, in the network shown in fig. 6, it is assumed that the node apparatus 1 needs to transmit data to the node apparatus 7, and the operation mode is the wired mode. Then, it can be determined that the node device of the next hop is the node device 3 through the above steps. At this time, in the packet generated by the node device 1, the destination node device address is MAC7, the mode flag bit is wired mode, the source address is TEI1, and the destination address is TEI 3.
Step S160, sending the data packet to the node device of the next hop in the communication mode corresponding to the actual routing table entry.
In this embodiment, the node device sends the data packet to the node device of the next hop in a communication manner corresponding to the actual routing table entry.
Specifically, in response to the actual routing table entry being the first routing table entry, the data packet is sent in a wired communication manner, and in response to the actual routing table entry being the second routing table entry, the data packet is sent in a wireless communication manner.
Further, the step of sending the data packet to the node device of the next hop in the communication mode corresponding to the actual routing table entry includes the following steps:
step S161, obtaining the source address according to the actual routing table entry.
In this embodiment, the source address is an address of the current node device in the actual routing table entry.
And step S162, acquiring the destination address according to the actual routing table entry.
In this embodiment, the destination address is an address of a node device of a next hop in the actual routing table entry.
And step S163, sending the data packet to the node device of the next hop according to the source address and the destination address.
In the present embodiment, the processor 11, the memory 12, the wired communication unit 13, and the wireless communication unit 14 may be implemented by a dedicated chip or an integrated circuit, or may be implemented by various existing processors executing corresponding computer program instructions.
It should be understood that the above description is made by taking the example of sending data to the STA by the CCO, where the operation process of the CCO is as described above, but the above embodiments are also applicable to other scenarios, for example, the STA reports data to the CCO, and in this case, the STA can send data by the same method as described above. Meanwhile, in the data sending process, the uplink direction or the downlink direction is kept unchanged, and the sending direction of the data cannot be changed.
The embodiment of the invention determines the node equipment of the next hop according to the actual routing table entry by determining the working mode and determining the first routing table entry or the second routing table entry as the actual routing table entry according to the working mode, and sends the data packet to the node equipment of the next hop in a communication mode corresponding to the actual routing table entry. Therefore, the data packet can be transmitted in multiple modes, and the success rate of data transmission is improved.
Further, the structure of the proxy coordinator according to the embodiment of the present invention is identical to that of the central coordinator, and can also refer to fig. 6, including a wired communication unit, a wireless communication unit, a memory, and a processor. Wherein the wired communication unit is configured to communicate by a wired manner. The wireless communication unit is configured to communicate by wireless. The wired communication unit and the wireless communication unit are two independent communication units, the node device comprises a first address and a second address, the wired communication unit is configured to perform data transmission through the first address, and the wireless communication unit is configured to perform data transmission through the second address. Wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to implement a method as shown in fig. 10, comprising:
step S210, receiving a data packet sent by the previous node device.
In this embodiment, the PCO receives a data packet sent by a previous node device, where the previous node device may be a CCO, an STA, or a PCO.
Further, when the previous node device is a CCO, an application scenario of the embodiment of the present invention is that the CCO sends data to the STA, where the current node device is a first-hop node device when the CCO sends data to the STA. When the previous node device is the STA, the application scenario of the embodiment of the present invention is that the STA reports data to the CCO, where the current node device is a first-hop node device when the STA sends data to the CCO. When the previous node device is a PCO, an application scenario of the embodiment of the present invention is that the CCO sends data to the STA or the STA reports data to the CCO, where the current node device is an intermediate node device in a data transmission path.
Step S220, parsing the data packet to obtain data to be sent, an address of the target node device, and a mode flag.
In this embodiment, the data packet includes data to be transmitted, an address of the destination node device, a mode flag, a source address, and a destination address.
Further, the mode flag bit is used to specify the operation mode, which includes a hybrid mode, a wired mode, and a wireless mode.
Further, the source address is the address of the last node device in the actual routing table entry.
Further, the destination address is an address of the current node device in the actual routing table entry.
And step S230, determining a working mode according to the mode flag bit.
In this embodiment, the PCO determines the operation mode according to the mode flag bit.
Step S240, determining that the first routing table entry or the second routing table entry is an actual routing table entry according to the working mode.
In this embodiment, the PCO determines that the first routing table entry or the second routing table entry is an actual routing table entry according to the operating mode. The method specifically comprises the following steps:
step S241, in response to the working mode being the wired mode, determining that the first routing table entry is an actual routing table entry.
In this embodiment, when the operating mode is the wired mode, the first routing table entry is determined to be the actual routing table entry.
Step S242, in response to the operating mode being the wireless mode, determining the second routing table entry as the actual routing table entry.
In this embodiment, when the operating mode is the wireless mode, the second routing table entry is determined to be an actual routing table entry.
Step S243, in response to the operation mode being the hybrid mode, determining the first routing table entry or the second routing table entry as an actual routing table entry according to the communication record.
In this embodiment, when the operation mode is the hybrid mode, one of the first routing table entry or the second routing table entry is selected as the actual routing table entry.
Specifically, the node device of the next hop when data is sent in a wired communication mode is determined according to a first routing table item, the node device of the next hop when the data is sent in a wireless communication mode is determined according to a second routing table item, then whether the data can be successfully sent to the node device of the next hop in the wired communication mode or the wireless communication mode is respectively inquired according to communication records, if only one communication mode can successfully send the data, the corresponding routing table item is selected as an actual routing table item, and if both the two modes can be successfully sent to the node device of the next hop, any one of the first routing table item or the second routing table item can be selected to be determined as the actual routing table item.
And step S250, determining the node equipment of the next hop according to the actual routing table entry.
In this embodiment, after the actual routing table entry is determined through the above steps, the node device of the next hop is determined according to the actual routing table entry.
Step S260, sending the data packet to the node device of the next hop in the communication mode corresponding to the actual routing table entry.
In this embodiment, the node device sends the data packet to the node device of the next hop in a communication manner corresponding to the actual routing table entry.
Specifically, in response to the actual routing table entry being the first routing table entry, the data packet is sent in a wired communication manner, and in response to the actual routing table entry being the second routing table entry, the data packet is sent in a wireless communication manner.
Further, the step of sending the data packet to the node device of the next hop in the communication mode corresponding to the actual routing table entry includes the following steps:
step S261, obtain the source address according to the actual routing table entry.
In this embodiment, the PCO obtains a source address according to the actual routing table entry, where the source address is an address of the current node device in the actual routing table entry. And updating the source address in the data packet according to the newly acquired source address.
Step S262, obtaining the destination address according to the actual routing table entry.
In this embodiment, the PCO obtains a destination address according to the actual routing table entry, where the destination address is an address of a node device of a next hop in the actual routing table entry. And updating the destination address in the data packet according to the newly acquired destination address.
And step S263, sending the data packet to the node equipment of the next hop according to the source address and the destination address.
In this embodiment, the data packet is sent to the node device of the next hop according to the updated source address and destination address.
In the present embodiment, the processor 11, the memory 12, the wired communication unit 13, and the wireless communication unit 14 may be implemented by a dedicated chip or an integrated circuit, or may be implemented by various existing processors executing corresponding computer program instructions.
The embodiment of the invention obtains the working mode by determining the analysis data packet, determines the first routing table item or the second routing table item as the actual routing table item according to the working mode, determines the node equipment of the next hop according to the actual routing table item, and sends the data packet to the node equipment of the next hop in a communication mode corresponding to the actual routing table item. Therefore, the data packet can be transmitted in multiple modes, and the success rate of data transmission is improved.
In one particular embodiment, the network shown in FIG. 2, where data is sent by MAC1 to MAC7, can be divided into three cases:
in case one, MAC1 operates in wired mode. Firstly, the MAC1 determines that the node device of the next hop is MAC3 according to the first routing table entry of the MAC1, sets the mode flag bit in the data packet to be in the wired mode, the target node device is MAC7, the source address is TEI1, and the destination address is TEI3, and then sends the data packet to MAC 3. After receiving the data packet, the MAC3 parses the data packet, and may determine that the operating mode is the wired mode and the target node device is MAC7 according to the mode flag bit, thereby determining that the node device of the next hop is MAC4 according to the first routing table entry of the MAC3, modifying the source address to TEI3, modifying the destination address to TEI4, and then sending the data packet to MAC 4. After receiving the data packet, the MAC4 parses the data packet, and may determine that the operating mode is the wired mode and the target node device is MAC7 according to the mode flag bit, thereby determining that the node device of the next hop is MAC7 according to the first routing table entry of the MAC4, modifying the source address to TEI4, modifying the destination address to TEI7, and then sending the data packet to MAC 7.
And in the second case, the wired mode has an open circuit and is switched into the wireless mode to work. Assume that the wired path between MAC4-MAC7 is broken. Firstly, the MAC1 determines that the node device of the next hop is MAC3 according to its own second routing table entry, sets the mode flag bit in the data packet to the wireless mode, where the target node device is MAC7, the source address is WLA1, and the destination address is WLA3, and then sends the data packet to MAC 3. After receiving the data packet, the MAC3 parses the data packet, and may determine that the operating mode is the wireless mode and the target node device is the MAC7 according to the mode flag bit, thereby determining that the node device of the next hop is the MAC7 according to the second routing table entry of the MAC3, modifying the source address to WLA3, modifying the destination address to WLA7, and then sending the data packet to the MAC 7.
And in the third case, the wired mode and the wireless mode are both disconnected and switched to the mixed mode to work. The wired path between MACs 4-7 is assumed to be broken, and the wireless path between MACs 1-3 is assumed to be broken. After the wired mode transmission fails, the MAC4 will send a message back to the MAC1 that the transmission failed, the MAC1 sets the operating mode to the wireless mode, and retransmits the data. After the wireless mode fails to transmit again, the MAC1 may acquire a message that the data cannot be wirelessly transmitted to the MAC3, switch the operating mode to the hybrid mode, and retransmit the data. Specifically, in a mixed mode, data transmission paths evaluated by each node device are TEI1-TEI3-TEI4-TEI7, but when data are transmitted to TEI7 through TEI4, the data fail to be detected, the MAC4 device marks failure paths and evaluates and searches other paths, if no other paths are found, a failure message is generated and transmitted to MAC3, the MAC3 marks the failure paths and evaluates and searches other paths, the MAC3 evaluates another path WLA3-WLA7, and the data transmission is successful. At this time, the MAC1, MAC3, and MAC7 record this path as the best path, and the MAC1 and MAC7 use this path for communication.
In the embodiment of the invention, two routing table entries are created for network management by aiming at a wired communication mode and a wireless communication mode through two addresses, and the two routing table entries are not interfered with each other. Before data is sent, evaluation is carried out according to information such as path lengths and data lengths of the two networks, an optimal path is found out, and data is sent to a target node from an original node. Meanwhile, when the network is congested, the double addresses are flexibly switched, and the data forwarding efficiency is improved.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A data transmission method is applied to a broadband power line carrier communication system, and is characterized in that the broadband power line carrier communication system comprises a plurality of node devices, each node device comprises a first routing table entry and a second routing table entry, wherein the first routing table entry comprises a node device address of a next hop for sending data from a current node device to a target node device in a wired communication mode, the second routing table entry comprises a node device address of the next hop for sending data from the current node device to the target node device in a wireless communication mode, the node device address in the first routing table entry is a first address, and the node device address in the second routing table entry is a second address, and the method comprises the following steps:
acquiring data to be sent and target node equipment;
determining working modes according to the successfully sent communication records, wherein the working modes comprise a wired mode, a wireless mode and a mixed mode;
determining the first routing table entry or the second routing table entry as an actual routing table entry according to the working mode;
determining the node equipment of the next hop according to the actual routing table item;
generating a data packet according to the data to be sent and the address of the target node device, wherein the data packet has a mode flag bit, and the mode flag bit is used for designating the working mode; and
sending the data packet to node equipment of a next hop in a communication mode corresponding to the actual routing table entry;
wherein determining the operating mode according to the successfully transmitted communication record comprises:
detecting a communication record;
determining the working mode as a wired mode in response to the existence of a first communication record which is characterized to pass through the wired mode and can be successfully transmitted from the current node equipment to the target node equipment;
in response to the existence of a second communication record which is characterized to pass through the wireless mode and can be successfully sent from the current node equipment to the target node equipment, determining the working mode as the wireless mode;
responding to a third communication record which is represented by a mixed mode and can be successfully sent from the current node equipment to the target node equipment, and determining the working mode as the mixed mode; and
in response to the absence of the first, second and third communication records, determining the operating mode according to a predetermined priority.
2. The method of claim 1, wherein determining the operating mode according to a predetermined priority comprises:
selecting a wired mode to determine as the working mode;
selecting a wireless mode to be determined as the operating mode in response to a failure to transmit data through a wired mode; and
in response to a failure to transmit data via the wireless mode, selecting a hybrid mode is determined to be the operating mode.
3. The method of claim 1, wherein determining whether the first routing table entry or the second routing table entry is an actual routing table entry according to the operating mode comprises:
in response to the working mode being the wired mode, determining that the first routing table entry is an actual routing table entry;
determining a second routing table entry as an actual routing table entry in response to the working mode being the wireless mode; and
and responding to the working mode being the mixed mode, and determining the first routing table entry or the second routing table entry as an actual routing table entry according to the communication record.
4. The method of claim 1, wherein sending the data packet to a node device of a next hop in a communication manner corresponding to the actual routing table entry comprises:
obtaining a source address according to the actual routing table item, wherein the source address is the address of the current node equipment in the actual routing table item;
acquiring a destination address according to the actual routing table item, wherein the destination address is the address of the node equipment of the next hop in the actual routing table item; and
and sending the data packet to the node equipment of the next hop according to the source address and the destination address.
5. The method of claim 4, wherein the data packet further comprises a source address and a destination address.
6. A data transmission method is applied to a broadband power line carrier communication system, and is characterized in that the broadband power line carrier communication system comprises a plurality of node devices, each node device comprises a first routing table entry corresponding to a wired communication mode and a second routing table entry corresponding to a wireless communication mode, wherein the first routing table entry comprises a node device address of a next hop for sending data from a current node device to a target node device in the wired communication mode, the second routing table entry comprises a node device address of the next hop for sending data from the current node device to the target node device in the wireless communication mode, the node device address in the first routing table entry is a first address, and the node device address in the second routing table entry is a second address, and the method comprises the following steps:
receiving a data packet sent by previous node equipment;
analyzing the data packet to obtain data to be sent, an address of target node equipment and a mode flag bit, wherein the mode flag bit is used for designating the working mode, the working mode comprises a wired mode, a wireless mode and a mixed mode, and the working mode is determined based on successfully sent communication records;
determining a working mode according to the mode flag bit;
determining the first routing table entry or the second routing table entry as an actual routing table entry according to the working mode;
determining the node equipment of the next hop according to the actual routing table item;
sending the data packet to node equipment of a next hop in a communication mode corresponding to the actual routing table entry;
wherein determining the operating mode according to the successfully transmitted communication record specifically comprises the following steps:
detecting a communication record;
determining the working mode as a wired mode in response to the existence of a first communication record which is characterized to pass through the wired mode and can be successfully transmitted from the current node equipment to the target node equipment;
in response to the existence of a second communication record which is characterized to pass through the wireless mode and can be successfully sent from the current node equipment to the target node equipment, determining the working mode as the wireless mode;
responding to a third communication record which is represented by a mixed mode and can be successfully sent from the current node equipment to the target node equipment, and determining the working mode as the mixed mode; and
in response to the absence of the first, second and third communication records, determining the operating mode according to a predetermined priority.
7. The method of claim 6, wherein the received data packet further comprises a source address and a destination address;
the method further comprises the following steps:
and updating the source address and the destination address according to the actual routing table entry.
8. A data transmission apparatus, characterized in that the data transmission apparatus comprises:
a first communication unit configured to communicate by wire;
a second communication unit configured to communicate by wireless; and
a memory to store one or more computer program instructions, and a processor, wherein the one or more computer program instructions are executed by the processor to implement the method of any of claims 1-7.
CN202010187704.XA 2020-03-17 2020-03-17 Data transmission method and electronic equipment Active CN111262787B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010187704.XA CN111262787B (en) 2020-03-17 2020-03-17 Data transmission method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010187704.XA CN111262787B (en) 2020-03-17 2020-03-17 Data transmission method and electronic equipment

Publications (2)

Publication Number Publication Date
CN111262787A CN111262787A (en) 2020-06-09
CN111262787B true CN111262787B (en) 2022-04-15

Family

ID=70953218

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010187704.XA Active CN111262787B (en) 2020-03-17 2020-03-17 Data transmission method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111262787B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115242707B (en) * 2022-07-12 2023-09-01 国网重庆市电力公司营销服务中心 Data communication method and device, storage medium and terminal
CN115412487A (en) * 2022-09-01 2022-11-29 芯象半导体科技(北京)有限公司 Communication method, device, equipment and computer readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018188477A1 (en) * 2017-04-10 2018-10-18 华为技术有限公司 Data transmission method and apparatus, power line communication network, and power system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707571A (en) * 2009-09-23 2010-05-12 李悦 Power line and wireless dual-network routing method
JP5756908B2 (en) * 2012-03-09 2015-07-29 パナソニックIpマネジメント株式会社 Multi-hop communication system, handset
TWI530112B (en) * 2012-12-21 2016-04-11 光寶電子(廣州)有限公司 Power line communications device, power line communications system, and monitoring power method thereof
CN105046935B (en) * 2015-08-13 2018-05-22 青岛东软载波科技股份有限公司 A kind of bimodulus heterogeneous communication system wireless based on low-voltage power line and micropower
CN107886696B (en) * 2017-11-21 2020-03-27 珠海中慧微电子有限公司 Method for realizing meter reading by connecting wireless signal blind area nodes
CN109347736B (en) * 2018-09-27 2021-11-12 深圳友讯达科技股份有限公司 Dual-mode routing short address communication method, device and server
CN110191029B (en) * 2019-04-25 2022-01-07 深圳市国电科技通信有限公司 Wired and wireless based hybrid dual-mode networking method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018188477A1 (en) * 2017-04-10 2018-10-18 华为技术有限公司 Data transmission method and apparatus, power line communication network, and power system

Also Published As

Publication number Publication date
CN111262787A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
US9681356B2 (en) Data forwarding in hybrid mesh networks
US6704293B1 (en) Broadcast as a triggering mechanism for route discovery in ad-hoc networks
EP3228123B1 (en) Efficient hybrid resource and schedule management in time slotted channel hopping networks
US8005054B2 (en) Communication system, communication method, communication terminal device, control method thereof, and program
US7082114B1 (en) System and method for a wireless unit acquiring a new internet protocol address when roaming between two subnets
KR101961049B1 (en) Efficient centralized resource and schedule management in time slotted channel hopping networks
US20190289473A1 (en) Mesh islands
US20060285510A1 (en) Method and apparatus for transferring frames in extended wireless LAN
US7310761B2 (en) Apparatus and method for retransmitting data packets in mobile ad hoc network environment
CN112165725A (en) Message processing method and device
US20180176853A1 (en) Distributed reactive resource and schedule management in time slotted channel hopping networks
US9060322B2 (en) Method and system for preventing loops in mesh networks
JP2006166487A (en) Wireless bridge
EP3061276B1 (en) Distributed data transmission in data networks
EP0782802B1 (en) A method and apparatus for routing messages in a network of nodes
CN111510365B (en) Wi-Fi data packet-based device bridging cloud method, device and medium
TWI793361B (en) Independent redundant path discovery for bluetooth mesh
CN111884935B (en) Simplified protocol stack routing and neighbor discovery method applied to heaven-earth integrated network
CN111262787B (en) Data transmission method and electronic equipment
EP1250777A1 (en) Broadcast as a triggering mechanism for route discovery
CN106330723B (en) Discovery method and device of network neighbor equipment
CN106900174B (en) Data transmission method, device and system for wireless local area network mesh network
US20080279132A1 (en) Wireless Communication Device
EP1724968A2 (en) Method of transmitting and receiving data in a network environment with wired and wireless networks bridged using relay portal.
CN113169938B (en) Method for multi-channel discovery with partially disjoint paths

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 303-1, 303-3, 3rd Floor, Building 1, Courtyard No. 318, Huilongguan East Street, Changping District, Beijing 102206 (Changping Demonstration Park)

Patentee after: Core Semiconductor Technology (Beijing) Co.,Ltd.

Address before: 102206 b3-35-001 maker Plaza, 338 Huilongguan East Street, Changping District, Beijing

Patentee before: BEIJING SIGBEAN INFORMATION TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address