CN112311681B - Data transmission method and system - Google Patents

Data transmission method and system Download PDF

Info

Publication number
CN112311681B
CN112311681B CN201910703035.4A CN201910703035A CN112311681B CN 112311681 B CN112311681 B CN 112311681B CN 201910703035 A CN201910703035 A CN 201910703035A CN 112311681 B CN112311681 B CN 112311681B
Authority
CN
China
Prior art keywords
node
data
routing
transmitted
destination
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
CN201910703035.4A
Other languages
Chinese (zh)
Other versions
CN112311681A (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.)
CRRC Zhuzhou Institute Co Ltd
Original Assignee
CRRC Zhuzhou Institute 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 CRRC Zhuzhou Institute Co Ltd filed Critical CRRC Zhuzhou Institute Co Ltd
Priority to CN201910703035.4A priority Critical patent/CN112311681B/en
Publication of CN112311681A publication Critical patent/CN112311681A/en
Application granted granted Critical
Publication of CN112311681B publication Critical patent/CN112311681B/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/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/80Actions related to the user profile or the type of traffic
    • H04L47/801Real time traffic

Landscapes

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

Abstract

The method can realize the expansion of a new terminal node on the system by adding a new routing node in the system, configure a routing netlist through a main node, and issue the routing netlist to the routing node and the terminal node, so that each node in the system can clearly determine the connection relation between each node in the system.

Description

