CN115915263A - Data transmission method of mesh network, electronic equipment and storage medium - Google Patents

Data transmission method of mesh network, electronic equipment and storage medium Download PDF

Info

Publication number
CN115915263A
CN115915263A CN202211308058.3A CN202211308058A CN115915263A CN 115915263 A CN115915263 A CN 115915263A CN 202211308058 A CN202211308058 A CN 202211308058A CN 115915263 A CN115915263 A CN 115915263A
Authority
CN
China
Prior art keywords
data packet
node
network depth
network
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211308058.3A
Other languages
Chinese (zh)
Inventor
杜龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202211308058.3A priority Critical patent/CN115915263A/en
Publication of CN115915263A publication Critical patent/CN115915263A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种mesh网络的数据传输方法、电子设备及计算机可读存储介质。该mesh网络的数据传输方法包括:节点接收到数据包,从数据包获取第一网络深度及获取自身的第二网络深度;节点基于第一网络深度及第二网络深度确定对数据包的转发概率;节点基于转发概率对数据包进行转发。通过这种方式,能够提高mesh网络的网络泛洪的抑制效果。

Figure 202211308058

The application discloses a data transmission method of a mesh network, electronic equipment and a computer-readable storage medium. The data transmission method of the mesh network includes: the node receives the data packet, obtains the first network depth from the data packet and obtains its own second network depth; the node determines the forwarding probability of the data packet based on the first network depth and the second network depth ; The node forwards the packet based on the forwarding probability. In this way, the effect of suppressing network flooding of the mesh network can be improved.

Figure 202211308058

Description

mesh网络的数据传输方法、电子设备及存储介质Data transmission method, electronic equipment and storage medium of mesh network

技术领域technical field

本申请涉及通信技术领域,特别是涉及一种mesh网络的数据传输方法、电子设备及计算机可读存储介质。The present application relates to the technical field of communication, and in particular to a data transmission method of a mesh network, an electronic device, and a computer-readable storage medium.

背景技术Background technique

无线mesh网络是一种新无线局域网类型,可以包括wifi mesh、蓝牙mesh、zigbeemesh等。无线mesh网络中的节点之间可以建立多跳的链路并转发相关的数据包。网络泛洪是mesh技术用于传输信息的方法,网络泛洪是指数据包在mesh网络上大规模、无方向性的传递,但是过多的、无必要的网络洪泛,会导致数据包冲突、网络拥塞、带宽下降等问题,严重时甚至可以导致网络瘫痪。Wireless mesh network is a new type of wireless local area network, which can include wifi mesh, bluetooth mesh, zigbeemesh, etc. Nodes in a wireless mesh network can establish multi-hop links and forward related data packets. Network flooding is the method used by mesh technology to transmit information. Network flooding refers to the large-scale and non-directional transmission of data packets on the mesh network. However, excessive and unnecessary network flooding will cause data packet collisions. , network congestion, bandwidth drop and other problems, even lead to network paralysis in severe cases.

相关技术中,在处理mesh网络的网络洪泛时,一般采用一下两种方法:一种是,基于每个数据包的生命次数来控制数据包的无限制转发;另一种是,每个中继(节点)缓存是否转发过该数据包,防止重复转发同一个数据包。但这两种方案都不能很好的控制没有必要的转发,网络泛洪的抑制效果较差,因为,第一种方法中生命次数设置达到没有效果,设置太大会导致数据包无法到达路由出口,而且无法控制节点多次转发同一数据包,第二种方法只能防止转发重复的数据包,最后每个数据包还是传遍了整个网络。In related technologies, when dealing with network flooding in a mesh network, the following two methods are generally adopted: one is to control the unlimited forwarding of data packets based on the number of lives of each data packet; the other is to control the unlimited forwarding of data packets in each Whether the relay (node) cache has forwarded the data packet to prevent repeated forwarding of the same data packet. However, neither of these two solutions can control unnecessary forwarding very well, and the suppression effect of network flooding is poor, because the life count setting in the first method has no effect, and if the setting is too large, the data packet cannot reach the routing exit. Moreover, it is impossible to control the node to forward the same data packet multiple times. The second method can only prevent repeated data packets from being forwarded, and finally each data packet is still transmitted throughout the entire network.

发明内容Contents of the invention

本申请主要解决的技术问题是如何提高mesh网络的网络泛洪的抑制效果。The technical problem mainly solved by this application is how to improve the suppression effect of network flooding in the mesh network.

为解决上述技术问题,本申请提供一种mesh网络的数据传输方法。该mesh网络的数据传输方法包括:节点接收到数据包,从数据包获取第一网络深度及获取自身的第二网络深度;节点基于第一网络深度及第二网络深度确定对数据包的转发概率;节点基于转发概率对数据包进行转发。In order to solve the above technical problems, the present application provides a data transmission method of a mesh network. The data transmission method of the mesh network includes: the node receives the data packet, obtains the first network depth from the data packet and obtains its own second network depth; the node determines the forwarding probability of the data packet based on the first network depth and the second network depth ; The node forwards the packet based on the forwarding probability.

为解决上述技术问题,本申请提供一种电子设备。该电子设备包括:处理器和存储器,存储器中存储有程序数据,处理器用于执行程序数据以实现上述数据传输方法。In order to solve the above technical problems, the present application provides an electronic device. The electronic device includes: a processor and a memory, wherein program data is stored in the memory, and the processor is used to execute the program data to realize the above-mentioned data transmission method.

为解决上述技术问题,本申请提供一种计算机可读存储介质,该计算机可读存储介质存储有程序数据,程序数据能够被处理器执行时实现上述数据传输方法。In order to solve the above-mentioned technical problems, the present application provides a computer-readable storage medium, which stores program data, and implements the above-mentioned data transmission method when the program data can be executed by a processor.

