Data transmission method and device, data message, node equipment and readable storage medium

By using loopback identifiers in data packets to control the transmission method of data packets and update the node address, flexible data transmission is achieved, solving the problems of low data interaction efficiency and waste of bandwidth in the existing technology, and improving transmission efficiency and resource utilization.

CN119211102APending Publication Date: 2024-12-27SHENZHEN INOVANCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411308047.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing industrial wired communication data transmission methods have problems such as low data interaction efficiency and waste of bandwidth resources. The response time of one-way transmission methods is uncontrollable. The loopback transmission method will cause waste of bandwidth resources without loopback.

Method used

By adding a loopback identifier to the data packet, the loopback identifier indicates whether loopback transmission is required, and the destination node and source node addresses of the data packet are updated, thereby achieving flexible data packet forwarding and supporting one-way transmission and ring Return transmission to avoid unnecessary loop-and-forwarding.

Benefits of technology

It improves data interaction efficiency, saves bandwidth resources, meets the actual transmission needs between node devices, and avoids unnecessary waste of loopback transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211102A_ABST
    Figure CN119211102A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device, a data message, node equipment and a readable storage medium, and relates to the technical field of communication, the data transmission method comprises the following steps: when a first data message with a first destination node address matched with a node address of the node equipment is received, identifying a loopback identifier in the first data message; if the loopback identifier indicates loopback, updating a first destination node address and a source node address of the first data message to obtain a second data message; and forwarding the second data message to a node device corresponding to the second destination node address of the second data message. The technical problems of low data interaction efficiency and waste of bandwidth resources in the current data transmission mode are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data transmission method, device, data message, node device and computer-readable storage medium. Background Art

[0002] In the field of industrial wired communications, there are two data transmission modes: one is the one-way transmission mode, which is mainly used to realize the request and response data interaction needs between two devices. Two data frames are required to realize a request and response data interaction. The response time is uncontrollable and timeout may occur, resulting in reduced data interaction efficiency; the other is the loopback transmission mode, which mainly loops all data messages at the end node of the topological network composed of each node device. However, the loopback transmission requires the participation of all node devices in the topological network. When there are messages and node devices that do not need loopback transmission in the topological network, the redundant loopback transmission process will cause a waste of bandwidth resources. In summary, the current data transmission mode has the defects of low data interaction efficiency and waste of bandwidth resources. Summary of the invention

[0003] The main purpose of the present application is to provide a data transmission method, device, data message, node device and computer-readable storage medium, aiming to solve the technical problems of low data interaction efficiency and waste of bandwidth resources in the current data transmission method.

[0004] To achieve the above object, the present application provides a data transmission method, which is applied to a node device, and the data transmission method includes:

[0005] When receiving a first data message whose first destination node address matches the node address of the node device, identifying a loopback identifier in the first data message;

[0006] If the loopback identifier indicates a loopback, updating the first destination node address and the source node address of the first data message to obtain a second data message;

[0007] The second data message is forwarded to a node device corresponding to a second destination node address of the second data message.

[0008] In one embodiment, the step of updating the first destination node address and the source node address of the first data message to obtain the second data message includes:

[0009] Obtaining a first node address corresponding to a first destination node address and a second node address corresponding to a source node address in the first data message;

[0010] The second node address is updated to a second destination node address, and the first node address is updated to a source node address, to obtain a second data message.

[0011] In one embodiment, before the step of forwarding the second data message to a node device corresponding to the second destination node address of the second data message, the method further includes:

[0012] The loopback indicated by the loopback identifier is updated to a non-loopback.

[0013] In one embodiment, the step of updating the first destination node address and the source node address of the first data message to obtain the second data message includes:

[0014] Receiving a third node address, and updating the third node address to a second destination node address;

[0015] The first destination node address in the first data message is updated to the source node address to obtain a second data message.

[0016] In one embodiment, after the step of identifying the loopback identifier in the first data message, the data transmission method further includes:

[0017] If the loopback identifier indicates non-loopback, the transmission process of the first data message is terminated.

[0018] In one embodiment, when the loopback flag indicates a loopback, the value of the loopback flag is 1; when the loopback flag indicates a non-loopback, the value of the loopback flag is 0.

[0019] In one embodiment, after identifying the loopback identifier in the first data message, the data transmission method further includes:

[0020] If the node device is designated as a non-loopback node, after receiving the first data message, the transmission process of the first data message is terminated.

[0021] In one embodiment, the data transmission method includes:

[0022] When the node device fails, the source node address of the received third data message is updated to the destination node address of the third data message, and the node address of the node device is updated to the source node address of the third data message, so as to obtain a fourth data message;

[0023] The fourth data message is sent to a destination node address corresponding to the fourth data message, so that the node device corresponding to the destination node address can determine the location of the faulty node.

[0024] In one embodiment, the step of forwarding the second data message to a node device corresponding to the second destination node address of the second data message includes:

[0025] The second data message is sent to a next node device, so that the next node device determines whether to forward it according to the second destination node address; if the next node device is not the node device corresponding to the second destination node address, it continues to be forwarded to other node devices until the second data message is forwarded to the node device corresponding to the second destination node address.

[0026] In one embodiment, before the step of identifying the loopback identifier in the first data message, the method further includes:

[0027] When receiving a first data message, identifying a first destination node address in the first data message;

[0028] Determining whether the first destination node address is consistent with the node address of the node device;

[0029] If they are inconsistent, forwarding the first data message to the node device corresponding to the first destination node address;

[0030] If they are consistent, the step of identifying the loopback identifier in the first data message is executed.

[0031] In addition, the present application also provides a data transmission device, the data transmission device comprising:

[0032] A loopback identification module, configured to identify a loopback identifier in a first data message when receiving a first data message whose first destination node address matches the node address of the node device;

[0033] A unidirectional transmission module, configured to terminate the transmission process of the first data message if the loopback identifier is in a non-loopback state;

[0034] A message updating module, configured to update the first destination node address and the source node address of the first data message if the loopback identifier indicates a loopback, to obtain a second data message;

[0035] The loopback forwarding module is used to forward the second data message to a node device corresponding to the second destination node address of the second data message.

[0036] The present application also provides a data message, which includes at least a loopback identifier, wherein the loopback identifier is used to indicate a loopback, so that the node device that receives the data message can identify it, and when the loopback identifier indicates a loopback, the destination node and source address of the data message are updated to obtain and forward a new data message.

[0037] In one embodiment, when the value of the loopback flag is 1, it is used to indicate a loopback; when the value of the loopback flag is 0, it is used to indicate a non-loopback.

[0038] The present application also provides a node device, which is a communication node device, and the communication node device is a physical device. The node device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the data transmission method as applied to the node device.

[0039] The present application also provides a readable storage medium, which is a computer-readable storage medium. A program for implementing the data transmission method is stored on the computer-readable storage medium. The program for implementing the data transmission method is executed by a processor to implement the steps of the data transmission method as described above.

[0040] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data transmission method when executed by a processor.

[0041] The present application provides a method for transmitting data. First, when a first data packet whose first destination node address matches the node address of the node device is received, a loopback identifier in the first data packet is identified. In an embodiment of the present application, the loopback identifier is used to characterize whether loopback transmission is required. If the loopback identifier indicates a loopback, the first destination node address and the source node address of the first data packet are updated to obtain a second data packet, so that the second data packet corresponding to the first data packet enters the loopback transmission process. Finally, the second data packet is forwarded to the node device corresponding to the second destination node address of the second data packet to meet the loopback transmission requirement. In the technical solution of the present application, a loopback identifier is added to the transmitted data packet, and the loopback identifier is used to indicate whether loopback transmission is required according to the requirement, so that the data packets between the node devices can meet the loopback transmission requirement according to the actual situation, so that the data packets are looped and forwarded to the corresponding destination node device. Compared with the traditional one-way transmission or loopback transmission method, it is more flexible, and will not waste communication bandwidth resources due to packets that do not need loopback transmission, thereby saving bandwidth resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0044] Figure 1 This is a flow chart of Embodiment 1 of the method for transmitting data in the embodiments of the present application;

[0045] Figure 2 This is a schematic diagram of a data message loopback transmission model in an embodiment of the present application;

[0046] Figure 3 This is a schematic diagram of processing a data message inside a node device in an embodiment of the present application;

[0047] Figure 4 This is a schematic diagram of the structure of the first data message in an embodiment of the present application;

[0048] Figure 5 This is a schematic diagram of the structure of the second data message in an embodiment of the present application;

[0049] Figure 6 A flowchart of a feasible data transmission execution step in an embodiment of the present application;

[0050] Figure 7 This is a schematic diagram of the structure of a data transmission device in an embodiment of the present application;

[0051] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the node device in the embodiment of the present application.

[0052] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0053] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of this application.