Data transmission method and system
Technical Field
The present application belongs to the field of data transmission technology, and in particular, to a data transmission method and system.
Background
The data transmission system comprises a plurality of devices (nodes), wherein the devices comprise a control device and a terminal device, the control device sends a control instruction to the terminal device to control the terminal device to perform corresponding processing, and because the connection relationship between the devices (nodes) in the system is fixed, the system needs to be greatly modified when a new terminal device needs to be added, and the problem that the system is difficult to expand due to the difficulty in realizing data transmission between the newly added device and other devices originally existing in the system exists.
Disclosure of Invention
In view of this, an object of the present application is to provide a data transmission method and system, which are used to solve the problem that it is difficult to expand the system in the prior art.
The technical scheme is as follows:
the application provides a data transmission method, which is applied to a data transmission system, wherein the data transmission system comprises a main node, a routing node and a terminal node, and the terminal node is connected with the main node through the routing node; the main node is used for configuring a routing netlist when the system is in an initialization state and sending the routing netlist to the routing node; the routing node is used for executing routing configuration operation after receiving a routing netlist and sending the routing netlist to the terminal node; the routing netlist comprises the attribute of each node in the system and the connection relation among the nodes, and the attribute of each node comprises the identifier of the node;
the method comprises the following steps:
when the system is in a working state, a source node sends data to be transmitted to a routing node connected with the source node, wherein the data to be transmitted comprises data content and an identifier of a destination node; the source node is a main node or any one terminal node, if the source node is the main node, the destination node is the terminal node, if the source node is the terminal node, the destination node is the main node or other terminal nodes different from the source node;
after receiving the data to be transmitted, the routing node determines whether a destination node corresponding to the identifier of the destination node is connected with the routing node according to the routing netlist;
and if the routing node receiving the data to be transmitted determines that the destination node corresponding to the identifier of the destination node is connected with the routing node, transmitting the data to be transmitted to the destination node corresponding to the identifier of the destination node.
Preferably, the method further comprises the following steps: and if the routing node receiving the data to be transmitted determines that the destination node corresponding to the identifier of the destination node is not connected with the routing node, transmitting the data to be transmitted to other routing nodes connected with the routing node, and transmitting the data to be transmitted to the destination nodes connected with other routing nodes by other routing nodes.
Preferably, the working state comprises a mailbox data transmission state and a process data transmission state;
if the system is in the process data transmission state, before the source node sends the data to be transmitted to the routing node connected with the source node, the method further includes:
the source node divides data to be transmitted into fast data and slow data;
and respectively allocating communication bandwidths for the fast data and the slow data through the proportion regulator so as to transmit the fast data and the slow data between the source node and the destination node according to the matched communication bandwidths.
Preferably, if the system is in the mailbox data transmission state, before the source node sends the data to be transmitted to the routing node connected to the source node, the method further includes: and the source node determines the type of the data to be transmitted based on the type of the application service so as to simultaneously send the type of the data to be transmitted and the data to be transmitted to the destination node.
Preferably, before the source node sends the data to be transmitted to the routing node connected to the source node in the system operating state, the method further includes:
and the main node sends a state switching instruction to enable the system to be in a working state.
The present application further provides a data transmission system, the system including:
a main node, a routing node and a terminal node;
the terminal node is connected with the main node through the routing node;
the master node is used for configuring a routing netlist when the system is in an initialization state and sending the routing netlist to the routing node;
the routing node is used for executing routing configuration operation after receiving a routing netlist and sending the routing netlist to the terminal node; the routing netlist comprises the attribute of each node in the system and the connection relation among the nodes, and the attribute of each node comprises the identifier of the node;
the main node and the terminal node are also used as source nodes for data transmission, and when the system is in a working state, the source nodes send data to be transmitted to the routing nodes connected with the source nodes, wherein the data to be transmitted comprises data contents and identification of a destination node; if the source node is a main node, the destination node is a terminal node, and if the source node is a terminal node, the destination node is a main node or other terminal nodes different from the source node;
the routing node is further configured to determine, after receiving the data to be transmitted, whether a destination node corresponding to the identifier of the destination node is connected to the routing node according to the routing netlist; and if the routing node determines that the destination node corresponding to the identifier of the destination node is connected with the routing node, sending the data to be transmitted to the destination node corresponding to the identifier of the destination node.
Preferably, the routing node is further configured to send the data to be transmitted to another routing node connected to the routing node if the routing node determines that the destination node corresponding to the identifier of the destination node is not connected to the routing node, and send the data to be transmitted to the destination node connected to another routing node by another routing node.
Preferably, the working state comprises a mailbox data transmission state and a process data transmission state;
if the system is in a process data transmission state, the source node is also used for dividing the data to be transmitted into fast data and slow data; and respectively allocating communication bandwidths for the fast data and the slow data through the proportion regulator so as to transmit the fast data and the slow data between the source node and the destination node according to the matched communication bandwidths.
Preferably, if the system is in the mailbox data transmission state, the source node is further configured to determine the type of the data to be transmitted based on the type of the application service, so as to send the type of the data to be transmitted and the data to be transmitted to the destination node at the same time.
Preferably, the master node is further configured to send a state switching instruction, so that the system is in an operating state.
Compared with the prior art, the technical scheme provided by the application has the following advantages:
according to the technical scheme, the new terminal node can be expanded on the system by adding the new routing node in the system, the routing netlist is configured through the master node, and the routing netlist is issued to the routing node and the terminal node, so that each node in the system can clearly determine the connection relation between each node in the system.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a data transmission method disclosed herein;
FIG. 2 is a schematic block diagram of a data transmission system disclosed herein;
FIG. 3 is a schematic diagram of an expanded system configuration of the system shown in FIG. 2 according to the present disclosure;
FIG. 4 is a schematic diagram of a seven-layer communication model;
FIG. 5 is a schematic block diagram of a three-tier communication model as disclosed herein;
FIG. 6 is a functional block diagram of the three-tier communication model disclosed herein;
FIG. 7 is a flow chart of a data transmission method of the system disclosed herein in a process data transmission state;
FIG. 8 is a schematic diagram of a process data frame disclosed herein;
FIG. 9 is a flow chart of a method for data transmission in a mailbox data transmission state for a system as disclosed herein;
FIG. 10 is a schematic diagram of a mailbox data frame as disclosed herein;
FIG. 11 is a schematic structural diagram of an application layer extension according to the present application;
fig. 12 is a schematic diagram of a control command frame disclosed herein.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The application provides a data transmission method, which is applied to a system consisting of a main node, a routing node and a terminal node and is used for realizing data transmission between the main node and the terminal node or between the terminal node and other terminal nodes. And the terminal node is connected with the main node through the routing node. The master node is used for configuring a routing netlist when the system is in an initialization state, the routing netlist comprises the attribute of each node in the system and the connection relation among the nodes, and the attribute of each node comprises a node identification. And after the main node configures a routing netlist, sending the routing netlist to the routing node. And the routing node executes a routing configuration operation after receiving a routing netlist, and sends the routing netlist to the terminal node. By issuing the routing netlist configured by the master node to each routing node and each terminal node, the master node, each routing node and each terminal node in the system can make clear the connection relationship among the nodes included in the system, so as to realize data transmission among the nodes based on the connection relationship.
Referring to fig. 1, a data transmission method provided in an embodiment of the present application may include the following steps:
s101, when a system is in a working state, a source node sends data to be transmitted to a routing node connected with the source node, wherein the data to be transmitted comprises data content and an identification of a destination node; the source node is a master node or any one terminal node, if the source node is the master node, the destination node is the terminal node, and if the source node is the terminal node, the destination node is the master node or other terminal nodes different from the source node.
The system in this embodiment may include two states, one being an initialization state and the other being an operational state. The configuration operation of the routing netlist is performed when the system is in an initialization state, and data transmission between a source node and a destination node cannot be achieved in the state. And when the system is in a working state, the data transmission operation is executed, so that the data transmission between the source node and the destination node is realized.
The nodes included in the system are divided into three classes, namely a Master node (Master node), a routing node (Router node) and an End node (End node). One system only has one main node, but one system can comprise a plurality of routing nodes and a plurality of terminal nodes, wherein each terminal node realizes the connection with the main node through the routing node. The number of the End node in the system can be expanded by increasing the Router node, and the method has good expansibility.
As shown in fig. 2, the system includes a master node, a routing node, and two end nodes. On this basis, if it is desired to expand the number of end nodes, routing nodes are added in the system and the end nodes are expanded by the added routing nodes. As shown in fig. 3, the expanded system includes a master node 1001, two routing nodes, namely routing node 2001 and routing node 2002, and three end nodes, namely end node 3001, end node 3002, and end node 3003, that is, the number of end nodes included in the expanded system is realized by adding routing nodes. It should be noted that the number of terminal nodes that each routing node can extend may be determined according to the processing capability of the routing node, and the number of terminal nodes that a routing node can extend is not limited in this embodiment.
The Master node functions as: configuring and maintaining a routing netlist when the system is in an initialization state; sending a system state switching instruction to realize state switching of the system between an initialization state and a working state; and respectively carrying out data transmission with the routing node and the terminal node.
The Router node functions as: the method comprises the steps of receiving a routing netlist sent by a main node, receiving a system state switching instruction sent by the main node, receiving data to be transmitted and forwarding the data to be transmitted, and enabling a routing node to serve as a terminal node with a routing function.
The routing netlist comprises the attributes of each node in the system and the connection relation among the nodes. The attribute of each node includes a node identifier (device _ id), a node type (device _ type), and a node identifier (device _ child _ id) of a child node included in the node. Wherein the attribute values of all three nodes cannot be 0.
device _ id represents the uniqueness of a node, and each node (device) is set when leaving a factory;
the device _ type represents a node type, 0x1 represents that the node is a Master node, 0x2 represents that the node is a Router node, and 0x3 represents that the node is an End node;
the device _ chip _ id represents a node identifier (device _ id) of a child node under the node, wherein only one device _ chip _ id can be included under the master node, a plurality of device _ chip _ ids can be included under the Router node, and device _ chip _ id cannot be included under the End node. That is, a sub-node can be provided under a main node, a plurality of sub-nodes can be provided under each routing node, and sub-nodes cannot be provided under each terminal node.
The function of the End node is: and receiving a system state switching instruction sent by the main node, and carrying out data transmission with the main node, the routing node and other terminal nodes.
When data transmission is carried out, a source node and a destination node are defined according to the data transmission direction, wherein the source node refers to a node of a data sending end, and the destination node refers to a node of a data receiving end.
In practical applications, the source node and the destination node are different in different scenarios.
If the control instruction of the master node needs to be sent to the corresponding terminal node in the scene of issuing the control instruction, the source node is the master node and the destination node is the terminal node in the scene;
in a scene that a terminal node feeds back a processing result, the processing result of the terminal node needs to be sent to a master node, and a source node is the terminal node and a destination node is the master node in the scene;
in a scene that a dependency relationship exists between two terminal nodes, a processing result of a previous terminal node needs to be sent to a next terminal node, and a source node is the previous terminal node and a destination node is the next terminal node in the scene.
Whether the source node is a master node or a terminal node, and the corresponding destination node is a terminal node, or a master node or a terminal node, data transmission between the source node and the destination node needs to pass through the routing node. When the system realizes data transmission between a source node and a destination node in a working state, the source node sends data to be transmitted to a routing node connected with the source node, the data to be transmitted at least comprises data content and an identifier of the destination node, and the destination node can be uniquely determined through the identifier of the destination node. When the destination node is a master node or a terminal node, after the source node sends the data to be transmitted to the routing node, the routing node executes corresponding operations to send the data to be transmitted to the destination node. The following describes operations performed by the routing node after receiving data to be transmitted.
And S102, after the routing node receives the data to be transmitted, determining whether a destination node corresponding to the identification of the destination node is connected with the routing node according to the routing netlist.
If the routing node receiving the data to be transmitted determines that the destination node corresponding to the identifier of the destination node is connected with the routing node, executing step S103;
if the routing node receiving the data to be transmitted determines that the destination node corresponding to the identifier of the destination node is not connected to the routing node, step S104 is executed.
The system can comprise a main node, a plurality of routing nodes and a plurality of terminal nodes, and the connection relation between each routing node and the main node and the connection relation between each terminal node and each routing node can be determined according to the connection relation between each node in the routing netlist.
For a destination node, the destination node may be directly connected to the routing node that receives the data to be transmitted, and in this case, the routing node that receives the data to be transmitted may directly send the data to be transmitted to the corresponding destination node;
the destination node may also be connected to the routing node that receives the data to be transmitted through other routing nodes, and in this case, the routing node that receives the data to be transmitted needs to send the data to be transmitted to other routing nodes connected to the destination node, and then send the data to be transmitted to the corresponding destination node through other routing nodes.
S103, the data to be transmitted is sent to the destination node corresponding to the identification of the destination node.
Referring to fig. 3, if the routing node 2001 receives the data to be transmitted sent by the master node, and an identifier of a destination node included in the data to be transmitted is 3001, the routing node 2001 determines that the destination node 3001 is directly connected to itself, and thus directly sends the data to be transmitted to the destination node 3001.
S104, sending the data to be transmitted to other routing nodes connected with the routing node, and sending the data to be transmitted to destination nodes connected with other routing nodes by other routing nodes.
Referring to fig. 3, if the routing node 2001 receives data to be transmitted sent by the master node, and an identifier of a destination node included in the data to be transmitted is 3003, the routing node 2001 determines that the destination node 3003 is not directly connected to itself, so that the routing node 2001 sends the data to be transmitted to the routing node 2002, and the routing node 2002 determines that the destination node 3003 is directly connected to itself, so that the routing node 2002 sends the data to be transmitted to the destination node 3003.
Through the technical scheme, the system in the embodiment comprises the main node, the routing nodes and the terminal nodes, the terminal nodes can be connected with the main node through the routing nodes, so that a plurality of new terminal nodes directly connected with the newly-added routing nodes can be expanded through the newly-added routing nodes in the system, the main node configures a routing netlist under an initialization state, the routing netlist comprises the attributes of each node in the system and the connection relation among the nodes, and the main node configures the routing netlist and then issues the routing netlist to each routing node and each terminal node; when the system is in a working state to transmit data between nodes, a source node sends data to be transmitted to a routing node connected with the source node, wherein the data to be transmitted comprises data content and an identification of a destination node; after the routing nodes receive all the data to be transmitted, whether the destination node corresponding to the identification of the destination node is connected with the routing node can be determined according to the routing netlist, if the routing node determines that the destination node is connected with the routing node, the data to be transmitted is sent to the destination node, data transmission between a source node and the destination node in the system is completed, and system expansion is achieved. Therefore, in the embodiment of the application, by adding a new routing node in the system, the expansion of a new terminal node can be realized from the system structure, and configuring a routing netlist through the master node, and issuing the routing netlist to the routing node and the terminal node, so that each node in the system can make clear the connection relationship among all nodes in the system.
In practical application, data transmission between a source node and a destination node is realized based on a communication model. Referring to fig. 4, the existing communication model is seven layers, which specifically includes: physical layer, data link layer, network layer, transport layer, session layer, presentation layer, application layer.
When data transmission is performed based on a seven-layer communication model, communication protocols of each layer need to be met, a lot of processor resources need to be consumed, and an international standard of ethernet, such as IEEE802.3, is taken as an example, a physical layer and a data link layer are often bound together, hardware requirements of the data link layer and the physical layer are defined, data transmission can be realized only under the condition that specific hardware requirements are met, otherwise, data transmission cannot be realized. It can be seen that the manner of implementing data transmission based on the seven-layer communication model is complex, and due to the hardware condition and the limitation of processor resources, it is difficult to implement data transmission between nodes in some cases, such as the case where the nodes are embedded processors with weak processing capability and the case where there is no specific hardware between nodes.
In view of this, the embodiment of the present application provides a new communication model, which has a three-layer structure, as shown in fig. 5, and specifically includes: physical interface layer, transmission network layer and application layer.
Referring to table 1, the definitions, specifications and requirements of each layer in the three-layer structure are described.
TABLE 1
Figure BDA0002151343810000101
The system in the embodiment of the application comprises an initialization State (Initial State) and a working State, wherein the working State comprises a Mailbox Data State (Mailbox Data State) and a Process Data State (Process Data State).
The initialization state is used for transmitting an initialization instruction, configuring and maintaining a routing netlist, and sending a system state switching instruction to realize switching between the initialization state and the working state of the system;
the working state is used for data transmission, wherein the process data transmission state is used for transmitting process data in the application data; the mailbox data transmission state is used for transmitting mailbox data in the application data.
Corresponding to table 1 above, the functional structure of the three-layer communication model is shown in fig. 6.
The physical interface layer CAN support interfaces such as CAN, SPI, 485, TI UPP and the like, so that no special requirements exist on hardware of each node.
The transmission network layer supports the transmission of data between the main node, the routing node and the terminal node in different data frames when the system is in different working states. The working state of the system comprises a process data transmission state and a mailbox data transmission state. If the system is in the Process Data transmission state, transmitting the Process Data through a Process Data Interface (Process Data Interface) and a Process Data frame; and if the system is in a MailBox data transmission state, carrying out MailBox data transmission through a MailBox data Interface (MailBox Interface) and a MailBox data frame.
The following describes in detail a scheme of the system for implementing data transmission between different nodes based on a three-layer communication model.
The data transmission between the nodes of the system in the application is based on three data frames for transmitting data in total, the three data frames are respectively a control command frame, a process data frame and a mailbox data frame, and the formats of the three data frames are shown in table 2.
TABLE 2
Figure BDA0002151343810000111
The data frame type in the message header is divided into three types, if the data frame type is 0x30, the data frame is indicated as a control command frame; if the data frame type is 0x31, the data frame is a process data frame, and if the data frame type is 0x32, the data frame is a mailbox data frame.
The destination address in the header of the packet refers to a node identifier of the destination node, that is, a node identifier corresponding to the node receiving the data to be transmitted.
The source address in the header refers to a node identifier of the source node, that is, a node identifier corresponding to the node that sends the data to be transmitted.
Included in the data area is the data content of the data to be transmitted, i.e. the data content that is substantially to be transmitted.
It should be noted that although the formats of the three data frames are shown in table 2, the data area and/or the control area have differences among the different kinds of data frames.
Referring to fig. 7, if the system is in a process data transmission state, the data transmission method disclosed in this embodiment may include the following steps:
s701, the source node divides data to be transmitted into fast data and slow data.
In the communication process, due to the limitation of bandwidth, fast data and slow data exist simultaneously when data transmission is carried out between nodes, the fast data refers to data with high real-time requirement, and the data meeting the requirement refers to data with relatively low real-time requirement.
In the prior art, when data transmission is carried out, fast data and slow data are mixed together for transmission, and the real-time property of the fast data cannot be guaranteed.
In contrast, in the embodiment of the present application, the process data is transmitted by the system in the process data transmission state, and before the process data is transmitted, the process data to be transmitted is divided into fast data and slow data according to the requirement on real-time performance.
S702, respectively allocating communication bandwidths for the fast data and the slow data through the proportion regulator so as to transmit the fast data and the slow data between the source node and the destination node according to the matched communication bandwidths.
After dividing into the fast data and the slow data, allocating communication bandwidths for the fast data and the slow data according to the proportion regulator, so that the fast data and the slow data are respectively transmitted according to the communication bandwidths allocated for the fast data and the slow data when data transmission is carried out. The real-time requirement of the fast data is met, and meanwhile, the bandwidth is utilized to the maximum extent.
S703, the source node sends data to be transmitted to a routing node connected with the source node, wherein the data to be transmitted comprises data content and an identifier of a destination node; the source node is a master node or any one terminal node, if the source node is the master node, the destination node is the terminal node, and if the source node is the terminal node, the destination node is the master node or other terminal nodes different from the source node.
In this embodiment, the data to be transmitted is process data, and the source node sends the process data to be transmitted to the routing node connected to the source node based on the format of the process data frame.
Referring to fig. 8, a format of a process data frame in the present embodiment is shown.
The Type in the process data frame is a data frame Type, and the content of the data frame Type is 0x31.
And the destination in the process data frame is a destination address, and the content of the destination address is a node identifier of the destination node.
In the process data frame, source is a Source address, and the content of the Source address is the node identification of the Source node.
Cx in the process data frame is the first two bytes of the control area and represents the proportion of the fast data, and the content of Cx is the proportion of the communication bandwidth allocated for the fast data to the total communication bandwidth obtained after the step S702 is executed; cy is two bytes after the control area, and represents the slow data ratio, and the content of Cy is the ratio of the communication bandwidth allocated for the slow data to the total communication bandwidth obtained by executing step S702. The occupation ratio refers to the proportion of occupied communication bandwidth in the total communication bandwidth when data is transmitted.
Fast Data and Slow Data in the process Data frame are Data areas, fast Data is Fast Data obtained by performing the division after step S701, and Slow Data is Slow Data obtained by performing the division after step S701.
And the CheckSum in the process data frame is used for verifying the transmitted process data.
S704, after receiving the data to be transmitted, the routing node determines whether a destination node corresponding to the identifier of the destination node is connected with the routing node according to the routing netlist;
if the routing node receiving the data to be transmitted determines that the destination node corresponding to the identifier of the destination node is connected with the routing node, executing step S705;
if the routing node receiving the data to be transmitted determines that the destination node corresponding to the identifier of the destination node is not connected to the routing node, step S706 is executed.
S705, the data to be transmitted is sent to the destination node corresponding to the identification of the destination node.
S706, the data to be transmitted is sent to other routing nodes connected with the routing node, and the data to be transmitted is sent to destination nodes connected with other routing nodes by other routing nodes.
Referring to fig. 9, if the system is in the mailbox data transmission state, the data transmission method disclosed in this embodiment may include the following steps:
s901, determining the type of the data to be transmitted based on the type of the application service, so as to send the type of the data to be transmitted and the data to be transmitted to a destination node at the same time.
The types of application services supported by the system in this embodiment include file transfer, threshold setting, version transfer, program download, fault reporting, and parameter setting. See table 3 for service names corresponding to the above application service types and corresponding numbers and descriptions.
TABLE 3
Serial number Service name Number of Description of the invention
1 File transfer request 0x31 For initiating a file transfer request
2 File data download 0x32 Transferring file data to a device
3 File data upload 0x33 Transferring file data from a device to another device
4 File transfer termination 0x34 For terminating file transfers
5 Version number transfer request 0x40 For transmission of version numbers
6 Threshold value setting 0x41 Threshold setting for hardware protection
7 Program download 0x42 For node device program download
8 Parameter setting 0x43 For node equipment parameter setting
9 Fault code message 0x7F Reporting for exceptions
And determining the service type corresponding to the service according to the service to be realized by the mailbox data to be transmitted currently, and determining the number corresponding to the service type based on the table 3.
S902, a source node sends data to be transmitted to a routing node connected with the source node, wherein the data to be transmitted comprises data content and an identifier of a destination node; the source node is a master node or any one terminal node, if the source node is the master node, the destination node is the terminal node, and if the source node is the terminal node, the destination node is the master node or other terminal nodes different from the source node.
In this embodiment, the data to be transmitted is mailbox data, and the source node sends the mailbox data to be transmitted to the routing node connected to the source node based on the format of the mailbox data frame.
Referring to fig. 10, a format of a mailbox data frame in the present embodiment is shown.
The Type in the mailbox data frame is a data frame Type, and the content of the data frame Type is 0x32.
And the destination in the mailbox data frame is a destination address, and the content of the destination address is the node identification of the destination node.
And the Source in the mailbox data frame is a Source address, and the content of the Source address is the node identification of the Source node.
The MailBox Data in the MailBox Data frame is a Data area. The MailBox Data divides the Data content in the MailBox Data area, and the partitions are shown in table 4 below.
TABLE 4
Figure BDA0002151343810000151
And the CheckSum in the mailbox data frame is used for checking the transmitted mailbox data.
Fig. 11 is a schematic diagram illustrating a structure for expanding an application layer. The bottom layer is a mailbox data layer, and the layer corresponds to data in a mailbox data frame format as shown in fig. 10; the middle layer is a first application layer, the middle layer corresponds to Data after dividing the Data area in the mailbox Data frame shown in the table 4, srvNo is a Service type number, framNo is a message serial number, dataLen is a Service Data length, service Content Data is a Service Data Content, and checkSum is a check code; the highest layer is a second application layer, and the layer corresponds to the type of the application service.
The communication model in this embodiment has rich extensibility, and can extend the application layer shown in fig. 5 to the structure shown in fig. 11, and can support multiple application services.
S903, after the routing node receives the data to be transmitted, determining whether a destination node corresponding to the identifier of the destination node is connected with the routing node according to the routing netlist;
if the routing node receiving the data to be transmitted determines that the destination node corresponding to the identifier of the destination node is connected to the routing node, executing step S904;
if the routing node receiving the data to be transmitted determines that the destination node corresponding to the identifier of the destination node is not connected to the routing node, step S905 is executed.
And S904, sending the data to be transmitted to a destination node corresponding to the identifier of the destination node.
S905, the data to be transmitted is sent to other routing nodes connected with the routing node, and the data to be transmitted is sent to destination nodes connected with the other routing nodes by the other routing nodes.
It should be noted that after the system is powered on, the system is in an initialization state, after the master node performs configuration of the routing netlist, the master node issues the routing netlist to the routing nodes and the terminal nodes, and then the master node sends a state switching instruction, so that the system is switched from the initialization state to a working state, and then the data transmission process shown in fig. 7 or 9 is executed.
The main node sends the routing netlist and sends the state switching instruction, and data transmission is carried out based on the format of the control command frame.
Referring to fig. 12, a format of a control command frame in the present embodiment is shown.
The Type in the control command frame is a data frame Type, and the content of the data frame Type is 0x30.
And the destination in the control command frame is a destination address, and the content of the destination address is the node identification of the destination node.
And the Source in the control command frame is a Source address, and the content of the Source address is the node identification of the Source node.
The State Change Command in the control Command frame is a control area, and the content in the control area is a coded value of a State switching instruction or a coded value issued by the routing netlist. Wherein 0x300 represents that the current control command is issued by the routing netlist, 0x320 represents that the current control command is switched to the mailbox data state, 0x321 represents that the current control command is switched to the process data state, and 0x322 represents that the current control command is switched to the initialization state.
The CheckSum in the process data frame is used to check the transmitted process data.
One specific scenario is that the routing netlist configured by the master node is:
<tag>
<tag>
<device_id>1001</device_id>
<device_type>0x1</device_type> /*Master*/
<device_child_id>2001</device_child_id>
</tag>
<tag>
<device_id>2001</device_id>
<device_type>0x2</device_type> /*Router*/
<device_child_id>3001</device_child_id>
<device_child_id>2002</device_child_id>
</tag>
<tag>
<device_id>2002</device_id>
<device_type>0x2</device_type> /*Router*/
<device_child_id>3002</device_child_id>
<device_child_id>3003</device_child_id>
</tag>
<tag>
<device_id>3001</device_id>
<device_type>0x3</device_type> /*End*/
</tag>
<tag>
<device_id>3002</device_id>
<device_type>0x3</device_type> /*End*/
</tag>
<tag>
<device_id>3003</device_id>
<device_type>0x3</device_type> /*End*/
</tag>
</tag>
referring to fig. 3, a node identifier 1001 of a master node and a node identifier 2001 of a child node of the master node included in the system are illustrated, that is, 2001 is directly connected 1001.
The system includes two routing nodes, a first routing node having a node identifier of 2001 and a second routing node having a node identifier of 2002. Wherein, there are two child nodes under the first routing node 2001, and the node identifiers of the two child nodes are 3001 and 2002 respectively; there are two child nodes under the second routing node 2002, the nodes of which are identified as 3002, 3003.
The system comprises three terminal nodes, and the node identifications of the three terminal nodes are 3001, 3002 and 3003 respectively.
That is, the master node 1001 in the system is directly connected to the first routing node 2001; the first routing node 2001 is directly connected to the first end node 3001 and the second routing node 2002, respectively; the second routing node 2002 is directly connected to the second end node 3002 and the third end node 3003, respectively.
The realization process of data transmission between nodes in the system is as follows:
firstly, a system is powered on, the system is in an initialization state, a Master node (id = 1001) in the initialization state performs configuration operation on a routing netlist, and the Master node issues the routing netlist to the routing netlist through a control command frame, wherein the content in a control area in the control command frame is 0x300. And after receiving the routing netlist, the Router node (id = 2001) performs routing configuration and transmits the routing netlist to the Router node (id = 2002) and the End node (id = 3001), and after receiving the routing netlist, the Router node (id = 2002) performs routing configuration and transmits the routing netlist to the End node (id = 3002) and the End node (id = 3003).
Then, the Master node (id = 1001) sends a state switching instruction through a control command frame, wherein the content in a control area in the control command frame is 0x320 or 0x321, so that the system enters a working state (mailbox data transmission state or process data transmission state); in the Process Data transmission state, the system receives and transmits Process Data; and the system receives and transmits MailBox Data MailBox Data in the MailBox Data transmission state.
The data transmission process specifically comprises the following steps: when the End node (id = 3001) sends data to the End node (id = 3002), the End node (id = 3001) firstly sends the data to the Router node (id = 2001), the Router node (id = 2001) judges whether a node with id =3002 is directly connected with the Router node through the routing netlist, if the Router node (id = 2001) judges that the node with id =3002 is not directly connected with the Router node, the Router node (id = 2001) forwards the data to the Router node (id = 2002), after receiving the data, the Router node (id = 2002) judges whether a node with id =3002 is directly connected with the Router node through the routing netlist, and if the Router node (id = 2002) judges that a node with id =3002 is directly connected with the Router node, the data is directly sent to the End node (id = 3002).
Corresponding to the data transmission method disclosed in the foregoing embodiment, an embodiment of the present application provides a data transmission system, including:
a host node, a routing node and a terminal node;
the terminal node is connected with the main node through the routing node;
the master node is used for configuring a routing netlist when the system is in an initialization state and sending the routing netlist to the routing node;
the routing node is used for executing routing configuration operation after receiving a routing netlist and sending the routing netlist to the terminal node; the routing netlist comprises the attribute of each node in the system and the connection relation among the nodes, and the attribute of each node comprises the identifier of the node;
the main node and the terminal node are also used as source nodes for data transmission, and the source nodes send data to be transmitted to the routing nodes connected with the source nodes when the system is in a working state, wherein the data to be transmitted comprises data contents and identification of a destination node; if the source node is a main node, the destination node is a terminal node, and if the source node is a terminal node, the destination node is a main node or other terminal nodes different from the source node;
the routing node is further configured to determine, after receiving the data to be transmitted, whether a destination node corresponding to the identifier of the destination node is connected to the routing node according to the routing netlist; and if the routing node determines that the destination node corresponding to the identifier of the destination node is connected with the routing node, sending the data to be transmitted to the destination node corresponding to the identifier of the destination node.
The system comprises a main node, at least one routing node and at least one terminal node.
Assuming that the system includes a MASTER node, a routing node and two END nodes, referring to fig. 2, MASTER is the MASTER node, route is the routing node, and END is the END node.
Assuming that the system includes a master node, two routing nodes and three end nodes, the structure of the system is shown in fig. 3.
And the routing node is further configured to send the data to be transmitted to other routing nodes connected to the routing node if the routing node determines that the destination node corresponding to the identifier of the destination node is not connected to the routing node, and send the data to be transmitted to destination nodes connected to other routing nodes by other routing nodes.
Through the technical scheme, in the embodiment, by adding a new routing node in the system, the expansion of a new terminal node can be realized from the system structure, and configuring a routing netlist through the master node, and issuing the routing netlist to the routing node and the terminal node, so that each node in the system can clearly determine the connection relationship between each node in the system, when data transmission is realized, a source node performs data forwarding through the routing node, data can be sent to a corresponding destination node, the expansion of the new terminal node is realized from the system function, and the expansion of the system can be realized without greatly changing the connection relationship between each node in the original system.
Optionally, in other embodiments, the working state includes a mailbox data transmission state and a process data transmission state;
if the system is in a process data transmission state, the source node is also used for dividing the data to be transmitted into fast data and slow data; and respectively allocating communication bandwidths for the fast data and the slow data through the proportion regulator so as to transmit the fast data and the slow data between the source node and the destination node according to the matched communication bandwidths.
In this embodiment, after dividing the data content in the data to be transmitted into the fast data and the slow data, allocating communication bandwidths for the fast data and the slow data according to the scale adjuster, so that the fast data and the slow data are respectively transmitted according to the communication bandwidths allocated for the fast data and the slow data when data transmission is performed. The real-time requirement of the fast data is met.
Optionally, in other embodiments, if the system is in a mailbox data transmission state, the source node is further configured to determine a type of data to be transmitted based on the type of the application service, so as to send the type of the data to be transmitted and the data to be transmitted to the destination node at the same time.
In this embodiment, a plurality of different application services are supported.
The main node is further configured to send a state switching instruction, so that the system is in a working state.
The data transmission system disclosed by the application can be used for dynamic expansion of the nodes of the traction control equipment, so that the dynamic expansion of the nodes is realized on the basis of not needing to make great improvement on the system.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present invention is not limited by the illustrated ordering of acts, as some steps may occur in other orders or concurrently with other steps in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and reference may be made to the partial description of the method embodiment for relevant points.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and amendments can be made without departing from the principle of the present invention, and these modifications and amendments should also be considered as the protection scope of the present invention.