本申请的有益效果是:本申请mesh网络的数据传输方法中,在mesh网络的某节点接收到数据包后,从数据包获取第一网络深度及获取该节点自身的第二网络深度,且该节点基于第一网络深度及第二网络深度确定对该数据包的转发概率,并基于该转发概率对该数据包进行转发。本申请能够控制不同网络深度的节点对接收的数据包的转发概率,使得数据包不需要传遍整个mesh网络就能完成数据的传输,因此能够提高mesh网络的网络泛洪的抑制效果。The beneficial effects of the present application are: in the data transmission method of the mesh network of the present application, after a certain node of the mesh network receives the data packet, the first network depth and the second network depth of the node are obtained from the data packet, and the The node determines the forwarding probability of the data packet based on the first network depth and the second network depth, and forwards the data packet based on the forwarding probability. The application can control the forwarding probability of received data packets by nodes with different network depths, so that the data packets can complete the data transmission without spreading the entire mesh network, thus improving the suppression effect of network flooding in the mesh network.

进一步地,本申请能够避免一部分的无效的传输,减少整个mesh网络的数据传输冗余,减小网络负荷,增加网络最大容量和通信带宽。Furthermore, the present application can avoid part of invalid transmission, reduce data transmission redundancy of the entire mesh network, reduce network load, and increase maximum network capacity and communication bandwidth.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.

图1是本申请mesh网络的数据传输方法一实施例的流程示意图;Fig. 1 is the schematic flow chart of an embodiment of the data transmission method of the mesh network of the present application;

图2是本申请数据包格式一实施例的结构示意图;Fig. 2 is a schematic structural diagram of an embodiment of the data packet format of the present application;

图3是本申请数据包格式另一实施例的结构示意图;Fig. 3 is a schematic structural diagram of another embodiment of the data packet format of the present application;

图4是本申请数据包格式又一实施例的结构示意图;FIG. 4 is a schematic structural diagram of another embodiment of the data packet format of the present application;

图5是本申请mesh网络的数据传输方法中第二网络深度的更新方法一实施例的流程示意图;Fig. 5 is a schematic flow chart of an embodiment of an update method of the second network depth in the data transmission method of the mesh network of the present application;

图6是本申请mesh网络一实施例的结构示意图;Fig. 6 is a schematic structural diagram of an embodiment of the mesh network of the present application;

图7是图1实施例中步骤S12的一具体流程示意图;Fig. 7 is a specific flow diagram of step S12 in the embodiment of Fig. 1;

图8是本申请mesh网络的数据传输方法另一实施例的流程示意图;8 is a schematic flow diagram of another embodiment of the data transmission method of the mesh network of the present application;

图9是本申请电子设备一实施例的结构示意图;FIG. 9 is a schematic structural diagram of an embodiment of the electronic device of the present application;

图10是本申请计算机可读存储介质一实施例的结构示意图。Fig. 10 is a schematic structural diagram of an embodiment of a computer-readable storage medium of the present application.

具体实施方式Detailed ways

以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.

应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and/or components, but does not exclude one or more other features. , whole, step, operation, element, component and/or the presence or addition of a collection thereof.

还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terminology used in the specification of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural referents unless the context clearly dictates otherwise.

还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be further understood that the term "and/or" used in the description of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations .

如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and the appended claims, the term "if" may be construed as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context . Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be construed, depending on the context, to mean "once determined" or "in response to the determination" or "once detected [the described condition or event] ]” or “in response to detection of [described condition or event]”.

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying 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 them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

mesh网络中的节点之间可以建立多跳的链路并转发相关的数据包;mesh网络中节点通过泛洪的路由方式与mesh网络中的其它节点进行通信,mesh网络设有多个节点,该多个节点包括用于转发数据包的节点、用于处理应用层业务的节点及作为网络出口的节点。Nodes in the mesh network can establish multi-hop links and forward related data packets; nodes in the mesh network communicate with other nodes in the mesh network through flooding routing, and the mesh network has multiple nodes. The multiple nodes include a node for forwarding data packets, a node for processing application layer services, and a node serving as a network egress.

本申请首先提出一种mesh网络的数据传输方法,如图1所示,图1是本申请mesh网络的数据传输方法一实施例的流程示意图。本实施例的数据传输方法可以用于mesh网络中用于转发数据包的节点或作为网络出口的节点(后续简称出口节点)。本实施例的数据传输方法具体包括以下步骤:The present application first proposes a data transmission method of a mesh network, as shown in FIG. 1 , which is a schematic flowchart of an embodiment of a data transmission method of a mesh network of the present application. The data transmission method of this embodiment may be used for a node in a mesh network for forwarding data packets or a node serving as a network egress (hereinafter referred to as an egress node). The data transmission method in this embodiment specifically includes the following steps:

步骤S11:节点接收到数据包,从数据包获取第一网络深度及获取自身的第二网络深度。Step S11: The node receives the data packet, obtains the first network depth and obtains its own second network depth from the data packet.

该数据包为需要通过mesh网络传输的数据包,mesh网络中节点接收到该数据包后,从数据包中获取第一网络深度及该节点自身的第二网络深度。The data packet is a data packet that needs to be transmitted through the mesh network. After the node in the mesh network receives the data packet, it obtains the first network depth and the second network depth of the node itself from the data packet.

数据包的传输类型分为上行传输,即数据包从mesh网络中的源节点传输至mesh网络,并通过mesh网络从出口节点传输至上位机,及下行传输,即数据包从出口节点传输至mesh网络,并传输至mesh网络的目标节点。The transmission type of the data packet is divided into uplink transmission, that is, the data packet is transmitted from the source node in the mesh network to the mesh network, and transmitted from the exit node to the host computer through the mesh network, and downlink transmission, that is, the data packet is transmitted from the exit node to the mesh network. network and transmit it to the target node of the mesh network.

mesh网络可以设有一个或者多个出口节点;每个节点可以计算相对出口节点的网络深度信息。A mesh network can have one or more exit nodes; each node can calculate the network depth information relative to the exit node.

其中,数据包上行传输时,节点从数据包获取的第一网络深度为该节点的转发该数据包的前一节点的第二网络深度;数据包下行传输时,节点从数据包获取的第一网络深度为目标节点的第二网络深度。Wherein, when the data packet is transmitted upstream, the first network depth obtained by the node from the data packet is the second network depth of the previous node forwarding the data packet of the node; when the data packet is transmitted downstream, the first network depth obtained by the node from the data packet The network depth is the second network depth of the target node.

为了区分这两种传输类型,本实施例修改数据包的格式,在传统数据包中设置传输类型字段及网络深度字段,其中,网络深度字段用于设置第一网络深度。In order to distinguish these two transmission types, this embodiment modifies the format of the data packet, and sets the transmission type field and the network depth field in the traditional data packet, wherein the network depth field is used to set the first network depth.