[0054] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0055] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0056] In the existing industrial wired communication scenarios, there are two data message transmission methods. One is to support only one-way transmission of data messages. To realize the request and response actions between two node devices, two data frames are required to realize a request and response data interaction, but the response time is uncontrollable, and response timeouts may occur, affecting the efficiency of data interaction between devices; the other is to support only loopback transmission of data messages, but this transmission method only requires one-way data operations, and the use of loopback data messages will lead to bandwidth waste. In addition, some current loopback transmission mechanisms cannot fully cover all node devices that pass through the loopback path for the first time, and cannot realize the secondary operation of data messages by all node devices, and there is a defect of missing node devices.

[0057] In order to overcome the technical defects in the above-mentioned prior art, the present application embodiment provides a method for transmitting data. Figure 1 , Figure 1 The present invention is a flow chart of an embodiment of a method for transmitting data applied to a node device. In the first embodiment, the method for transmitting data includes:

[0058] Step S10, when receiving a first data message whose first destination node address matches the node address of the node device, identifying a loopback identifier in the first data message;

[0059] It should be noted that the execution subject of the data transmission method provided in the embodiment of the present application is a node device, and the node device can be a communication node device in an industrial wired communication scenario. Only when the node device is the destination node device corresponding to the first destination node address of the data message, it is necessary to determine whether loopback forwarding is required. If not, it can be directly forwarded to the next node device.

[0060] In addition, in an embodiment of the present application, when the originating node device corresponding to the first data packet sends a data packet, a loopback identifier is added to the message of the first data packet. The loopback identifier is used to indicate whether the first data packet needs to be looped back. If loopback transmission is required, after the first data packet is sent to the node device corresponding to the destination node address, it is looped back and forwarded back to the originating node device; if loopback transmission is not required, the node device corresponding to the destination node address will no longer forward the first data packet after receiving it.

[0061] Step S20, if the loopback identifier indicates a loopback, updating the first destination node address and the source node address of the first data message to obtain a second data message;

[0062] Step S30: forward the second data message to a node device corresponding to the second destination node address of the second data message.

[0063] When the loopback flag indicates a loopback state, it means that the first data message needs to be looped back. In this case, the first data message needs to be updated. The message header of the first data message includes a destination node address and a source node address, which are used to represent the destination node device and the originating node device to be sent, respectively. Now that the first data message has reached the node device corresponding to the destination node address, it needs to return to the originating node device or other node devices specified by the user, so the destination node address needs to be updated to the node address corresponding to the originating node device or the specified node device, and the source node address needs to be updated to its own node address.

[0064] After the destination node address and the source node address are updated, a new second data message is obtained, and the second data message needs to be looped back for transmission. In the process of forwarding the second data message to the node device corresponding to the second destination node address of the second data message, the second data message can be looped back to the previous sending node device of the first data message, that is, when the first data message is received from the sending node device, the second data message is looped back and forwarded back to the sending node device, so that the second data message is returned along the transmission path of the first data message. On the looped transmission path, it can pass through all node devices on the first data message transmission path, so as to provide each node device with the function of secondary processing of data messages, and can complete the reading and writing operations of data messages at the same time.

[0065] For example, Figure 2 The data message transmission model diagram of an industrial communication network system includes 4 industrial control communication node devices (1, 2, 3, 4), and the node devices have data message sending and data message receiving functions. Specifically, the node device 1 sends a data message 100 (equivalent to the first data message) to the node device 3 whose destination address is, when the data message 100 passes through the node device (e.g. 2), it will identify whether the destination node address of the data message matches the local node address (i.e. the node address of the node device), and if it does not match, it will continue to address and forward to the next node device (e.g. 3). Until the data message 100 is sent to the node device (e.g. 3) whose destination node address matches the local node address, the loopback identifier is further identified, and the data message 100 is forwarded according to the loopback identifier, wherein, if the loopback identifier indicates a loopback, the destination address and source address of the data message 100 are updated, and the data message 200 is obtained and loopback forwarding is performed; if the loopback identifier indicates a non-loopback, loopback forwarding is not performed.