Claims (8)

1. A data transmission method is characterized in that the method is applied to a data transmission system, the data transmission system comprises a main node, a routing node and a terminal node, and the terminal node is connected with the main node through the routing node; the method comprises the steps that a new terminal node is expanded on the system by adding a routing node in the system, and the main node is used for configuring a routing netlist when the system is in an initialization state and sending the routing netlist to the routing node; the routing node is used for executing routing configuration operation after receiving a routing netlist and sending the routing netlist to the terminal node; the routing netlist comprises the attribute of each node in the system and the connection relation among the nodes, and the attribute of each node comprises the identifier of the node;
the method comprises the following steps:
when the system is in a working state, a source node sends data to be transmitted to a routing node connected with the source node, wherein the data to be transmitted comprises data content and an identifier of a destination node; the source node is a main node or any one terminal node, if the source node is the main node, the destination node is the terminal node, if the source node is the terminal node, the destination node is the main node or other terminal nodes different from the source node;
after receiving the data to be transmitted, the routing node determines whether a destination node corresponding to the identifier of the destination node is connected with the routing node according to the routing netlist;
if the routing node receiving the data to be transmitted determines that the destination node corresponding to the identifier of the destination node is connected with the routing node, transmitting the data to be transmitted to the destination node corresponding to the identifier of the destination node;
the data transmission between the source node and the destination node is realized based on a three-layer communication model, wherein the three-layer communication model comprises the following steps: a physical interface layer, a transport network layer and an application layer;
the working state comprises a mailbox data transmission state and a process data transmission state;
if the system is in a process data transmission state, performing process data transmission through a process data interface and a process data frame, specifically, before the source node sends data to be transmitted to a routing node connected to the source node, the method further includes:
the source node divides data to be transmitted into fast data and slow data;
and respectively allocating communication bandwidths for the fast data and the slow data through the proportion regulator so as to transmit the fast data and the slow data between the source node and the destination node according to the matched communication bandwidths.
2. The method of claim 1, further comprising: and if the routing node receiving the data to be transmitted determines that the destination node corresponding to the identifier of the destination node is not connected with the routing node, transmitting the data to be transmitted to other routing nodes connected with the routing node, and transmitting the data to be transmitted to the destination nodes connected with other routing nodes by other routing nodes.
3. The method of claim 1, wherein if the system is in the mailbox data transmission state, before the source node sends the data to be transmitted to the routing node connected to the source node, the method further comprises: and the source node determines the type of the data to be transmitted based on the type of the application service so as to simultaneously send the type of the data to be transmitted and the data to be transmitted to the destination node.
4. The method according to claim 3, wherein before the source node sends the data to be transmitted to the routing node connected to the source node when the system is in an operating state, the method further comprises:
and the main node sends a state switching instruction to enable the system to be in a working state.
5. A data transmission system, the system comprising:
a host node, a routing node and a terminal node; the method comprises the steps that a new terminal node is expanded on the system by adding a routing node in the system;
the terminal node is connected with the main node through the routing node;
the master node is used for configuring a routing netlist when the system is in an initialization state and sending the routing netlist to the routing node;
the routing node is used for executing routing configuration operation after receiving a routing netlist and sending the routing netlist to the terminal node; the routing netlist comprises the attribute of each node in the system and the connection relation among the nodes, and the attribute of each node comprises the identifier of the node;
the main node and the terminal node are also used as source nodes for data transmission, and when the system is in a working state, the source nodes send data to be transmitted to the routing nodes connected with the source nodes, wherein the data to be transmitted comprises data contents and identification of a destination node; if the source node is a main node, the destination node is a terminal node, and if the source node is a terminal node, the destination node is a main node or other terminal nodes different from the source node;
the routing node is further configured to determine, after receiving the data to be transmitted, whether a destination node corresponding to the identifier of the destination node is connected to the routing node according to the routing netlist; if the routing node determines that a destination node corresponding to the identifier of the destination node is connected with the routing node, sending the data to be transmitted to the destination node corresponding to the identifier of the destination node;
the data transmission between the source node and the destination node is realized based on a three-layer communication model, wherein the three-layer communication model comprises the following steps: a physical interface layer, a transport network layer and an application layer;
the working state comprises a mailbox data transmission state and a process data transmission state;
if the system is in a process data transmission state, the source node is also used for dividing the data to be transmitted into fast data and slow data; and respectively allocating communication bandwidths for the fast data and the slow data through the proportion regulator so as to transmit the fast data and the slow data between the source node and the destination node according to the matched communication bandwidths.
6. The system according to claim 5, wherein the routing node is further configured to send the data to be transmitted to another routing node connected to the routing node if the routing node determines that the destination node corresponding to the identifier of the destination node is not connected to the routing node, and send the data to be transmitted to a destination node connected to another routing node by another routing node.
7. The system of claim 5, wherein if the system is in the mailbox data transmission state, the source node is further configured to determine a type of data to be transmitted based on the type of the application service, so as to send the type of data to be transmitted and the data to be transmitted to the destination node at the same time.
8. The system of claim 7, wherein the master node is further configured to send a state switch command to enable the system to be in an operational state.
CN201910703035.4A 2019-07-31 2019-07-31 Data transmission method and system Active CN112311681B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910703035.4A CN112311681B (en) 2019-07-31 2019-07-31 Data transmission method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910703035.4A CN112311681B (en) 2019-07-31 2019-07-31 Data transmission method and system