传统的通信协议,数据包通常分为数据头HDR、有效载荷Payload、校验数据crc三部分。本实施例在传统数据包中插入传输类型字段UP/DOWN及网络深度字段nwkDepth。UP/DOWN表示数据包的传输类型是上行传输还是下行传输。若HDR中已经有字段UP/DOWN,则无需重新插入。In traditional communication protocols, data packets are usually divided into three parts: data header HDR, payload Payload, and verification data crc. In this embodiment, the transmission type field UP/DOWN and the network depth field nwkDepth are inserted into the traditional data packet. UP/DOWN indicates whether the transmission type of the data packet is uplink transmission or downlink transmission. If there is already a field UP/DOWN in HDR, there is no need to reinsert it.

字段nwkDepth用于记录数据包的网络深度。数据包上行传输及下行传输时,字段nwkDepth代表的意义不一样。数据包上行传输时,nwkDepth字段用于表示发送该数据包的节点的网络深度,且随着数据包被不同的节点转发,该值会发生变化,即节点在转发数据包之前,将自身的网络深度更新至数据包的字段nwkDepth中。数据包下行传输时,字段nwkDepth代表目标节点的网络深度,数据包一旦生成之后,字段nwkDepth中的值在数据包转发的过程中不再改变。The field nwkDepth is used to record the network depth of the data packet. The meaning of the field nwkDepth is different when the data packet is transmitted uplink and downlink. When a data packet is transmitted upstream, the nwkDepth field is used to indicate the network depth of the node sending the data packet, and as the data packet is forwarded by different nodes, this value will change, that is, before the node forwards the data packet, it will The depth is updated to the field nwkDepth of the data packet. When the data packet is transmitted downlink, the field nwkDepth represents the network depth of the target node. Once the data packet is generated, the value in the field nwkDepth will not change during the data packet forwarding process.

数据包新增加的字段UP/DOWN及字段nwkDepth可以增加在原数据报文的中部(如图2所示)或者原数据报文的尾部(如图3所示)。The newly added field UP/DOWN and field nwkDepth of the data packet can be added in the middle of the original data message (as shown in FIG. 2 ) or at the end of the original data message (as shown in FIG. 3 ).

在低可靠性的mesh网络中传输数据包时,还可以在数据包中新增字段Appendcrc,通过增加校验来增加数据信息的可靠性(如图4所示)。When transmitting a data packet in a mesh network with low reliability, a new field Appendcrc can also be added to the data packet to increase the reliability of the data information by adding a checksum (as shown in Figure 4).

可以将出口节点的网络深度定义为0,从上到下,每增加一跳,网络深度加1。The network depth of the exit node can be defined as 0, and the network depth is increased by 1 for each additional hop from top to bottom.

由于mesh网络中其它节点相对于出口节点,可以有多条不同的传输路径(mesh网络中,节点的每一传输条路径都可能是该节点传输数据包的传输路径),可以以最小跳数对应的传输路径的网络深度为准。Since other nodes in the mesh network can have multiple different transmission paths relative to the exit node (in the mesh network, each transmission path of a node may be the transmission path for the node to transmit data packets), it can correspond to the minimum number of hops The network depth of the transmission path shall prevail.

可选地,为了提高mesh网络对数据包传输的可靠性,还可以基于mesh网络的数据传输质量来对节点自身的第二网络深度进行更新。具体地,可以采用如图5所述的方法实现节点自身的第二网络深度的更新,该更新方法具体包括步骤S51至步骤S53。Optionally, in order to improve the reliability of the mesh network for data packet transmission, the second network depth of the node itself may be updated based on the data transmission quality of the mesh network. Specifically, the method as shown in FIG. 5 can be used to update the second network depth of the node itself, and the updating method specifically includes steps S51 to S53.

步骤S51:确定节点关联的多条传输路径。Step S51: Determine multiple transmission paths associated with the nodes.

mesh网络中其它节点相对于出口节点,可以有多条不同的传输路径。例如,如图6所示,节点A到节点C有两条传输路径,一条是节点A-节点C,另一条是节点A-节点B-节点C。Compared with the exit node, other nodes in the mesh network can have multiple different transmission paths. For example, as shown in FIG. 6, there are two transmission paths from node A to node C, one is node A-node C, and the other is node A-node B-node C.

步骤S52:针对每条传输路径,计算节点间的衰减系数对节点间跳数的加权值。Step S52: For each transmission path, calculate the weighted value of the attenuation coefficient between nodes to the number of hops between nodes.

同一条传输路径上,可以基于靠近出口节点的节点的第二网络深度及该节点到该传输路径上的其它节点之间的跳数及衰减系数来确定该传输路径上其它节点的第二网络深度。On the same transmission path, the second network depth of other nodes on the transmission path can be determined based on the second network depth of the node close to the exit node and the number of hops and attenuation coefficients between the node and other nodes on the transmission path .

例如,如图6所示,可以按照同样的方式确定节点A的第二网络深度为10,再计算节点A与节点B之间的衰减系数、节点B与节点C之间的衰减系数对节点A与节点B之间跳数及节点B与节点C之间跳数的加权值;计算节点A与节点C的衰减系数对节点A与节点C之间跳数的加权值。For example, as shown in Figure 6, the second network depth of node A can be determined to be 10 in the same way, and then calculate the attenuation coefficient between node A and node B, and the attenuation coefficient between node B and node C to node A The weighted value of the number of hops between node B and the number of hops between node B and node C; calculate the weighted value of the attenuation coefficient of node A and node C on the number of hops between node A and node C.

步骤S53:基于加权值中的最小值更新节点的第二网络深度。Step S53: Updating the second network depth of the node based on the minimum value among the weighted values.

例如,节点A-节点B-节点C组成的传输路径的衰减系数为1,节点间的跳数均为1,该传输路径的加权值为1*1+1*1=2;节点A-节点C组成的传输路径的衰减系数为3,节点间的跳数为1,该传输路径的加权值为1*3=3,若节点A的第二网络深度为11,则确定节点C的第二网络深度为12。For example, the attenuation coefficient of the transmission path composed of node A-node B-node C is 1, and the number of hops between nodes is 1. The weighted value of the transmission path is 1*1+1*1=2; node A-node The attenuation coefficient of the transmission path composed of C is 3, the number of hops between nodes is 1, the weight value of this transmission path is 1*3=3, if the second network depth of node A is 11, then determine the second network depth of node C The network depth is 12.