[0066] Further, in a feasible embodiment, referring to Figure 3, the data message 100 sent by the node device 1 to the node 3 is processed by unidirectional transmission or loopback transmission at the destination node device 3. The internal data processing structure in the node device 3 is as follows: Figure 2 As shown, node device 3 receives (RX, receive) data message 100 from port 301, and data message 100 enters the loopback identification module 302 inside node device 3. Node device 3 first identifies the destination node address of data message 100, matches it with the local node address of node device 3, and then identifies the loopback identifier. It is identified that data message 100 is a data message for loopback transmission, and it is sent to the message update module. The destination node address, source node address and loopback identifier of the data message are updated in the message update module, and finally the updated data message 200 is loopback forwarded (TX, transport); if node device 3 is not the node device corresponding to the destination node address of data message 100, it is transmitted in the direction of the destination node; if node device 3 is the destination node of data message 100, and the loopback identifier of data message 100 is not in the loopback state, the data message is not forwarded.

[0067] In another embodiment, after the step of identifying the loopback identifier in the first data message, the data transmission method further includes:

[0068] Step S40, if the loopback flag indicates non-loopback, then end the transmission process of the first data message;

[0069] The loopback flag can indicate a loopback state or a non-loopback state. If the loopback flag indicates a loopback state, it means that the first data message needs to be looped back for transmission. If the loopback flag indicates a non-loopback flag, it means that the first data message does not need to be looped back for transmission. At this time, the node device can only receive the first data message and no longer forward it to another node device. In this way, the whole process of one-way transmission of data messages is completed, and there is no need for request and response data interaction, which improves the efficiency of data interaction.

[0070] The embodiment of the present application is equivalent to providing a method for transmitting data, which can support unidirectional transmission and loopback transmission at the same time. It mainly transmits the data frame of the data message unidirectionally or in a loopback manner in the destination node device according to the loopback identifier, which can meet the ordinary point-to-point unresponsive data interaction between node devices, and can also meet the request and fast response loopback data interaction between node devices.

[0071] Further, in another embodiment, the step of updating the first destination node address and the source node address of the first data message to obtain the second data message includes:

[0072] Step S21, obtaining a first node address corresponding to a first destination node address and a second node address corresponding to a source node address in a first data message;

[0073] Step S22: Update the second node address to the second destination node address, and update the first node address to the source node address to obtain a second data message.

[0074] When it is determined that the first data message is a data message that needs to be looped back, the first data message needs to be forwarded back to the originating node device, and the message header of the first data message includes a first destination node address and a source node address, wherein the source node address is the node address of the originating node device. When the destination node address and the source node address of the first data message are updated, the values ​​of the two addresses are essentially swapped so that the second destination node address and source node address of the second data message are opposite to the first destination node address and source node address of the first data message.

[0075] For example, refer to Figure 4 The first data message 100 includes a message header 101, a data segment 102, and a check segment 103. The message header includes a destination node address 0xABCD (first node address), a source node address 0x1234 (second node address), and a loopback identifier (indicating a loopback). The second data message 200 obtained by exchanging the destination node address and the source node address of the first data message is as shown in FIG. Figure 5 As shown, it includes a message header 201, a data segment 202 and a check segment 203, wherein the message header includes a destination node address 0x1234 (a second node address), a source node address 0xABCD (a first node address) and a loopback identifier.

[0076] Further, in another embodiment, the step of forwarding the second data message to a node device corresponding to the second destination node address of the second data message includes:

[0077] Step S31, sending the second data message to the next node device, so that the next node device determines whether to forward it according to the second destination node address. If the next node device is not the node device corresponding to the second destination node address, continue forwarding to other node devices until the second data message is forwarded to the node device corresponding to the second destination node address.

[0078] Specifically, in the process of loopback forwarding the second data message, the port for receiving the first data message is used as the sending port, and the second data message is sent to the next node device that sends the first data message to the current node device. After receiving the second data message, the next node device determines whether it is the destination node device of the second data message by comparing the second node address of the second data message with the local node address. If not, it continues to forward until the second data message is forwarded to the node device corresponding to the second destination node address.

[0079] For example, refer to Figure 2 , node device 3 loops back and forwards the second data message 200. Since the first data message 100 is sent from node device 2 to node device 3, node device 3 forwards the second data message to node device 2. After receiving the second data message, node device 2 compares its destination node address with the local node address. If the two are inconsistent, it continues to forward the second data message to node device 1. Node device 1 is the originating node device of the first data message 100 and is also the destination node device of the second data message 200. The loopback transmission process of the entire data message is now completed.

[0080] Through the above-mentioned loopback transmission method of data messages, the loop-forwarded data messages can pass through all node devices on the sending path on the loop circuit, providing these node devices with the function of secondary processing of loopback data messages, and can complete the reading and writing operations of data messages at the same time.