Publications (2)

Publication Number Publication Date
CN112311681A CN112311681A (en) 2021-02-02
CN112311681B true CN112311681B (en) 2023-01-20

Family

ID=74486180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910703035.4A Active CN112311681B (en) 2019-07-31 2019-07-31 Data transmission method and system

Country Status (1)

Country Link
CN (1) CN112311681B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201248050Y (en) * 2008-08-29 2009-05-27 南京达智通信技术有限责任公司 Self-organizing wireless sensor network
CN102271368A (en) * 2011-07-27 2011-12-07 哈尔滨工业大学深圳研究生院 Cross-layer-resource-optimization-based space-sky information network information transmission method and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102026329B (en) * 2009-09-10 2013-10-30 富士通株式会社 Wireless communication network and self-adaptive route selecting communication method thereof
CN102695204A (en) * 2012-04-24 2012-09-26 北京讯风光通信技术开发有限责任公司 Business control method used in industrial wireless network, and system thereof
CN106792967B (en) * 2016-12-21 2020-02-21 江苏麦希通讯技术有限公司 Low-power-consumption network construction method based on spread spectrum technology
GB201706475D0 (en) * 2017-04-24 2017-06-07 Microsoft Technology Licensing Llc Communications network node
CN108055205A (en) * 2018-01-26 2018-05-18 武汉理工大学 It is used to implement the Routing Protocol and method for routing of VDES

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201248050Y (en) * 2008-08-29 2009-05-27 南京达智通信技术有限责任公司 Self-organizing wireless sensor network
CN102271368A (en) * 2011-07-27 2011-12-07 哈尔滨工业大学深圳研究生院 Cross-layer-resource-optimization-based space-sky information network information transmission method and system