需要注意的是,本申请节点的第二网络深度的更新和本申请节点转发数据包是两个独立的过程,可以分别单独进行。It should be noted that the update of the second network depth of the node of the present application and the forwarding of the data packet by the node of the present application are two independent processes, which can be performed separately.

关于节点的第二网络深度的更新可以通过两种方式实现,一种是随包更新,另一种是主动更新。其中,随包更新时,节点可以根据自己接收到的数据包,动态地评估自己的第二网络深度,例如采用延时加权滑动算法等实现。主动更新时,可以采用定时主动探测或视情况主动探测(比如网络卡顿时、当前网络负荷比较小时),如出口节点(第二网络深度定义为0,不需要更新)可以主动发起网络深度更新,以使每个节点可以立即更新自己的第二网络深度。The update of the second network depth of the node can be implemented in two ways, one is update with the package, and the other is active update. Wherein, when updating with the packet, the node can dynamically evaluate its second network depth according to the data packet it receives, for example, by using a delay-weighted sliding algorithm. When actively updating, you can use regular active detection or active detection depending on the situation (for example, when the network is stuck, the current network load is relatively small), such as the exit node (the second network depth is defined as 0, no update is required) can actively initiate network depth update, So that each node can immediately update its own second network depth.

步骤S12:节点基于第一网络深度及第二网络深度确定对数据包的转发概率。Step S12: the node determines the forwarding probability of the data packet based on the first network depth and the second network depth.

可选地,本实施例可以通过如图7所示的方法实现步骤S12,本实施例的方法可以包括步骤S71及步骤S72。Optionally, this embodiment may implement step S12 through the method shown in FIG. 7 , and the method of this embodiment may include step S71 and step S72.

步骤S71:节点获取第二网络深度与第一网络深度之间的差值。Step S71: the node acquires the difference between the second network depth and the first network depth.

数据包上行传输时,接收到数据包的节点计算自身的第二网络深度与前一次转发该数据包的节点的第一网络深度(前一次转发该数据包的节点将自身的第二网络深度更新到数据包的字段nwkDepth中作为第一网络深度)之间的差值。When the data packet is transmitted uplink, the node that receives the data packet calculates its own second network depth and the first network depth of the node that forwarded the data packet last time (the node that forwarded the data packet last time updates its second network depth to the field nwkDepth of the packet as the difference between the first network depth).

数据包下行传输时,接收到数据包的节点计算自身的第二网络深度与目标节点的第二网络深度之间的差值,目标节点的第二网络深度在数据包的转发过程中始终保存在字段nwkDepth中作为数据包的第一网络深度。When the data packet is transmitted downlink, the node receiving the data packet calculates the difference between its own second network depth and the second network depth of the target node, and the second network depth of the target node is always saved in the The field nwkDepth is used as the first network depth of the data packet.

步骤S72:基于差值确定对数据包的转发概率。Step S72: Determine the forwarding probability of the data packet based on the difference.

接收到数据包的节点基于该差值确定对该数据包的转发概率。The node receiving the data packet determines the forwarding probability of the data packet based on the difference.

数据包上行传输的原则是尽量让数据包朝着网络深度低的方向传输。任何一个节点收到数据包,如果接收到的数据包的节点的第二网络深度selfDepth小于接收到的数据包的nwkDepth,那么就100%转发该数据包。如果接收到的数据包的节点的第二网络深度selfDepth大于接收到的数据包的nwkDepth,那么就概率性转发该数据包。例如,节点可以将自身的selfDepth更新到nwkDepth字段中去,如节点自身的selfDepth=2,接收到一个nwkDepth=4的上行数据包,决定转发这个数据包,并把数据包的nwkDepth设置成2,转发该数据包。后续这个数据包被其它节点接收到时,nwkDepth字段为2。The principle of data packet uplink transmission is to try to make the data packet transmit towards the direction with low network depth. When any node receives a data packet, if the second network depth selfDepth of the node receiving the data packet is smaller than the nwkDepth of the received data packet, then the data packet is 100% forwarded. If the second network depth selfDepth of the node of the received data packet is greater than the nwkDepth of the received data packet, then the data packet is probabilistically forwarded. For example, a node can update its own selfDepth to the nwkDepth field. For example, if the node's own selfDepth=2 and receives an uplink data packet with nwkDepth=4, it decides to forward the data packet and sets the nwkDepth of the data packet to 2. Forward the packet. When this data packet is subsequently received by other nodes, the nwkDepth field is 2.

数据包下行传输时,出口节点会把该数据包的目标节点的第二网络深度设置到该数据包的nwkDepth字段,该值在传输过程中不再修改。如果接收该数据包的节点的selfDepth大于该数据包的nwkDepth时,那么就适当减少转发概率。When the data packet is transmitted downlink, the egress node will set the second network depth of the destination node of the data packet to the nwkDepth field of the data packet, and this value will not be modified during the transmission process. If the selfDepth of the node receiving the data packet is greater than the nwkDepth of the data packet, then the forwarding probability is appropriately reduced.

可选地,本实施例可以通过步骤S81及步骤S82实现步骤S72。Optionally, in this embodiment, step S72 may be implemented through step S81 and step S82.

步骤S81:响应于差值大于第一阈值,则确定对数据包的转发概率为0。Step S81: In response to the difference being greater than the first threshold, determine that the forwarding probability of the data packet is 0.

响应于差值大于第一阈值,则节点确定对数据包的转发概率为0,不转发该数据包。In response to the difference being greater than the first threshold, the node determines that the forwarding probability of the data packet is 0, and does not forward the data packet.

步骤S82:响应于差值小于或者等于第一阈值,则确定对数据包的转发概率为1;其中,第一阈值为大于或者等于1的自然数。Step S82: In response to the difference being less than or equal to the first threshold, determine that the forwarding probability of the data packet is 1; wherein, the first threshold is a natural number greater than or equal to 1.