[0081] Furthermore, in a feasible embodiment, before the step of forwarding the second data message to the node device corresponding to the second destination node address of the second data message, the method further includes:

[0082] Step S23: Update the loopback indicated by the loopback identifier to a non-loopback.

[0083] In order to avoid the problem of infinite loop transmission of data messages between node devices, after the node device updates the first destination node address and the source node address of the first data message that needs to be looped back for transmission, the loopback identifier in its message header is synchronously updated, specifically from loopback to non-loopback. After the loopback identifier is updated, the second data message is forwarded to the originating node device of the first data message (i.e., the destination node device of the second data message). The originating node device will recognize the loopback identifier in the non-loopback state and will no longer loop back and forward the second data message, thereby solving the problem of infinite looping of looped data between node devices.

[0084] In a feasible embodiment, the loopback flag can be represented by a numerical value. When the loopback flag indicates a loopback, the value of the loopback flag is 1; when the loopback flag indicates a non-loopback, the value of the loopback flag is 0. In this way, when the node device identifies the loopback flag, it can determine whether the loopback flag indicates a loopback or a non-loopback according to its value.

[0085] In another feasible embodiment, the step of updating the first destination node address and the source node address of the first data message to obtain the second data message includes:

[0086] Step S24, receiving a third node address, and updating the third node address to a second destination node address;

[0087] Step S25: Update the address corresponding to the first destination node address in the first data message to the source node address to obtain a second data message.

[0088] It should be noted that steps S24 to S25 provide another method for updating the destination node address and the source node address, which is parallel to steps S21 to S22. Steps S21 to S22 or steps S24 to S25 can be selected to update the destination node address and the source node address of the first data message according to actual needs.

[0089] It is understandable that in the process of loopback transmission, according to the needs of the actual industrial control scenario, it is sometimes necessary to specify the destination node device of the loopback transmission, so in addition to updating the source node address of the first data message to the second destination node address of the second data message (equivalent to assigning the value of the source node address of the first data message to the second destination node address), the user-defined third node address can also be updated to the second destination node address of the second data message through user configuration (equivalent to assigning the value of the third node address to the second node address). In this way, the user can control the final destination node device of the loopback transmission according to actual needs, so that the specified node device has the function of secondary processing of the loopback data message, and the flexibility of the loopback transmission path is improved.

[0090] In another embodiment, after identifying the loopback identifier in the first data message, the data transmission method further includes:

[0091] Step S11: If the node device is designated as a non-loopback node, after receiving the first data message, the transmission process of the first data message is terminated.

[0092] It should be noted that step S11 provides another method to avoid infinite loops in loopback message data. Specifically, the user can specify a specific node not to perform loopback forwarding after receiving the loopback data message (usually the node is the initiator of the loopback data message), which can also solve the problem of infinite loops in loopback data messages between node devices.

[0093] When a non-loopback node has been designated, there is no need to execute the step of updating the loopback identifier described in step S23. For example, when the originating node device of the first data message has been designated as a non-loopback node, there is no need to identify the loopback identifier status and the transmission process of the first data message is directly terminated. The originating node device will not execute the step of loopback forwarding the second data message. In this case, the applied node device is the originating node device.

[0094] In another embodiment, the data transmission method may further include:

[0095] Step A10, when a node device fails, the source node address of the received third data message is updated to the destination node address of the third data message, and the node address of the node device is updated to the source node address of the third data message, to obtain a fourth data message;

[0096] Step A20: Send the fourth data message to the destination node address corresponding to the fourth data message, so that the node device corresponding to the destination node address can determine the location of the faulty node.

[0097] It is understandable that when a node device fails during data transmission, the received third data message cannot reach the destination node. The third data message is a message received by the node device and needs to be sent to the destination node. When a loopback transmission line fails, the data message will be looped back at the failed node to return to the source node address.

[0098] Specifically, when the node device with a fault performs loopback transmission of the third data message, first update its destination node address to the original source node address of the third data message (equivalent to assigning the value of the source node address to the destination node address), so that it is transmitted back to the node device that sent the third data message; then update its source node address to its own local node address (i.e., the node address of the faulty device), which is equivalent to assigning the value of the local node address to the source node address. In this way, the source node device of the third data can know which node device has a fault, so as to indicate that the loopback transmission failed due to the fault, and finally obtain the fourth data message with the updated destination node address, source node address and loopback identifier, and transmit it in a loopback to the node device corresponding to the destination node address of the fourth data message (i.e., the source node device of the third data message).