Also Published As

Publication number Publication date
CN112311681A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
US8767607B2 (en) Method and apparatus for performing multicast in communications network
US7944913B2 (en) Node, communication method, and program for node
CN104333511B (en) Determine the method, apparatus and system of service transmission path
CN114389946B (en) Network configuration management method for TSN switch
CN101552785B (en) CAN bus communication method based on message mechanism used for massive data transmission
CN112532756B (en) Interface expansion method, device and system
EP2458825A1 (en) Method of creating a functional arrangement of a wireless mesh network of communication devices with packet message transmission and routing packet message transmission in such a network
CN103067278B (en) A kind of method for transmission processing of Frame, equipment and system
CN113765825B (en) Planning method and system architecture for chained service flow scheduling
CN104734930B (en) Method and device for realizing access of Virtual Local Area Network (VLAN) to Variable Frequency (VF) network and Fiber Channel Frequency (FCF)
CN105264862A (en) Filtering at lower network protocol layers
CN112311681B (en) Data transmission method and system
CN106657377B (en) A kind of WIA-PA/ interconnects manufacture network information service adapter and implementation method entirely
CN107181614B (en) Wifi network, networking method thereof and data transmission method
CN104009937A (en) Enhanced-transmission-selection configuration information transmission method and device
CN109347734A (en) A kind of file transmitting method, device, the network equipment and computer-readable medium
CN101895560B (en) Fieldbus DP-NET with open two-stage topological structure
CN101483587A (en) Method, network node and network system for determining interface effective Tag set
CN113994649A (en) Method, device, equipment and storage medium for accessing BLE Mesh equipment
CN102821055A (en) Method for inter-board communication
US11974221B2 (en) Method and device for creating transmission network sub-slice, and system and storage medium
CN106713142A (en) Method for transmitting IP message on CAN bus and IP local area network (LAN) built by using CAN bus network
WO2022087795A1 (en) Resource mapping method and apparatus, device, and storage medium
CN110830295B (en) Equipment management method and system
CN116018785A (en) Method for operating a network

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