响应于差值小于或者等于第一阈值,则节点确定对数据包的转发概率为1,转发该数据包。In response to the difference being less than or equal to the first threshold, the node determines that the forwarding probability of the data packet is 1, and forwards the data packet.

其中,转发概率P满足:P=100%–(selfDepth–nwkDepth–N1)*100%;其中,N1为第一阈值,selfDepth为第二网络深度。Wherein, the forwarding probability P satisfies: P=100%-(selfDepth-nwkDepth-N1)*100%; wherein, N1 is the first threshold, and selfDepth is the second network depth.

在一具体应用场景中,第一阈值可以是1,对于差值大于1的数据包不转发,其余都转发。数据包上行传输时,如数据包的nwkDepth=5,接收数据包的节点的selfDepth=6,计算得到P=100%,转发该书包;又如数据包的nwkDepth=5,接收数据包的节点的selfDepth=7,计算得到P=0%,不转发该数据包;又如数据包的nwkDepth=5,接收数据包的节点的selfDepth=4,计算得到P=300%,转发该数据包。In a specific application scenario, the first threshold may be 1, and the data packets whose difference is greater than 1 are not forwarded, and the rest are forwarded. When the data packet is transmitted upstream, such as nwkDepth=5 of the data packet, selfDepth=6 of the node receiving the data packet, the calculated P=100%, forward the school bag; If selfDepth=7, the calculated P=0%, the data packet is not forwarded; for another example, if nwkDepth=5 of the data packet, selfDepth=4 of the node receiving the data packet, the calculated P=300%, the data packet is forwarded.

数据包下行传输时,如数据包的目标节点的第二网络深度是5,则若该数据包的nwkDepth值为5,且在数据包转发过程中不再修改,若数据包的节点的selfDepth=2,计算得到P=500%,转发该数据包;若接收数据包的节点的selfDepth=6,计算得到P=100%,转发该数据包;若接收数据包的节点的selfDepth=7,计算得到P=0%,不转发该数据包。When the data packet is transmitted downlink, if the second network depth of the target node of the data packet is 5, then if the nwkDepth value of the data packet is 5 and will not be modified during the forwarding process of the data packet, if the selfDepth of the node of the data packet= 2. Calculate P=500%, forward the data packet; if the selfDepth of the node receiving the data packet=6, calculate P=100%, forward the data packet; if the selfDepth of the node receiving the data packet=7, calculate P=0%, the data packet is not forwarded.

在另一实施例中,步骤S12中的转发概率可以随着差值的增加而减小。例如,转发概率P满足以下条件:P=100%–(selfDepth–In another embodiment, the forwarding probability in step S12 may decrease as the difference increases. For example, the forwarding probability P satisfies the following conditions: P=100%–(selfDepth–

nwkDepth)*B%;其中,B为转发概率对差值单位变化量的变化量。nwkDepth)*B%; wherein, B is the change amount of forwarding probability to difference unit change amount.

随着第二网络深度与第一网络深度差距的增加,转发概率越来越小。例如,差值每增加1,转发概率减少25%(B=25%),即p=100%-(selfDepth–nwkDepth)*25%。差值大于或等于4的节点不对数据包进行转发。例如,数据包上行传输时,若数据包的nwkDepth=10,接收数据包的节点的selfDepth=11,计算得到P=75%,表示数据包有75%的概率被转发;若接收数据包的节点的selfDepth=8,计算得到P=150%,转发数据包;若接收数据包的节点的selfDepth=14,计算得到P=0%,不转发数据包。数据包下行传输时,也可以采用类似的方法获取数据包的转发概率,不再赘述。As the gap between the depth of the second network and the depth of the first network increases, the forwarding probability becomes smaller and smaller. For example, every time the difference increases by 1, the forwarding probability decreases by 25% (B=25%), that is, p=100%-(selfDepth−nwkDepth)*25%. Nodes with a difference greater than or equal to 4 do not forward the data packet. For example, when a data packet is transmitted upstream, if nwkDepth=10 of the data packet, selfDepth=11 of the node receiving the data packet, the calculated P=75%, means that the data packet has a 75% probability of being forwarded; if the node receiving the data packet If the selfDepth=8, the calculated P=150%, the data packet is forwarded; if the selfDepth=14 of the node receiving the data packet, the calculated P=0%, the data packet is not forwarded. When the data packet is transmitted downlink, a similar method may also be used to obtain the forwarding probability of the data packet, which will not be repeated here.

在另一实施例中,还可以采用下述方法实现步骤S12:In another embodiment, the following method can also be used to implement step S12:

响应于差值小于或者等于第二阈值,则确定对数据包的转发概率为1。响应于差值大于第二阈值,则确定对数据包的转发概率小于1,且所发概率随着差值的增加而减少;其中,第二阈值为大于或者等于1的自然数。In response to the difference being less than or equal to the second threshold, it is determined that the forwarding probability of the data packet is 1. In response to the difference being greater than the second threshold, it is determined that the forwarding probability of the data packet is less than 1, and the sending probability decreases as the difference increases; wherein the second threshold is a natural number greater than or equal to 1.

在一具体应用场景中,第二阈值可以是2,差值在2以内都转发,差值在2以上,差值每增加一,转发概率减少33.3%,即P=1–In a specific application scenario, the second threshold can be 2, and the difference is within 2, all forwarding, and the difference is more than 2, and the forwarding probability decreases by 33.3% for every increase of the difference, that is, P=1–

(selfDepth–nwkDepth–2)*20%。(selfDepth–nwkDepth–2)*20%.

上行算法和下行算法可以设置得不一样,根据各自的情况优化,不再赘述。The uplink algorithm and the downlink algorithm can be set differently, and are optimized according to their respective situations, and will not be repeated here.

步骤S13:节点基于转发概率对数据包进行转发。Step S13: The node forwards the data packet based on the forwarding probability.

节点基于上述P的大小对数据包进行转发,其中P小于或者等于0%,不转发数据包,P大于或者等于100%,一定转发数据包。The node forwards the data packet based on the size of P above. If P is less than or equal to 0%, the data packet will not be forwarded, and if P is greater than or equal to 100%, the data packet must be forwarded.