[0099] The embodiment of the present application updates the destination node address, source node address and loopback identifier of the data message when a loopback transmission failure occurs, so that the data message that failed to be transmitted is returned to the source node device. This allows the source node device to more efficiently and quickly determine the node location where the failure occurred, which is conducive to the staff to perform targeted processing faster and better to eliminate the fault and improve data transmission efficiency.

[0100] In another feasible embodiment, before the step of identifying the loopback identifier in the first data message, the data transmission method further includes:

[0101] Step B10, when receiving the first data message, identifying the first destination node address in the first data message;

[0102] Step B20, determining whether the first destination node address is consistent with the node address of the node device;

[0103] Step B30: if they are inconsistent, forwarding the first data message to the node device corresponding to the first destination node address;

[0104] Step B40: If they are consistent, execute the step of identifying the loopback identifier in the first data message.

[0105] It can be understood that when a node device receives the first data message sent by other node devices, it first identifies whether the first destination node address corresponding to the first data message is consistent with the local node address. Only when they are consistent can it be determined that the destination node address of the first data message is this node device, and only then is it necessary to perform the loopback identifier identification and loopback transmission steps.

[0106] When the first destination node address corresponding to the first data message is inconsistent with the local node address, the node device is only a transit node, and the first data message is forwarded to the next node device. After the first data message is forwarded to the next node device, the next node device will execute the same steps as step B10 to step B40 until it is sent to the node device corresponding to the first destination node address.

[0107] For ease of understanding, in combination with the contents of the aforementioned embodiments of the invention, refer to Figure 6A feasible data transmission method provided by an embodiment of the present application may include the following steps: first, a node device receives a data message through a receiving port, and first determines whether the destination node address of the data message is the current node. If not, the data message is forwarded to the next node device, and the next node device returns to execute the step of receiving the data message at the receiving port of the node device; if so, it determines whether the loopback identifier in the data message is in a loopback state. If not, the transmission process of the data message is terminated (only the data message is received); if it is in a loopback state, the address information and loopback identifier of the data message are updated, and then the data message is loopback forwarded.

[0108] The embodiment of the present application provides a flexible data transmission mechanism that supports loopback transmission and unidirectional transmission of data messages. By identifying the destination node address and loopback identifier, the data message that needs to be looped back is updated with the address information of the data message at the destination node device to realize loopback transmission of the transmission data. In addition, the loopback identifier of the loopback data message is updated to a non-loopback state at the destination node, and then the loopback transmission is performed, or a specific node is specified not to loopback after receiving the loopback data message, thereby solving the problem of infinite circulation of the loopback data message between node devices.

[0109] In addition, the present application also provides a data transmission device, wherein, referring to Figure 7 , the data transmission device comprises:

[0110] A loopback identification module 10, configured to identify a loopback identifier in a first data message when receiving a first data message whose first destination node address matches the node address of the node device;

[0111] A message updating module 20, configured to update the first destination node address and the source node address of the first data message if the loopback identifier indicates a loopback, to obtain a second data message;

[0112] The loopback forwarding module 30 is used to forward the second data message to a node device corresponding to the second destination node address of the second data message.

[0113] In one embodiment, the message updating module 20 is further used for:

[0114] Obtaining a first node address corresponding to a first destination node address and a second node address corresponding to a source node address in the first data message;

[0115] The second node address is updated to a second destination node address, and the first node address is updated to a source node address, to obtain a second data message.

[0116] In one embodiment, the message updating module 20 is further used for:

[0117] The loopback indicated by the loopback identifier is updated to a non-loopback.

[0118] In one embodiment, the message updating module 20 is further used for:

[0119] Receiving a third node address, and updating the third node address to a second destination node address;

[0120] The first destination node address in the first data message is updated to the source node address to obtain a second data message.

[0121] In one embodiment, the data transmission device further includes a unidirectional transmission module, and the unidirectional transmission module is used to:

[0122] If the loopback identifier indicates non-loopback, the transmission process of the first data message is terminated.

[0123] In one embodiment, when the loopback flag indicates a loopback, the value of the loopback flag is 1; when the loopback flag indicates a non-loopback, the value of the loopback flag is 0.

[0124] In one embodiment, the one-way transmission module is further used for:

[0125] If the node device is designated as a non-loopback node, after receiving the first data message, the transmission process of the first data message is terminated.

[0126] In one embodiment, the message updating module 20 is further used for:

[0127] When the node device fails, the source node address of the received third data message is updated to the destination node address of the third data message, and the node address of the node device is updated to the source node address of the third data message, so as to obtain a fourth data message;

[0128] The fourth data message is sent to a destination node address corresponding to the fourth data message, so that the node device corresponding to the destination node address can determine the location of the faulty node.

[0129] In one embodiment, the data transmission device further includes a message forwarding module, and the message forwarding module is used to:

[0130] The second data message is sent to a next node device, so that the next node device determines whether to forward it according to the second destination node address; if the next node device is not the node device corresponding to the second destination node address, it continues to be forwarded to other node devices until the second data message is forwarded to the node device corresponding to the second destination node address.

[0131] In one embodiment, the message conversion module is further used for:

[0132] When receiving a first data message, identifying a first destination node address in the first data message;

[0133] Determining whether the first destination node address is consistent with the node address of the node device;

[0134] If they are inconsistent, forwarding the first data message to the node device corresponding to the first destination node address;

[0135] If they are consistent, the step of identifying the loopback identifier in the first data message is executed.

[0136] The data transmission device provided by the present application adopts the data transmission method in the above embodiment, which can solve the technical problems of low data interaction efficiency and waste of bandwidth resources in the current data transmission method. Compared with the prior art, the beneficial effects of the data transmission device provided by the embodiment of the present application are the same as the beneficial effects of the data transmission method provided by the above embodiment, and the other technical features in the data transmission device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0137] The embodiment of the present application also provides a data message, which includes a loopback identifier, wherein the loopback identifier is used to indicate a loopback, so as to be recognized by the node device that receives the data message, and when the loopback identifier indicates a loopback, the destination node and source address of the data message are updated, and a new data message is obtained and forwarded, thereby realizing loopback transmission of the data message. In addition, when the loopback identifier indicates a non-loopback, the transmission of the data message is terminated, thereby realizing unidirectional transmission of the data message.

[0138] Exemplarily, the loopback identifier in the data message represents different indication states by taking different values. For example, when the value of the loopback identifier is 1, it is used to indicate a loopback; when the value of the loopback identifier is 0, it is used to indicate a non-loopback. In the embodiment of the present application, only one binary value is used to represent the state indicated by the loopback identifier, which saves calculation and performance overhead and improves the recognition efficiency of the loopback identifier.

[0139] The data message provided by the present application adopts the data transmission method in the above embodiment, which can solve the technical problems of low data interaction efficiency and waste of bandwidth resources in the current data transmission method. Compared with the prior art, the beneficial effects of the data message provided by the embodiment of the present application are the same as the beneficial effects of the data transmission method provided by the above embodiment, and the other technical features in the data message are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0140] An embodiment of the present application also provides a node device, which is a communication node device, and the node device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data transmission method in the above-mentioned embodiment one.

[0141] Reference below Figure 8 , which shows a schematic diagram of the structure of a node device suitable for implementing the embodiment of the present disclosure. The node device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The node device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0142] like Figure 8 As shown, the node device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the node device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the node device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a node device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.

[0143] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0144] The node device provided by the present application adopts the data transmission method in the above embodiment, which can solve the technical problems of low data interaction efficiency and waste of bandwidth resources in the current data transmission method. Compared with the prior art, the beneficial effects of the node device provided by the embodiment of the present application are the same as the beneficial effects of the data transmission method provided by the above embodiment, and the other technical features in the node device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0145] It should be understood that the various parts of the present disclosure can be implemented with hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0146] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0147] An embodiment of the present application also provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the data transmission method in the above-mentioned embodiment 1.

[0148] The computer-readable storage medium provided in the embodiment of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0149] The computer-readable storage medium may be included in the node device; or may exist independently without being installed in the node device.

[0150] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the node device, the node device executes: when receiving a first data message whose first destination node address matches the node address of the node device, identifying the loopback identifier in the first data message; if the loopback identifier indicates a loopback, updating the first destination node address and source node address of the first data message to obtain a second data message; forwarding the second data message to the node device corresponding to the second destination node address of the second data message.

[0151] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0152] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0153] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.

[0154] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions for executing the above-mentioned data transmission method, and can solve the technical problems of low data interaction efficiency and waste of bandwidth resources in the current data transmission method. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the embodiment of the present application are the same as the beneficial effects of the data transmission method provided in the above-mentioned embodiment 1, and will not be repeated here.

[0155] An embodiment of the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data transmission method when executed by a processor.