本实施例mesh网络的数据传输方法中,在mesh网络的某节点接收到数据包后,从数据包获取第一网络深度及获取该节点自身的第二网络深度,且该节点基于第一网络深度及第二网络深度确定对该数据包的转发概率,并基于该转发概率对该数据包进行转发。本实施例能够控制不同网络深度的节点对接收的数据包的转发概率,使得数据包不需要传遍整个mesh网络就能完成数据的传输,因此能够提高mesh网络的网络泛洪的抑制效果。In the data transmission method of the mesh network in this embodiment, after a certain node of the mesh network receives the data packet, the first network depth and the second network depth of the node are obtained from the data packet, and the node is based on the first network depth And the second network depth determines the forwarding probability of the data packet, and forwards the data packet based on the forwarding probability. This embodiment can control the forwarding probability of received data packets by nodes with different network depths, so that the data packets can complete the data transmission without spreading the entire mesh network, and thus can improve the suppression effect of network flooding in the mesh network.

进一步地,本实施例能够避免一部分的无效的传输,减少整个mesh网络的数据传输冗余,减小网络负荷,增加网络最大容量和通信带宽。Furthermore, this embodiment can avoid a part of invalid transmission, reduce data transmission redundancy of the entire mesh network, reduce network load, and increase network maximum capacity and communication bandwidth.

如图8所示,在节点接收到数据包,且处理随包信息后,确定数据包的传输类型,并利用对应的算法确定该数据包的转发概率,基于转发概率确定是否转发该数据包;在节点确定转发数据包后,在节点转发数据包之前,进一步地,响应于数据包的传输类型为上行传输,则将节点的第二网络深度更新至数据包中的网络深度字段中,以更新数据包的第一网络深度,其中,述网络深度字段中的初始值为发送数据包的源节点的网络深度;响应于传输类型为下行传输,则保持网络深度字段中的第一网络深度,其中,第一网络深度为接收数据包的目标节点的网络深度;最后转发该数据包。As shown in Figure 8, after the node receives the data packet and processes the accompanying information, determine the transmission type of the data packet, and use the corresponding algorithm to determine the forwarding probability of the data packet, and determine whether to forward the data packet based on the forwarding probability; After the node determines to forward the data packet, before the node forwards the data packet, further, in response to the transmission type of the data packet being uplink transmission, the second network depth of the node is updated to the network depth field in the data packet to update The first network depth of the data packet, wherein the initial value in the network depth field is the network depth of the source node sending the data packet; in response to the transmission type being downlink transmission, the first network depth in the network depth field is maintained, wherein , the first network depth is the network depth of the target node receiving the data packet; finally forward the data packet.

本申请进一步提出一种电子设备,如图9所示,图9是本申请电子设备一实施例的结构示意图。本实施例电子设备100包括处理器101、与处理器101耦接的存储器102、输入输出设备103以及总线104。The present application further proposes an electronic device, as shown in FIG. 9 , which is a schematic structural diagram of an embodiment of the electronic device of the present application. The electronic device 100 in this embodiment includes a processor 101 , a memory 102 coupled to the processor 101 , an input and output device 103 and a bus 104 .

该处理器101、存储器102、输入输出设备103分别与总线104相连,该存储器102中存储有程序数据,处理器101用于执行程序数据以实现上述数据传输方法。The processor 101 , the memory 102 , and the input/output device 103 are respectively connected to the bus 104 , the memory 102 stores program data, and the processor 101 is used to execute the program data to realize the above data transmission method.

在本实施例中,处理器101还可以称为CPU(Central Processing Unit,中央处理单元)。处理器101可能是一种集成电路芯片,具有信号的处理能力。处理器101还可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器101也可以是任何常规的处理器等。In this embodiment, the processor 101 may also be referred to as a CPU (Central Processing Unit, central processing unit). The processor 101 may be an integrated circuit chip with signal processing capability. The processor 101 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components . The general-purpose processor may be a microprocessor or the processor 101 may be any conventional processor or the like.

本申请进一步提出一种计算机可读存储介质,如图10所示,图10是本申请计算机可读存储介质一实施例的结构示意图。计算机可读存储介质131其上存储有程序数据132,程序数据132被处理器(图未示)执行时实现上述数据传输方法。The present application further proposes a computer-readable storage medium, as shown in FIG. 10 , which is a schematic structural diagram of an embodiment of the computer-readable storage medium of the present application. The computer-readable storage medium 131 stores program data 132 thereon, and when the program data 132 is executed by a processor (not shown in the figure), the above-mentioned data transmission method is implemented.

本实施例计算机可读存储介质131可以是但不局限于U盘、SD卡、PD光驱、移动硬盘、大容量软驱、闪存、多媒体记忆卡、服务器等。The computer-readable storage medium 131 of this embodiment may be, but not limited to, a USB flash drive, an SD card, a PD optical drive, a mobile hard disk, a large-capacity floppy drive, a flash memory, a multimedia memory card, a server, and the like.

本申请mesh网络的数据传输方法中,在mesh网络的某节点接收到数据包后,从数据包获取第一网络深度及获取该节点自身的第二网络深度,且该节点基于第一网络深度及第二网络深度确定对该数据包的转发概率,并基于该转发概率对该数据包进行转发。本申请能够控制不同网络深度的节点对接收的数据包的转发概率,使得数据包不需要传遍整个mesh网络就能完成数据的传输,因此能够提高mesh网络的网络泛洪的抑制效果。In the data transmission method of the mesh network of the present application, after a certain node of the mesh network receives the data packet, the first network depth and the second network depth of the node are obtained from the data packet, and the node is based on the first network depth and The second network depth determines the forwarding probability of the data packet, and forwards the data packet based on the forwarding probability. The application can control the forwarding probability of received data packets by nodes with different network depths, so that the data packets can complete the data transmission without spreading the entire mesh network, thus improving the suppression effect of network flooding in the mesh network.

进一步地,本申请能够避免一部分的无效的传输,减少整个mesh网络的数据传输冗余,减小网络负荷,增加网络最大容量和通信带宽。Furthermore, the present application can avoid part of invalid transmission, reduce data transmission redundancy of the entire mesh network, reduce network load, and increase maximum network capacity and communication bandwidth.

另外,上述功能如果以软件功能的形式实现并作为独立产品销售或使用时,可存储在一个移动终端可读取存储介质中,即,本申请还提供一种存储有程序数据的存储装置,所述程序数据能够被执行以实现上述实施例的方法,该存储装置可以为如U盘、光盘、服务器等。也就是说,本申请可以以软件产品的形式体现出来,其包括若干指令用以使得一台智能终端执行各个实施例所述方法的全部或部分步骤。In addition, if the above-mentioned functions are implemented in the form of software functions and sold or used as independent products, they can be stored in a storage medium that can be read by a mobile terminal, that is, the application also provides a storage device that stores program data, so The above program data can be executed to implement the methods of the above embodiments, and the storage device can be, for example, a U disk, an optical disk, a server, and the like. That is to say, the present application may be embodied in the form of a software product, which includes several instructions for enabling an intelligent terminal to execute all or part of the steps of the method described in each embodiment.

在本申请的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this application, reference to the terms "one embodiment," "some embodiments," "example," "specific examples," or "some examples" means that specific features described in connection with that embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present application, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent modules, segments or portions of code comprising one or more executable instructions for implementing specific logical functions or steps of the process , and the scope of preferred embodiments of the present application includes additional implementations in which functions may be performed out of the order shown or discussed, including in substantially simultaneous fashion or in reverse order depending on the functions involved, which shall It should be understood by those skilled in the art to which the embodiments of the present application belong.