[0156] The computer program product provided by the present application can solve the technical problems of low data interaction efficiency and waste of bandwidth resources in the current data transmission method. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as the beneficial effects of the data transmission method provided by the above-mentioned embodiment 1, which will not be repeated here.

[0157] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A method for transmitting data, characterized in that: Applied to a node device, the method comprises: When receiving a first data message whose first destination node address matches the node address of the node device, identifying a loopback identifier in the first data message; If the loopback identifier indicates a loopback, updating the first destination node address and the source node address of the first data message to obtain a second data message; The second data message is forwarded to a node device corresponding to a second destination node address of the second data message.

2. The data transmission method according to claim 1, characterized in that: The step of updating the first destination node address and the source node address of the first data message to obtain the second data message comprises: Obtaining a first node address corresponding to a first destination node address and a second node address corresponding to a source node address in the first data message; The second node address is updated to a second destination node address, and the first node address is updated to a source node address, to obtain a second data message.

3. The data transmission method according to claim 1, characterized in that: Before the step of forwarding the second data message to a node device corresponding to the second destination node address of the second data message, the method further includes: The loopback indicated by the loopback identifier is updated to a non-loopback.

4. The data transmission method according to claim 1, characterized in that: The step of updating the first destination node address and the source node address of the first data message to obtain the second data message comprises: Receiving a third node address, and updating the third node address to a second destination node address; The first destination node address in the first data message is updated to the source node address to obtain a second data message.

5. The data transmission method according to claim 1, characterized in that: After the step of identifying the loopback identifier in the first data message, the data transmission method further includes: If the loopback identifier indicates non-loopback, the transmission process of the first data message is terminated.

6. The data transmission method according to claim 5, characterized in that: When the loopback flag indicates a loopback, the value of the loopback flag is 1; when the loopback flag indicates a non-loopback, the value of the loopback flag is 0.

7. The data transmission method according to claim 1, characterized in that: After identifying the loopback identifier in the first data message, the data transmission method further includes: If the node device is designated as a non-loopback node, after receiving the first data message, the transmission process of the first data message is terminated.

8. The data transmission method according to claim 1, characterized in that: The data transmission method comprises: When the node device fails, the source node address of the received third data message is updated to the destination node address of the third data message, and the node address of the node device is updated to the source node address of the third data message, so as to obtain a fourth data message; The fourth data message is sent to a destination node address corresponding to the fourth data message, so that the node device corresponding to the destination node address can determine the location of the faulty node.

9. The data transmission method according to claim 1, characterized in that: The step of forwarding the second data message to a node device corresponding to the second destination node address of the second data message includes: The second data message is sent to a next node device, so that the next node device determines whether to forward it according to the second destination node address; if the next node device is not the node device corresponding to the second destination node address, it continues to be forwarded to other node devices until the second data message is forwarded to the node device corresponding to the second destination node address.

10. The data transmission method according to any one of claims 1 to 9, characterized in that: Before the step of identifying the loopback identifier in the first data message, the method further includes: When receiving a first data message, identifying a first destination node address in the first data message; Determining whether the first destination node address is consistent with the node address of the node device; If they are inconsistent, forwarding the first data message to the node device corresponding to the first destination node address; If they are consistent, the step of identifying the loopback identifier in the first data message is executed.

11. A data transmission device, characterized in that: The data transmission device comprises: A loopback identification module, configured to identify a loopback identifier in a first data message when receiving a first data message whose first destination node address matches the node address of the node device; A message updating module, configured to update the first destination node address and the source node address of the first data message if the loopback identifier indicates a loopback, to obtain a second data message; A loopback forwarding module is used to forward the second data message to a node device corresponding to a second destination node address of the second data message.

12. A data message, characterized in that: The data message at least includes a loopback identifier, wherein the loopback identifier is used to indicate a loopback, so that the node device that receives the data message can identify it and update the destination node and source address of the data message when the loopback identifier indicates a loopback, and obtain and forward a new data message.

13. The data message according to claim 12, characterized in that: When the value of the loopback identifier is 1, it is used to indicate a loopback; when the value of the loopback identifier is 0, it is used to indicate a non-loopback.

14. A node device, characterized in that: The node device is a communication node device, and the communication node device includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the data transmission method according to any one of claims 1 to 10.

15. A readable storage medium, characterized in that: The readable storage medium is a computer-readable storage medium, on which is stored a program for implementing the data transmission method, and the program for implementing the data transmission method is executed by a processor to implement the steps of the data transmission method as described in any one of claims 1 to 10.