在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(可以是个人计算机,服务器,网络设备或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,“计算机可读介质”可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium, For the use of instruction execution systems, devices or equipment (which may be personal computers, servers, network equipment or other systems that can fetch instructions from instruction execution systems, devices or devices and execute instructions), or in combination with these instruction execution systems, devices or devices And use. For the purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use in or in conjunction with an instruction execution system, device or device. More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection with one or more wires (electronic device), portable computer disk case (magnetic device), random access memory (RAM), Read Only Memory (ROM), Erasable and Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program can be printed, since the program can be read, for example, by optically scanning the paper or other medium, followed by editing, interpretation or other suitable processing if necessary. The program is processed electronically and stored in computer memory.

若本申请技术方案涉及个人信息,应用本申请技术方案的产品在处理个人信息前,已明确告知个人信息处理规则,并取得个人自主同意。若本申请技术方案涉及敏感个人信息,应用本申请技术方案的产品在处理敏感个人信息前,已取得个人单独同意,并且同时满足“明示同意”的要求。例如,在摄像头等个人信息采集装置处,设置明确显著的标识告知已进入个人信息采集范围,将会对个人信息进行采集,若个人自愿进入采集范围即视为同意对其个人信息进行采集;或者在个人信息处理的装置上,利用明显的标识/信息告知个人信息处理规则的情况下,通过弹窗信息或请个人自行上传其个人信息等方式获得个人授权;其中,个人信息处理规则可包括个人信息处理者、个人信息处理目的、处理方式以及处理的个人信息种类等信息。If the technical solution of this application involves personal information, the product applying the technical solution of this application has clearly notified the personal information processing rules and obtained the individual's independent consent before processing personal information. If the technical solution of this application involves sensitive personal information, the products applying the technical solution of this application have obtained individual consent before processing sensitive personal information, and at the same time meet the requirements of "express consent". For example, at a personal information collection device such as a camera, a clear and prominent sign is set up to inform that it has entered the scope of personal information collection, and personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed to agree to the collection of his personal information; or On the personal information processing device, when the personal information processing rules are informed with obvious signs/information, personal authorization is obtained through pop-up information or by asking individuals to upload their personal information; among them, the personal information processing rules may include Information such as the information processor, the purpose of personal information processing, the method of processing, and the type of personal information processed.

以上所述仅为本申请的实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only an embodiment of the application, and does not limit the patent scope of the application. Any equivalent structure or equivalent process conversion made by using the specification and drawings of the application, or directly or indirectly used in other related technologies fields, are all included in the scope of patent protection of this application in the same way.

Claims (10)

1. A data transmission method of a mesh network is characterized in that the mesh network is provided with a plurality of nodes, and the data transmission method comprises the following steps:
the node receives a data packet, and acquires a first network depth and a second network depth from the data packet;
the node determining a forwarding probability for the data packet based on the first network depth and the second network depth;
and the node forwards the data packet based on the forwarding probability.
2. The data transmission method according to claim 1, wherein the data packet is provided with a transmission type field and a network depth field, the network depth field is used for setting the first network depth, and after the data packet is forwarded, the method further comprises:
determining a transmission type of the data packet based on the transmission type field in the data packet;
in response to that the transmission type is uplink transmission, updating a second network depth of the node into the network depth field in the data packet to update a first network depth of the data packet, wherein an initial value in the network depth field is a network depth of a source node which sends the data packet;
and in response to the transmission type being downlink transmission, maintaining a first network depth in the network depth field, wherein the first network depth is a network depth of a target node receiving the data packet.
3. The data transmission method of claim 2, wherein the determining the forwarding probability for the data packet based on the first network depth and the second network depth comprises:
obtaining a difference between the second network depth and the first network depth;
determining a forwarding probability for the packet based on the difference.
4. The method of claim 3, wherein the determining the forwarding probability for the data packet based on the difference value comprises:
in response to the difference being greater than a first threshold, determining that a forwarding probability for the data packet is 0;
in response to the difference value being less than or equal to the first threshold value, determining that the forwarding probability for the data packet is 1;
wherein the first threshold is a natural number greater than or equal to 1.
5. A method according to claim 3, characterized in that the forwarding probability decreases as the difference increases.
6. The data transmission method of claim 3, wherein the determining the forwarding probability for the data packet based on the difference value comprises:
in response to the difference being less than or equal to a second threshold, determining that the forwarding probability for the data packet is 1;
in response to the difference being greater than the second threshold, determining that a forwarding probability for the packet is less than 1, and the forwarding probability decreases as the difference increases;
wherein the second threshold is a natural number greater than or equal to 1.
7. The data transmission method according to any one of claims 1 to 6, further comprising:
updating the second network depth of the node itself.
8. The data transmission method according to claim 7, wherein the updating the second network depth of the node itself comprises:
determining a plurality of transmission paths associated with the node;
calculating the weighted value of the attenuation coefficient between the nodes to the hop count between the nodes aiming at each transmission path;
updating the second network depth of the node based on a minimum of the weighting values.
9. An electronic device, comprising: a processor and a memory, the memory having stored therein program data, the processor being configured to execute the program data to implement the data transfer method of any of claims 1-8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores program data which, when executed by a processor, implements the data transmission method according to any one of claims 1 to 8.
CN202211308058.3A 2022-10-24 2022-10-24 Data transmission method of mesh network, electronic equipment and storage medium Pending CN115915263A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211308058.3A CN115915263A (en) 2022-10-24 2022-10-24 Data transmission method of mesh network, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211308058.3A CN115915263A (en) 2022-10-24 2022-10-24 Data transmission method of mesh network, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115915263A true CN115915263A (en) 2023-04-04

Family

ID=86486301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211308058.3A Pending CN115915263A (en) 2022-10-24 2022-10-24 Data transmission method of mesh network, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115915263A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117201388A (en) * 2023-11-06 2023-12-08 浙江大华技术股份有限公司 Network node control method, electronic device, and computer-readable storage medium
CN118921316A (en) * 2024-10-12 2024-11-08 浙江大华技术股份有限公司 Data packet sending method, electronic equipment and computer storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090232038A1 (en) * 2006-04-03 2009-09-17 Gonzalez-Velazquez Antonio E Autonomous wireless networks
CN102984764A (en) * 2012-12-19 2013-03-20 山东黄金集团有限公司 Multicast routing method based on energy balanced deep-space sensor network
CN104936249A (en) * 2015-06-05 2015-09-23 电子科技大学 A Routing Self-Healing Method Applicable to Wireless Networks
CN109951834A (en) * 2019-04-04 2019-06-28 苏州博联科技有限公司 Bluetooth mesh method for routing based on the improved algorithm that floods
US20190327175A1 (en) * 2018-04-20 2019-10-24 EMC IP Holding Company LLC Methods, apparatuses and computer program products for transmitting data
CN111866982A (en) * 2020-06-19 2020-10-30 青海师范大学 A Hierarchical Energy Balanced Underwater Acoustic Network Routing Protocol Method
CN113365089A (en) * 2021-05-31 2021-09-07 浙江大华技术股份有限公司 Data transmission method and device, storage medium and electronic device
WO2022127422A1 (en) * 2020-12-17 2022-06-23 中兴通讯股份有限公司 Network quality evaluation method and apparatus, and electronic device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090232038A1 (en) * 2006-04-03 2009-09-17 Gonzalez-Velazquez Antonio E Autonomous wireless networks
CN102984764A (en) * 2012-12-19 2013-03-20 山东黄金集团有限公司 Multicast routing method based on energy balanced deep-space sensor network
CN104936249A (en) * 2015-06-05 2015-09-23 电子科技大学 A Routing Self-Healing Method Applicable to Wireless Networks
US20190327175A1 (en) * 2018-04-20 2019-10-24 EMC IP Holding Company LLC Methods, apparatuses and computer program products for transmitting data
CN109951834A (en) * 2019-04-04 2019-06-28 苏州博联科技有限公司 Bluetooth mesh method for routing based on the improved algorithm that floods
CN111866982A (en) * 2020-06-19 2020-10-30 青海师范大学 A Hierarchical Energy Balanced Underwater Acoustic Network Routing Protocol Method
WO2022127422A1 (en) * 2020-12-17 2022-06-23 中兴通讯股份有限公司 Network quality evaluation method and apparatus, and electronic device and storage medium
CN113365089A (en) * 2021-05-31 2021-09-07 浙江大华技术股份有限公司 Data transmission method and device, storage medium and electronic device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LENOVO, MOTOROLA MOBILITY: "R2-1915136 "Paging probability information based UE grouping"", 3GPP TSG_RAN\\WG2_RL2, no. 2, 8 November 2019 (2019-11-08) *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117201388A (en) * 2023-11-06 2023-12-08 浙江大华技术股份有限公司 Network node control method, electronic device, and computer-readable storage medium
CN117201388B (en) * 2023-11-06 2024-02-02 浙江大华技术股份有限公司 Network node control method, electronic device, and computer-readable storage medium
CN118921316A (en) * 2024-10-12 2024-11-08 浙江大华技术股份有限公司 Data packet sending method, electronic equipment and computer storage medium
CN118921316B (en) * 2024-10-12 2024-12-17 浙江大华技术股份有限公司 Data packet sending method, electronic equipment and computer storage medium

Similar Documents

Publication Publication Date Title
CN115915263A (en) Data transmission method of mesh network, electronic equipment and storage medium
WO2018077100A1 (en) Method and apparatus for determining tcp congestion window
CN103905447A (en) Service link selection control method and device
CN101741732B (en) Extension managing method for network node memory in capacity delay network
US10389644B2 (en) Method and apparatus for waveform independent congestion control
CN108881009A (en) Based on the delay constraint method for routing and device for facing sky Information Network
CN110351200A (en) A kind of opportunistic network jamming control method based on forwarding task immigration
CN101014009A (en) Packet forwarding control system and method
CN103312469B (en) Confirmation in multicast retransmission represents system of selection and device
CN108347377B (en) Data forwarding method and device
CN101951657B (en) Data routing method and sensor node
US11375434B2 (en) Method and mesh node for enabling communication in a wireless mesh network
WO2019015036A1 (en) Repeater bridging method and gateway
CN114466404A (en) Service flow data transmission method, device, electronic device and storage medium
WO2015085849A1 (en) Method for network device congestion avoidance and network device
CN104813640B (en) A kind of Sink node method for routing and node device
JP4808731B2 (en) Method for adjusting load between subsystems in a communication network system
CN106211259B (en) A routing implementation method and implementation device for a delay-tolerant network
US8107451B2 (en) Efficient deallocation of network resources based on network node location extrapolation
WO2019010799A1 (en) Internet of things terminal migration method and gateway
CN106341775A (en) Data transmission method and device
Malarvizhi et al. RETRACTED ARTICLE: Dynamic scheduling and congestion control for minimizing delay in multihop wireless networks
CN105704192A (en) Method and device for determining controller location in SDN network
CN106357552B (en) A kind of jamming control method and network node
US10965585B2 (en) Method for transmitting path load information and network node

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