CN117880176A - Transmission path configuration method and device and electronic equipment - Google Patents

Transmission path configuration method and device and electronic equipment Download PDF

Info

Publication number
CN117880176A
CN117880176A CN202311777983.5A CN202311777983A CN117880176A CN 117880176 A CN117880176 A CN 117880176A CN 202311777983 A CN202311777983 A CN 202311777983A CN 117880176 A CN117880176 A CN 117880176A
Authority
CN
China
Prior art keywords
target
path information
networking
path
equipment
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
CN202311777983.5A
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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202311777983.5A priority Critical patent/CN117880176A/en
Publication of CN117880176A publication Critical patent/CN117880176A/en
Pending legal-status Critical Current

Links

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

The application provides a transmission path configuration method, a transmission path configuration device and electronic equipment, and belongs to the technical field of electronic equipment. The transmission path configuration method comprises the following steps: broadcasting a connection request to the target equipment group under the condition that the target equipment is accessed to the target equipment group for the first time; receiving a connection response sent by the first networking device, and recording initial path information, wherein the initial path information comprises: the shortest path length from the target device to the first networking device; acquiring target path information of first networking equipment; updating the initial path information based on the target path information to obtain target path information of the target device, wherein the target path information of the target device records next hop devices of the target device on shortest paths of any device in the target device group, and the target path information is used for the target device to transmit information based on the shortest paths. According to the method and the device, the equipment for receiving the information in the single information transmission process is reduced, and the resource consumption of communication between networking equipment is reduced.

Description

Transmission path configuration method and device and electronic equipment
Technical Field
The present disclosure relates to the field of electronic devices, and in particular, to a transmission path configuration method and apparatus, and an electronic device.
Background
The internet of things refers to a network that connects various hardware devices according to a defined protocol so that the various hardware devices can exchange information. The intelligent recognition, positioning, supervision and other functions of various hardware devices can be realized through the Internet of things. With the development of the internet of things technology, the number of internet of things devices is increasing.
All the internet of things devices in the networking are connected, and communication among all the internet of things devices usually adopts a broadcasting mode. If one of the internet of things devices needs to send a message to a target internet of things device in the network, the internet of things device needs to send a message to each of the internet of things devices in the network, so that the target internet of things device receives the message by broadcasting the message to all the internet of things devices in the network.
However, with the increase of internet of things devices in networking, the problem of relatively high communication resource consumption exists in a communication mode that the internet of things devices adopt a broadcasting mode.
Disclosure of Invention
In view of this, the application aims to provide a transmission path configuration method, a transmission path configuration device and electronic equipment, so as to solve the problem that communication resources are consumed greatly in a communication mode of broadcasting mode of internet of things equipment along with the increase of the internet of things equipment in networking at present.
In order to achieve the above purpose, the technical scheme of the application is realized as follows:
in a first aspect, the present application provides a transmission path configuration method, where the method includes:
broadcasting a connection request to a target equipment group under the condition that the target equipment is accessed to the target equipment group for the first time;
receiving a connection response sent by a first networking device, wherein the first networking device is networking device directly connected with the target device in a plurality of networking devices included in the target device group;
recording initial path information, the initial path information including: the shortest path length from the target device to the first networking device;
acquiring target path information of the first networking device, wherein the target path information comprises: the shortest path length from the first networking device to the second networking device, and the next-hop device of the first networking device on the shortest path, wherein the second networking device is any device included by the target device group before the target device is accessed;
and updating the initial path information based on the target path information to obtain target path information of the target equipment, wherein the target path information of the target equipment records the next hop equipment of the target equipment on the shortest paths of the target equipment to any equipment in the target equipment group, and the target path information is used for the target equipment to transmit information based on the shortest paths.
Optionally, the updating the initial path information based on the target path information obtains target path information of the target device. Comprising the following steps:
determining intermediate path information according to the target path information of the first networking device, wherein the intermediate path information records the shortest path length from the target device to the second networking device through the first networking device and the next hop device of the target device on the shortest path;
and updating the initial path information according to the intermediate path information to obtain the target path information of the target equipment.
Optionally, the initial path information includes multiple sets of path data, each set of path data includes a device identifier of an end point device and a shortest path length, and the end point device in the initial path information is the first networking device;
the target path information of the first networking device comprises a plurality of groups of path data, each group of path data comprises a device identifier of an end point device, a device identifier of a next hop device and a shortest path length, and the end point device in the target path information of the first networking device is the second networking device;
the determining intermediate path information according to the target path information of the first networking device includes: and adding 1 to the shortest path length in the target path information of the first networking device, and updating the device identification of the next-hop device to the device identification of the first networking device to obtain the intermediate path information.
Optionally, the updating the initial path information according to the intermediate path information to obtain the target path information of the target device includes:
traversing the equipment identifier of the terminal equipment of the intermediate path information, and determining the currently traversed target equipment identifier;
under the condition that the target equipment identifier does not exist in the initial path information, adding a group of path data in which the target equipment identifier is positioned in the intermediate path information to the initial path information to obtain target path information of the target equipment;
when the target equipment identifier exists in the initial path information and the shortest path length corresponding to the target equipment identifier in the initial path information is smaller than or equal to the shortest path length corresponding to the intermediate path information, a group of path data where the target equipment identifier is located is reserved in the initial path information, and target path information of the target equipment is obtained;
and under the condition that the target equipment identifier exists in the initial path information and the shortest path length corresponding to the target equipment identifier in the initial path information is larger than the shortest path length corresponding to the intermediate path information, replacing a group of path data in which the target equipment identifier is positioned in the initial path information with a group of path data in which the target equipment identifier is positioned in the intermediate path information to obtain the target path information of the target equipment.
Optionally, the target path information of the target device is further used for recording the shortest path length from the target device to any device in the target device group;
the target path information of the target device is used for updating the target path information of the third networking device by the third networking device, so that the updated target path information records the shortest path length from the third networking device to any device in the target device group and the next-hop device of the third networking device on the shortest path, and the third networking device is a device except the target device in the target device group.
In a second aspect, the present application provides a transmission path configuration method applied to a third networking device, where the third networking device is any device except a target device in a target device group, including:
after the target device is updated to obtain the target path information, broadcasting a connection request to the target device group;
receiving a connection response sent by fourth networking equipment, wherein the fourth networking equipment is equipment which is directly connected with the third networking equipment in the target equipment group;
acquiring target path information of the fourth networking device, wherein the target path information of the fourth networking device comprises the shortest path length from the fourth networking device to any device in the target device group and the next-hop networking device of the fourth networking device on the shortest path;
And updating the target path information of the third networking equipment based on the target path information of the fourth networking equipment.
Optionally, the method further comprises:
responding to a path verification instruction, and sending a path verification request to next hop equipment in target path information of the third networking equipment;
under the condition that a path verification response of the end point equipment on the shortest path corresponding to the next-hop equipment is received, determining that the shortest path corresponding to the next-hop equipment is available;
and under the condition that the path verification response of the end point equipment on the shortest path corresponding to the next-hop equipment is not received, determining that the shortest path corresponding to the next-hop equipment is unavailable.
In a third aspect, the present application provides a transmission path configuration apparatus, which is applied to a target device, and includes:
a broadcasting module, configured to broadcast a connection request to a target device group when the target device first accesses the target device group;
the receiving module is used for receiving a connection response sent by a first networking device, wherein the first networking device is networking device which is directly connected with the target device in a plurality of networking devices included in the target device group;
The recording module is used for recording initial path information, and the initial path information comprises: the shortest path length from the target device to the first networking device;
the acquisition module is configured to acquire target path information of the first networking device, where the target path information includes: the shortest path length from the first networking device to the second networking device, and the next-hop device of the first networking device on the shortest path, wherein the second networking device is any device included by the target device group before the target device is accessed;
the updating module is used for updating the initial path information based on the target path information to obtain target path information of the target device, the target path information of the target device records the next hop devices of the target device on the shortest paths of the target device to any device in the target device group, and the target path information is used for the target device to transmit information based on the shortest paths.
In a fourth aspect, the present application provides a transmission path configuration apparatus, which is applied to a third networking device, where the third networking device is any device other than a target device in a target device group, and includes:
The broadcasting module is used for broadcasting a connection request to the target equipment group after the target equipment is updated to obtain the target path information of the target equipment;
the receiving module is used for receiving a connection response sent by fourth networking equipment, wherein the fourth networking equipment is equipment which is directly connected with the third networking equipment in the target equipment group;
the acquisition module is used for acquiring target path information of the fourth networking device, wherein the target path information of the fourth networking device comprises the shortest path length from the fourth networking device to any device in the target device group and the next-hop networking device of the fourth networking device on the shortest path;
and the updating module is used for updating the target path information of the third networking equipment based on the target path information of the fourth networking equipment.
In a fifth aspect, the present application provides an electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, the program or instruction implementing the steps of the transmission path configuration method according to the first or second aspect when executed by the processor.
In a sixth aspect, the present application provides a readable storage medium having stored thereon a program or instructions which when executed by a processor implement the steps of the transmission path configuration method according to the first or second aspect.
In a seventh aspect, the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor being coupled, the processor being configured to execute a program or instructions to implement the transmission path configuration method according to the first aspect or the second aspect.
The present application has the following advantages over the related art:
in the embodiment of the present application, when the target device first accesses the target device group, a connection request is broadcast to the target device group, so as to receive a connection response sent by a first networking device directly connected to the target device in the target device group, thereby recording initial path information. The initial path information includes: the shortest path length from the target device to the first networking device. And obtaining the target path information of the target device by updating the initial path information based on the target path information by obtaining the target path information of the first networking device.
In the technical scheme, the target path information of the target device records the next hop device of the target device on the shortest path from the target device to any device in the target device group. When the target device needs to send information to any end device in the target device group, the information can be transmitted to the next-hop device corresponding to the shortest path from the target device to the end device, which is recorded in the target path information of the target device, so that the next-hop device can transmit the information to the next-hop device corresponding to the shortest path from the next-hop device to the end device, which is recorded in the target path information of the target device, until the information is transmitted to the end device through the shortest path from the target device to the end device. Compared with the related art, the method reduces the equipment for receiving information in the single information transmission process and reduces the resource consumption of communication between networking equipment. And the shortest path is utilized to transmit information, so that the communication resource overhead of the networking equipment is ensured to be lower, and the problem of saving the communication resource consumption is further solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application, illustrate and explain the application and are not to be construed as limiting the application. In the drawings:
Fig. 1 is a schematic diagram of an implementation environment of a transmission path configuration method according to an embodiment of the present application;
fig. 2 is a flowchart of a transmission path configuration method provided in an embodiment of the present application;
fig. 3 is a flowchart of a method for updating target path information according to an embodiment of the present application;
FIG. 4 is a flowchart of another method for updating target path information according to an embodiment of the present disclosure;
fig. 5 is a flowchart of another transmission path configuration method according to an embodiment of the present application;
fig. 6 is a flowchart of a path verification method provided in an embodiment of the present application;
fig. 7 is a flowchart of a transmission path configuration method according to another embodiment of the present application;
fig. 8 is a flowchart of a transmission path configuration method according to another embodiment of the present application;
fig. 9 is a block diagram of a transmission path configuration apparatus provided in an embodiment of the present application;
fig. 10 is a block diagram of another transmission path configuration apparatus provided in an embodiment of the present application;
fig. 11 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a schematic diagram of an implementation environment of a transmission path configuration method according to an embodiment of the present application. As shown in fig. 1, the implementation environment 10 includes a target device group 10 that is a device group formed by networking a plurality of networking devices. Alternatively, the networking device may be a personal computer, tablet, bluetooth sound, home appliance, etc. In an optional application scenario, an implementation environment of the transmission path configuration method is an internet of things environment. The target equipment group is an Internet of things equipment group. The plurality of networking devices included in the target device group are all internet of things devices.
The target device group includes a target device 101 accessed for the first time and other networking devices 102. Optionally, wireless network connection such as wifi, bluetooth, zigbee and the like may be adopted between each networking device in the target device group. In an optional application scenario, each networking device in the target device group has a broadcasting function, a storage function, and a data forwarding function. It should be noted that fig. 1 includes, with the target device group: six networking devices, i.e., the target device 101, the first device, and the fifth device 102, are illustrated as examples. The target device 101 is directly connected to a first device, which is also directly connected to a third device, a fourth device, and a fifth device, and to a second device, which is also directly connected to the fifth device. The fifth device is also directly connected to the fourth device.
In order to facilitate understanding of the technical solution of the present application, the following explains some terms related to the present application.
Path length: also known as path distance. The path length from device a to device B refers to the number of devices forwarding data during the transmission of data from device a to device B. For example, as shown in fig. 1, if data of the target device is transmitted to the third device through the first device, the path length from the target device to the third device is 2.
Shortest path length: the shortest path length from device a to device B refers to the minimum number of devices within the target device group that forward data during the transfer of data from device a to device B. In this case, the data transmission path from device a to device B is the shortest path.
Next hop device: the next hop device of the networking device refers to the next device, along which data of the networking device can be transmitted in the data transmission direction, in the data transmission process of the networking device, that is, the next device, on which data of the networking device can be forwarded.
For example, as shown in fig. 1, data of a target device may be transmitted to a fourth device through a first device under one path. In another path, the data of the target device may be transmitted to the fourth device through the first device and the fifth device. That is, the transmission paths of the target device to the fifth device include: a first path and a second path. The first path is: target device-first device-fourth device; the second path is: target device-first device-fifth device-fourth device. The path length of the first path is 2; the path length of the second path is 3. It will be appreciated that the shortest path from the target device to the fourth device is the first path, and the shortest path length is 2. The next hop device of the target device on the shortest path is the first device.
Referring to fig. 2, a flowchart of a transmission path configuration method provided in an embodiment of the present application is shown. The transmission path configuration method can be applied to the implementation environment described in fig. 1. As shown in fig. 2, the transmission path configuration method includes:
step 201, the target device broadcasts a connection request to the target device group when the target device first accesses the target device group.
Alternatively, the target device may broadcast the connection request to the target device group by sending the connection request to each networking device in the target device group when the target device first accesses the target device group, i.e., when the target device first enters the network area in which the target device group is located. Wherein the connection request is for requesting establishment of a communication connection with the target device.
Step 202, the first networking device sends a connection response to the target device.
In this embodiment of the present application, after receiving a connection request sent by a target device, the first networking device may return a connection response of the connection request to the target device, so that the target device may receive the connection response sent by the first networking device.
The first networking device is also called as a direct connection device of the target device, and is a networking device directly connected with the target device in a plurality of networking devices included in the target device group. It should be noted that the number of the first networking devices in the target device group may be one or more. For example, as shown in fig. 1, the target device group includes two first networking devices that establish a direct connection with the target device: a first device and a second device.
Step 203, the target device records the initial path information. The initial path information includes: the shortest path length from the target device to the first networking device.
In this embodiment of the present application, the initial path information is used to record a shortest path length from the target device to the first networking device. For example, as shown in fig. 1, the target device may receive a connection response of the first device and the second device. I.e. the first networking device is a first device and a second device. The initial path information of the target device includes: the shortest path length 1 of the target device to the first device, and the shortest path length 1 of the target device to the second device.
Optionally, the initial path information may further include: the target device is next-hop device to the target device on the shortest path to the first networking device. It will be appreciated that since the target device and the first networking device are directly connected. Thus, the next hop device on the shortest path from the target device to the first networking device is the first networking device.
Illustratively, the target device is target device 101 in the target device group of FIG. 1. The initial path information includes: shortest path length 1 from target device to first device, next hop device of shortest path: a first device. Shortest path length 1 from target device to second device, next hop device of shortest path: a second device.
Further alternatively, the initial path information may also record its setup time, device identification of the end device, etc. The terminal device of the initial path information is the first networking device.
Step 204, the target device obtains the target path information of the first networking device. The target path information includes: the shortest path length from the first networking device to the second networking device, and the next hop device of the first networking device on the shortest path.
The second networking device is any device included by the target device group before the target device is accessed. For example, as shown in fig. 1, the target device group includes first to fifth devices before accessing the target device. The second networking device is the first device to the fifth device. In this embodiment of the present application, each networking device in the target device group stores its target path information. The target path information of the networking device needs to record the shortest path length from the networking device to any device in the target device group and the next hop device of the networking device on the shortest path. Optionally, the target path information may also record its setup time, device identification of the end point device, etc. The destination device of the target path information is the second networking device.
In an example, in a case where the first networking device is the first device, the second networking device is the second device to the fifth device. The target path information of the first networking device includes: the shortest path length from the first networking device to the second device, and the next hop device of the first networking device on the shortest path; the shortest path length from the first networking device to the third device, and the next hop device of the first networking device on the shortest path; the shortest path length from the first networking device to the fourth device, and the next hop device of the first networking device on the shortest path; the shortest path length from the first networking device to the fifth device, and the next hop device of the first networking device on the shortest path.
And under the condition that the first networking equipment is the second equipment, the second networking equipment is the first equipment, the third equipment and the fifth equipment. The target path information of the first networking device includes: the shortest path length from the first networking device to the first device, and the next hop device of the first networking device on the shortest path; the shortest path length from the first networking device to the third device, and the next hop device of the first networking device on the shortest path; the shortest path length from the first networking device to the fourth device, and the next hop device of the first networking device on the shortest path; the shortest path length from the first networking device to the fifth device, and the next hop device of the first networking device on the shortest path.
Optionally, the connection response of the first networking device may carry the target path information of the first networking device. Based on this, the target device may parse the connection response to obtain target path information for the first networking device.
Or after the first networking device sends the connection response to the target device, the first networking device sends the target path information to the target device, so that the target device obtains the target path information of the first networking device by receiving the target path information sent by the first networking device.
It should be noted that, as described above, the number of the first networking devices may be one or more. And under the condition that the number of the first networking devices is a plurality of, the target device can acquire the target path information of the first networking devices.
Step 205, the target device updates the initial path information based on the target path information to obtain the target path information of the target device. The target path information of the target device records the next hop device of the target device on the shortest path from the target device to any device in the target device group.
In the embodiment of the application, the target path information of the target device is used for the target device to transmit information based on the shortest path. For example, the target path information of the target device is used for the target device to transmit a connection request or message based on the shortest path. The target path information of the target device records the next hop device of the target device on the shortest path from the target device to any device in the target device group. That is, the target path information of the target device records the next hop device of the target device on the shortest path from the target device to each device in the target device group.
Illustratively, as shown in fig. 1, the target path information of the target device includes: the shortest path length from the target device to the first device, and the next hop device of the first networking device on the shortest path; the shortest path length from the target device to the second device, and the next hop device of the first networking device on the shortest path; the shortest path length from the target device to the third device, and the next hop device of the first networking device on the shortest path; the shortest path length from the target device to the fourth device, and the next hop device of the first networking device on the shortest path; the shortest path length from the target device to the fifth device, and the next hop device of the first networking device on the shortest path.
Alternatively, as shown in fig. 3, the process of updating the initial path information to obtain the target path information of the target device based on the target path information may include:
step 301, determining intermediate path information according to the target path information of the first networking device. And recording the shortest path length from the target device to the second networking device through the first networking device and the next hop device of the target device on the shortest path by the intermediate path information recording target device.
Optionally, the target device may add 1 to the shortest path length from the first networking device to the second networking device in the target path information of the first networking device, to obtain the shortest path length from the target device to the second networking device through the first networking device. And updating the next hop device on the shortest path from the first networking device to the second networking device in the target path information of the first networking device to obtain intermediate path information.
The first networking device is illustratively a second device. If the target path information of the second device includes: shortest path length 1 of the second device to the fifth device and next hop device on the shortest path: and a fifth device. The intermediate path information that the target device may obtain includes: the target device passes through the shortest path length 2 from the second device to the fifth device, and the next hop device on the shortest path: a second device.
And 302, updating the initial path information according to the intermediate path information to obtain the target path information of the target equipment.
Alternatively, the target device may obtain the target path information of the target device according to the intermediate path information and the initial path information.
In an alternative implementation, the initial path information includes multiple sets of path data. Each set of path data includes: device identification and shortest path length of the end point device. The terminal equipment in the initial path information is first networking equipment. Each set of path data in the initial path information indicates a shortest path length from the target device to the end device. Alternatively, the device identification of the end device may be an international mobile equipment identity (International Mobile Equipment Identity, IMEI) of the end device, or an identity (Identity document, ID) of the end device.
The target path information of the first networking device includes multiple sets of path data. Each set of path data includes: device identification of the end point device, device identification of the next hop device, and shortest path length. The destination device in the target path information of the first networking device is a second networking device. Each set of path data for the target path information for the first networking device indicates: the shortest path length of the first networking device to the endpoint device, and the next hop device of the first networking device on the shortest path.
Further optionally, the target path information of the first networking device may further include: modification/creation time of each set of path data. It should be noted that, as described above, each networking device in the target device group includes target path information. The content of the target path information of each networking device may refer to a description of the target path information in the first networking device. Alternatively, the networking device may store the target path information in the form of a table or text. For example, the networking device may store target path information using a target path table.
On this basis, as shown in fig. 4, the process of determining intermediate path information by the target device performing step 301 according to the target path information of the first networking device may include:
step 401, adding 1 to the shortest path length in the target path information of the first networking device, and updating the device identifier of the next hop device to the device identifier of the first networking device to obtain intermediate path information.
For example, if the target path information of the first networking device includes: the shortest path length 2 from the first networking device to a second networking device and the next hop device on the shortest path. The intermediate path information that the target device may obtain includes: the shortest path length 3 from the target device to the second networking device through the first networking device, and the next hop device on the shortest path: device identification of the first networking device.
Similarly, with continued reference to fig. 4, the process of the target device performing step 302 to update the initial path information to obtain the target path information of the target device according to the intermediate path information may include:
step 402, traversing the device identification of the terminal device of the intermediate path information, and determining the currently traversed target device identification.
In this embodiment of the present application, the target device may traverse the device identifiers of the end devices of the intermediate path information, so as to determine, in the case of traversing to one device identifier of the end device at a time, the currently traversed target device identifier, and execute the subsequent step 403, step 404, or step 405 on the target device identifier, thereby executing the subsequent process on the device identifier of each end device in the intermediate path information.
In this embodiment of the present application, after determining the target device identifier currently traversed, the target device may determine whether there is a target device identifier in the initial path information. In case that the target device identifier does not exist in the initial path information, step 403 is performed; in case there is a target device identification in the initial path information, step 404 or step 405 is performed.
Step 403, adding a set of path data in which the target device identifier is located in the intermediate path information to the initial path information to obtain target path information of the target device when the target device identifier does not exist in the initial path information.
In the embodiment of the application, under the condition that the target equipment identifier does not exist in the initial path information, the initial path information is indicated to not record the transmission path information from the target equipment to the end equipment indicated by the target equipment identifier. The target device may add a set of data in which the target path information is located in the intermediate path information to the initial path information, to obtain target path information of the target device.
Further, in the case where the target device identifier exists in the initial path information, it is indicated that the initial path information records transmission path information from the target device to the destination device indicated by the target device identifier. The target device may determine whether the shortest path length corresponding to the target device identifier in the initial path information is less than or equal to the shortest path length corresponding to the intermediate path information. That is, the shortest path length corresponding to the target device identifier in the initial path information is referred to as an initial shortest path length. And the shortest path length corresponding to the target equipment identifier in the intermediate path information is called a reference shortest path length. And under the condition that the target equipment identifier exists in the initial path information, the target equipment judges whether the initial shortest path length is smaller than or equal to the reference shortest path length. In the case where the initial shortest path length is less than or equal to the reference shortest path length, step 404 is performed. In case the initial shortest path length is greater than the reference shortest path length, step 405 is performed.
Step 404, when the target device identifier exists in the initial path information and the shortest path length corresponding to the target device identifier in the initial path information is less than or equal to the shortest path length corresponding to the intermediate path information, a set of path data in which the target device identifier is located is reserved in the initial path information, so as to obtain target path information of the target device.
In the embodiment of the present application, when the shortest path length corresponding to the target device identifier in the initial path information is less than or equal to the shortest path length corresponding to the intermediate path information, it is indicated that the shortest path from the target device recorded in the initial path information to the destination device indicated by the target device identifier is shorter. The target device may directly reserve a set of path data where the target device identifier is located in the initial path information, so as to obtain target path information of the target device.
Step 405, under the condition that the target device identifier exists in the initial path information and the shortest path length corresponding to the target device identifier in the initial path information is greater than the shortest path length corresponding to the intermediate path information, replacing a group of path data where the target device identifier in the initial path information is located with a group of path data where the target device identifier in the intermediate path information is located, and obtaining target path information of the target device.
In the embodiment of the application, when the shortest path length corresponding to the target device identifier in the initial path information is greater than the shortest path length corresponding to the intermediate path information, it is indicated that the shortest path from the target device recorded in the initial path information to the destination device indicated by the target device identifier is longer. The target device may replace a set of path data in which the target device identifier is located in the initial path information with a set of path data in which the target device identifier is located in the intermediate path information, so as to replace a shortest path from the target device recorded in the initial path information to the destination device by using a shortest path from the target device recorded in the intermediate path information to the destination device indicated by the target device identifier. Thereby obtaining the target path information of the target device.
Illustratively, the initial path information X of the target device includes two sets of path data. The first set of path data is: device identification 1, shortest path length 1 of the first device. The second set of path data is: device identification 2 of the second device, shortest path length 1.
The target path information of the first device includes four sets of path data. The first set of path data is: the device identifier 3 of the third device, the shortest path length 1, and the next hop device are the device identifier 3. The second set of path data is: the device identifier 4 of the fourth device, the shortest path length 1, and the next hop device are the device identifier 4. The third set of path data is: the device identifier 5 of the fifth device, the shortest path length 1, and the next hop device are the device identifier 5. The sixth set of path data is: the device identifier 2, the shortest path length 2 and the next hop device of the second device are the device identifier 5.
The target path information of the second device includes four sets of path data. The first set of path data is: the device identifier 5 of the fifth device, the shortest path length 1, and the next hop device are the device identifier 5. The second set of path data is: the device identifier 4 of the fourth device, the shortest path length 2, and the next hop device are the device identifier 5. The third set of path data is: the device identifier 3, the shortest path length 3 and the next hop device of the third device are the device identifier 5. The sixth set of path data is: the device identifier 1, the shortest path length 2 and the next hop device of the first device are the device identifier 5.
And the target equipment obtains first intermediate path information Y1 according to the target path information of the first equipment. The first path information includes four sets of path data. The first set of path data is: the device identifier 3, the shortest path length 2 and the next hop device of the third device are the device identifier 1. The second set of path data is: the device identifier 4, the shortest path length 2 and the next hop device of the fourth device are the device identifier 1. The third set of path data is: the device identifier 5 of the fifth device, the shortest path length 2, and the next hop device are the device identifier 1. The sixth set of path data is: the device identifier 2, the shortest path length 3 and the next hop device of the second device are the device identifier 1.
And the target equipment obtains second intermediate path information Y2 according to the target path information of the second equipment. The second path information includes four sets of path data. The first set of path data is: the device identifier 5 of the fifth device, the shortest path length 2, and the next hop device are the device identifier 2. The second set of path data is: the device identifier 4 of the fourth device, the shortest path length 3, and the next hop device are the device identifier 2. The third set of path data is: the device identifier 3, the shortest path length 4 and the next hop device of the third device are the device identifier 2. The sixth set of path data is: the device identifier 1, the shortest path length 3 and the next hop device of the first device are the device identifier 2.
If the target device determines that the device identifier 3 in the first intermediate path information is the target device identifier. The target device determines that the device identification 3 is not present in the initial path information X1 and adds the first set of path data in the first intermediate path information Y2 to the initial path information X1.
And if the target equipment determines that the equipment identifier 2 in the first intermediate path information is the target equipment identifier. The target device determines that the device identifier 2 exists in the initial path information X1, and the shortest path 1 corresponding to the device identifier 2 in the initial path information X1 is smaller than the shortest path 3 corresponding to the device identifier 2 in the first intermediate path information Y2. The target device retains the second set of path data within the initial path information X1 in the initial path information.
In the embodiment of the present application, when the target device first accesses the target device group, a connection request is broadcast to the target device group, so as to receive a connection response sent by a first networking device directly connected to the target device in the target device group, thereby recording initial path information. The initial path information includes: the shortest path length from the target device to the first networking device. And obtaining the target path information of the target device by updating the initial path information based on the target path information by obtaining the target path information of the first networking device.
In the technical scheme, the target path information of the target device records the next hop device of the target device on the shortest path from the target device to any device in the target device group. When the target device needs to send information to any end device in the target device group, the information can be transmitted to the next-hop device corresponding to the shortest path from the target device to the end device, which is recorded in the target path information of the target device, so that the next-hop device can transmit the information to the next-hop device corresponding to the shortest path from the next-hop device to the end device, which is recorded in the target path information of the target device, until the information is transmitted to the end device through the shortest path from the target device to the end device. Compared with the related art, the method reduces the equipment for receiving information in the single information transmission process and reduces the resource consumption of communication between networking equipment. And the shortest path is utilized to transmit information, so that the communication resource overhead of the networking equipment is ensured to be lower, and the problem of saving the communication resource consumption is further solved.
Referring to fig. 5, a flowchart of another transmission path configuration method according to an embodiment of the present application is shown. The transmission path configuration method can be applied to the implementation environment described in fig. 1. As shown in fig. 5, the transmission path configuration method includes:
Step 501, the target device broadcasts a connection request to the target device group when the target device first accesses the target device group.
The explanation and implementation of this step may refer to the explanation and implementation of step 201, which is not described in detail in the embodiments of the present application.
Step 502, the first networking device sends a connection response to the target device.
The explanation and implementation of this step may refer to the explanation and implementation of step 202, which is not described in detail in the embodiments of the present application.
Step 503, the target device records the initial path information. The initial path information includes: the shortest path length from the target device to the first networking device.
The explanation and implementation of this step may refer to the explanation and implementation of step 203, which is not described in detail in the embodiments of the present application.
Step 504, the target device obtains target path information of the first networking device. The target path information includes: the shortest path length from the first networking device to the second networking device, and the next hop device of the first networking device on the shortest path.
The explanation and implementation of this step may refer to the explanation and implementation of step 204, which is not described in detail in the embodiments of the present application.
Step 505, the target device updates the initial path information based on the target path information to obtain the target path information of the target device. The target path information of the target device records the next hop device of the target device on the shortest path from the target device to any device in the target device group.
The explanation and implementation of this step may refer to the explanation and implementation of step 205, which is not described in detail in the embodiments of the present application.
In some embodiments of the present application, the target path information of the target device is further used to record the shortest path length of the target device to any device in the target device group. That is, the target path information of the target device is also used to record the shortest path length of the target device to each device in the target device group, respectively.
The target path information of the target device is further used for the third networking device to update the target path information of the target device, so that the updated target path information records the shortest path length from the third networking device to any device in the target device group and the next hop device of the third networking device on the shortest path. The third networking device is any device except the target device in the target device group.
In an alternative implementation, the transmission path configuration method further includes:
step 506, the third networking device broadcasts a connection request to the target device group.
In this embodiment of the present application, after the target device accesses the target device group, the connection relationship between the target device and other networking devices may change the connection relationship between the original networking devices of the target device group, so as to change the shortest path in the target path information of each networking device. Therefore, after the target device updates the target path information, the target path information of the networking devices except the target device in the target device group needs to be updated, so that the shortest path length from the third networking device to any device in the target device group and the next hop device of the third networking device on the shortest path are recorded by the updated target path information.
Wherein the third networking device may perform steps 506 to 508 to update its target path information. The explanation and implementation of this step may refer to the explanation and implementation of step 201, which is not described in detail in the embodiments of the present application.
Alternatively, the third networking device may broadcast a connection request to the target device group after the fifth networking device has updated its target path information. The fifth networking device is networking device directly connected with the fifth networking device and is not connected with the target device through the third networking device. For example, after the target device updates its target path information, the first device and the second device that are directly connected to the target device may first perform steps 506 to 508 to update its target path information. Further, the third device to the fifth device, which are directly connected to the first device and the second device, perform steps 506 to 508 to update the target path information.
In this way, the smaller the shortest path length with the target device, the larger the probability of change of the transmission path due to the access of the target device. Therefore, the target equipment is used as the center, and the target path information is sequentially updated according to the connection sequence with the target equipment, so that the networking equipment greatly influenced by the connection relation of the target equipment can update the target path information preferentially. Therefore, the situation that networking equipment with a longer connection distance with the target equipment is updated firstly and networking equipment with a shorter connection distance with the target equipment is updated later is avoided to a certain extent, and the problem that the target path information of the networking equipment with a longer connection distance with the target equipment is wrong caused by the situation is avoided.
Step 507, the third networking device receives the connection response sent by the fourth networking device. The fourth networking device is a device in the target device group directly connected with the third networking device.
The explanation and implementation of this step may refer to the previous explanation and implementation of step 202 and step 203, which are not described in detail in this embodiment of the present application.
Step 508, the third networking device obtains the target path information of the fourth networking device. The target path information of the fourth networking device includes a shortest path length from the fourth networking device to any device in the target device group, and a next hop networking device of the fourth networking device on the shortest path.
The explanation and implementation of this step may refer to the explanation and implementation of step 204, which is not described in detail in the embodiments of the present application.
Step 509, the third networking device updates the target path information of the third networking device based on the target path information of the fourth networking device.
Optionally, the target path information of the third networking device before updating includes multiple sets of path data. Each set of path data includes: device identification of the end point device, device identification of the next hop device, and shortest path length. The destination device in the target path information of the third networking device is a second networking device. Each set of path data for the target path information for the third networking device indicates: and the third networking device is connected with the shortest path length of the endpoint device and the next hop device of the third networking device on the shortest path.
The target path information of the fourth networking device includes multiple sets of path data. Each set of path data includes: device identification of the end point device, device identification of the next hop device, and shortest path length. The destination device in the target path information of the fourth networking device is any device in the target device group. Each set of path data for the target path information for the fourth networking device indicates: and the fourth networking device is connected with the shortest path length of the endpoint device and the next hop device of the fourth networking device on the shortest path.
Based on this, the process of updating the target path information of the third networking device by the third networking device based on the target path information of the fourth networking device may include the following steps 01 to 05.
In step 01, the shortest path length in the target path information of the fourth networking device is increased by 1, and the device identifier of the next hop device is updated to the device identifier of the fourth networking device, so as to obtain intermediate path information.
In step 02, the device identity of the end device traversing the intermediate path information is determined, as is the target device identity currently traversed.
In step 03, if the target device identifier does not exist in the target path information of the third networking device, adding a set of path data in which the target device identifier is located in the intermediate path information to the target path information of the third networking device.
In step 04, when there is a target device identifier in the target path information of the third networking device, and the shortest path length corresponding to the target device identifier in the target path information of the third networking device is less than or equal to the shortest path length corresponding to the intermediate path information, a set of path data where the target device identifier is located is reserved in the target path information of the third networking device.
In step 05, when there is a target device identifier in the target path information of the third networking device, and the shortest path length corresponding to the target device identifier in the target path information of the third networking device is greater than the shortest path length corresponding to the intermediate path information, replacing a set of path data in which the target device identifier is located in the target path information of the third networking device with a set of path data in which the target device identifier is located in the intermediate path information.
The explanation and implementation of step 01 to step 05 may refer to the previous explanation and implementation of step 401 to step 405, which is not described in detail in this embodiment of the present application.
Therefore, each networking device in the target device group can update the change of the shortest path caused by the access of the target device in real time after the target device is accessed into the target device group, thereby effectively guaranteeing the communication resource overhead of the networking devices and achieving the problem of saving the communication resource consumption.
In some embodiments of the present application, as shown in fig. 6, the transmission path configuration method further includes:
and 601, the third networking device responds to the path verification instruction and sends a path verification request to the next hop device in the target path information of the third networking device.
In this embodiment of the present application, the path verification instruction is used for verifying, by the third component device, whether the shortest path recorded in the target path information is available. The third networking device may send a path verification request to each next-hop device recorded in the target path information of the third networking device in response to the path verification instruction. The path verification request is used for verifying whether the connection between the terminal device and the third networking device on the shortest path corresponding to the next-hop device is available.
In an alternative implementation, the third networking device may periodically generate the path verification instructions. By way of example, the generation period of the path verification instruction may be 3 days, 7 days, 15 days, or the like. Of course, the generation period of the path verification instruction may be defined by the device according to the actual requirement, which is not limited in the embodiment of the present application.
In another alternative implementation, the third networking device may generate the path verification instruction when it receives a manually triggered path verification operation. The path verification operation may be an input operation in the form of a click, a long press, a slide, or a voice of a path verification key by a person, for example. For example, the administrator clicks the path verification key, so that the third networking device receives a click operation on the path verification key, and generates a path verification instruction in response to the click operation.
In step 602, the third networking device determines that the shortest path corresponding to the next-hop device is available when receiving a path verification response of the end-point device on the shortest path corresponding to the next-hop device.
In this embodiment, an end point device recorded in the target path information of the third networking device is taken as an example. And the third networking device sends a path verification request to the next-hop device corresponding to the end-point device recorded in the target path information, so that the next-hop device sends the path verification request according to the next-hop device corresponding to the end-point device recorded in the target path information until the path verification request information is transmitted to the end-point device through the shortest path of the third networking device to the end-point device.
And under the condition that the third networking device can receive the path verification response returned by the end point device, determining that the shortest path of the third networking device to the end point device is available. And under the condition that the third networking device can not receive the path verification response returned by the end point device, determining that the shortest path of the end point device is unavailable by the third networking device. Alternatively, the third networking device may record the available state of the shortest path in its target path information.
And step 603, the third networking device determines that the shortest path corresponding to the next-hop device is unavailable under the condition that the path verification response of the end-point device on the shortest path corresponding to the next-hop device is not received.
Optionally, the third networking device indicates that the shortest path from the third networking device to the next-hop device is unavailable under the condition that the path verification response of the end-point device on the shortest path corresponding to the next-hop device is not received. The third networking device may delete path information corresponding to the next hop device from the target path information thereof, which may specifically include: and deleting the shortest path length from the third networking device to the end device corresponding to the unavailable shortest path and the next hop device of the third networking device on the shortest path.
In the embodiment of the application, each networking device in the target device group can send a path verification request to the next hop device recorded in the target path information to verify the availability of the shortest path recorded by the target path information, so that the effectiveness of the shortest path recorded by the target path information is ensured.
In summary, in the transmission path configuration method provided in the embodiment of the present application, after the target device updates the target path information, the target device sets broadcast a connection request to obtain the target path information of the fourth networking device directly connected to the third networking device. And updating the target path information of the third networking device based on the target path information of the fourth networking device, so that the updated target path information records the shortest path length from the third networking device to any device in the target device group and the next hop device of the third networking device on the shortest path.
In the technical method, after the target equipment obtains the target path information thereof by updating, the target path information of each networking equipment in the target equipment group is updated so as to ensure the validity of the target path information of each networking equipment in the target equipment group. And when the third networking device needs to send information to any terminal device in the target device group, the third networking device can transmit information to the next-hop device corresponding to the shortest path from the third networking device to the terminal device, which is recorded in the target path information of the third networking device, so that the next-hop device can transmit information to the next-hop device corresponding to the shortest path from the next-hop device to the terminal device, which is recorded in the target path information, until the information passes through the shortest path from the third networking device to the terminal device, and the information is transmitted to the terminal device. Compared with the related art, the method reduces the equipment for receiving information in the single information transmission process and reduces the resource consumption of communication between networking equipment. And the shortest path is utilized to transmit information, so that the communication resource overhead of the networking equipment is ensured to be lower, and the problem of saving the communication resource consumption is further solved.
Referring to fig. 7, a flowchart of another transmission path configuration method according to an embodiment of the present application is shown. The transmission path configuration method may be applied to the implementation environment described in fig. 1, and executed by the target device. As shown in fig. 7, the transmission path configuration method includes:
Step 701, broadcasting a connection request to a target device group under the condition that the target device is accessed to the target device group for the first time.
Step 702, receiving a connection response sent by a first networking device, where the first networking device is a networking device directly connected to a target device from a plurality of networking devices included in the target device group.
Step 703, recording initial path information, where the initial path information includes: the shortest path length from the target device to the first networking device.
Step 704, obtaining target path information of the first networking device, where the target path information includes: the shortest path length from the first networking device to the second networking device, and the next-hop device of the first networking device on the shortest path, where the second networking device is any device included by the target device group before the target device is accessed.
Step 705, updating the initial path information based on the target path information to obtain target path information of the target device, where the target path information of the target device records next hop devices of the target device on shortest paths of any device in the target device group, and the target path information is used for the target device to transmit information based on the shortest paths.
Optionally, the process of updating the initial path information to obtain the target path information of the target device based on the target path information includes:
Determining intermediate path information according to the target path information of the first networking equipment, wherein the intermediate path information records the shortest path length from the target equipment to the second networking equipment through the first networking equipment and the next hop equipment of the target equipment on the shortest path;
and updating the initial path information according to the intermediate path information to obtain the target path information of the target equipment.
Optionally, the initial path information includes multiple sets of path data, each set of path data includes a device identifier of an end point device and a shortest path length, and the end point device in the initial path information is a first networking device; the target path information of the first networking device comprises a plurality of groups of path data, each group of path data comprises a device identifier of the end point device, a device identifier of the next hop device and the shortest path length, and the end point device in the target path information of the first networking device is the second networking device;
the process of determining intermediate path information according to the target path information of the first networking device includes: and adding 1 to the shortest path length in the target path information of the first networking equipment, and updating the equipment identification of the next-hop equipment to the equipment identification of the first networking equipment to obtain intermediate path information.
Optionally, the process of updating the initial path information to obtain the target path information of the target device according to the intermediate path information includes:
traversing the equipment identification of the terminal equipment of the intermediate path information, and determining the target equipment identification currently traversed;
under the condition that the target equipment identifier does not exist in the initial path information, adding a group of path data in which the target equipment identifier exists in the intermediate path information to the initial path information to obtain target path information of the target equipment;
under the condition that the target equipment identifier exists in the initial path information and the shortest path length corresponding to the target equipment identifier in the initial path information is smaller than or equal to the shortest path length corresponding to the intermediate path information, a group of path data where the target equipment identifier is located is reserved in the initial path information, and target path information of the target equipment is obtained;
and under the condition that the target equipment identifier exists in the initial path information and the shortest path length corresponding to the target equipment identifier in the initial path information is larger than the shortest path length corresponding to the intermediate path information, replacing a group of path data in which the target equipment identifier in the initial path information is positioned with a group of path data in which the target equipment identifier in the intermediate path information is positioned, and obtaining the target path information of the target equipment.
Optionally, the target path information of the target device is further used for recording shortest path lengths from the target device to any device in the target device group;
the target path information of the target device is used for updating the target path information of the third networking device by the third networking device, so that the updated target path information records the shortest path length from the third networking device to any device in the target device group and the next hop device of the third networking device on the shortest path, and the third networking device is a device except the target device in the target device group.
In summary, in the transmission path configuration method provided in the embodiment of the present application, when the target device accesses the target device group for the first time, the connection request is broadcast to the target device group, so as to receive the connection response sent by the first networking device directly connected to the target device in the target device group, thereby recording the initial path information. The initial path information includes: the shortest path length from the target device to the first networking device. And obtaining the target path information of the target device by updating the initial path information based on the target path information by obtaining the target path information of the first networking device.
In the technical scheme, the target path information of the target device records the next hop device of the target device on the shortest path from the target device to any device in the target device group. When the target device needs to send information to any end device in the target device group, the information can be transmitted to the next-hop device corresponding to the shortest path from the target device to the end device, which is recorded in the target path information of the target device, so that the next-hop device can transmit the information to the next-hop device corresponding to the shortest path from the next-hop device to the end device, which is recorded in the target path information of the target device, until the information is transmitted to the end device through the shortest path from the target device to the end device. Compared with the related art, the method reduces the equipment for receiving information in the single information transmission process and reduces the resource consumption of communication between networking equipment. And the shortest path is utilized to transmit information, so that the communication resource overhead of the networking equipment is ensured to be lower, and the problem of saving the communication resource consumption is further solved.
Referring to fig. 8, a flowchart of another transmission path configuration method according to an embodiment of the present application is shown. The transmission path configuration method may be applied to the implementation environment described in fig. 1, and executed by a third networking device, where the third networking device is any device other than the target device in the target device group. As shown in fig. 8, the transmission path configuration method includes:
Step 801, after the target device updates the target path information, a connection request is broadcast to the target device group.
Step 802, receiving a connection response sent by a fourth networking device, where the fourth networking device is a device directly connected to the third networking device in the target device group.
Step 803, obtaining target path information of a fourth networking device, where the target path information of the fourth networking device includes a shortest path length from the fourth networking device to any device in the target device group, and a next hop networking device of the fourth networking device on the shortest path.
Step 804, updating the target path information of the third networking device based on the target path information of the fourth networking device.
Optionally, the method further comprises: responding to the path verification instruction, and sending a path verification request to the next hop device in the target path information of the third networking device;
under the condition that a path verification response of the end point equipment on the shortest path corresponding to the next-hop equipment is received, determining that the shortest path corresponding to the next-hop equipment is available;
and under the condition that the path verification response of the end point device on the shortest path corresponding to the next-hop device is not received, determining that the shortest path corresponding to the next-hop device is not available.
In summary, in the transmission path configuration method provided in the embodiment of the present application, after the target device updates the target path information, the target device sets broadcast a connection request to obtain the target path information of the fourth networking device directly connected to the third networking device. And updating the target path information of the third networking device based on the target path information of the fourth networking device, so that the updated target path information records the shortest path length from the third networking device to any device in the target device group and the next hop device of the third networking device on the shortest path.
In the technical method, after the target equipment obtains the target path information thereof by updating, the target path information of each networking equipment in the target equipment group is updated so as to ensure the validity of the target path information of each networking equipment in the target equipment group. And when the third networking device needs to send information to any terminal device in the target device group, the third networking device can transmit information to the next-hop device corresponding to the shortest path from the third networking device to the terminal device, which is recorded in the target path information of the third networking device, so that the next-hop device can transmit information to the next-hop device corresponding to the shortest path from the next-hop device to the terminal device, which is recorded in the target path information, until the information passes through the shortest path from the third networking device to the terminal device, and the information is transmitted to the terminal device. Compared with the related art, the method reduces the equipment for receiving information in the single information transmission process and reduces the resource consumption of communication between networking equipment. And the shortest path is utilized to transmit information, so that the communication resource overhead of the networking equipment is ensured to be lower, and the problem of saving the communication resource consumption is further solved.
Referring to fig. 9, a flowchart of another transmission path configuration apparatus according to an embodiment of the present application is shown. The transmission path configuration means may be applied to the implementation environment described in fig. 1, and executed by the target device. As shown in fig. 9, the transmission path configuration apparatus 900 includes:
a broadcasting module 901, configured to broadcast a connection request to a target device group when the target device first accesses the target device group.
And the receiving module 902 is configured to receive a connection response sent by a first networking device, where the first networking device is a networking device directly connected to the target device from a plurality of networking devices included in the target device group.
A recording module 903, configured to record initial path information, where the initial path information includes: the shortest path length from the target device to the first networking device.
An obtaining module 904, configured to obtain target path information of the first networking device, where the target path information includes: the shortest path length from the first networking device to the second networking device, and the next-hop device of the first networking device on the shortest path, where the second networking device is any device included by the target device group before the target device is accessed.
The updating module 905 is configured to update the initial path information based on the target path information to obtain target path information of the target device, where the target path information of the target device records next hop devices of the target device on shortest paths of any device in the target device group, and the target path information is used for the target device to transmit information based on the shortest paths.
Optionally, the updating module 905 is further configured to:
determining intermediate path information according to the target path information of the first networking equipment, wherein the intermediate path information records the shortest path length from the target equipment to the second networking equipment through the first networking equipment and the next hop equipment of the target equipment on the shortest path;
and updating the initial path information according to the intermediate path information to obtain the target path information of the target equipment.
Optionally, the initial path information includes multiple sets of path data, each set of path data includes a device identifier of an end point device and a shortest path length, and the end point device in the initial path information is a first networking device; the target path information of the first networking device comprises a plurality of groups of path data, each group of path data comprises a device identifier of the end point device, a device identifier of the next hop device and the shortest path length, and the end point device in the target path information of the first networking device is the second networking device;
the updating module 905 is further configured to add 1 to the shortest path length in the target path information of the first networking device, and update the device identifier of the next hop device to the device identifier of the first networking device, so as to obtain intermediate path information.
Optionally, the updating module 905 is further configured to:
traversing the equipment identification of the terminal equipment of the intermediate path information, and determining the target equipment identification currently traversed;
under the condition that the target equipment identifier does not exist in the initial path information, adding a group of path data in which the target equipment identifier exists in the intermediate path information to the initial path information to obtain target path information of the target equipment;
under the condition that the target equipment identifier exists in the initial path information and the shortest path length corresponding to the target equipment identifier in the initial path information is smaller than or equal to the shortest path length corresponding to the intermediate path information, a group of path data where the target equipment identifier is located is reserved in the initial path information, and target path information of the target equipment is obtained;
and under the condition that the target equipment identifier exists in the initial path information and the shortest path length corresponding to the target equipment identifier in the initial path information is larger than the shortest path length corresponding to the intermediate path information, replacing a group of path data in which the target equipment identifier in the initial path information is positioned with a group of path data in which the target equipment identifier in the intermediate path information is positioned, and obtaining the target path information of the target equipment.
Optionally, the target path information of the target device is further used for recording shortest path lengths from the target device to any device in the target device group;
the target path information of the target device is used for updating the target path information of the third networking device by the third networking device, so that the updated target path information records the shortest path length from the third networking device to any device in the target device group and the next hop device of the third networking device on the shortest path, and the third networking device is a device except the target device in the target device group.
In summary, in the transmission path configuration apparatus provided in the embodiment of the present application, when the target device accesses the target device group for the first time, the connection request is broadcast to the target device group, so as to receive a connection response sent by a first networking device directly connected to the target device in the target device group, thereby recording initial path information. The initial path information includes: the shortest path length from the target device to the first networking device. And obtaining the target path information of the target device by updating the initial path information based on the target path information by obtaining the target path information of the first networking device.
In the technical scheme, the target path information of the target device records the next hop device of the target device on the shortest path from the target device to any device in the target device group. When the target device needs to send information to any end device in the target device group, the information can be transmitted to the next-hop device corresponding to the shortest path from the target device to the end device, which is recorded in the target path information of the target device, so that the next-hop device can transmit the information to the next-hop device corresponding to the shortest path from the next-hop device to the end device, which is recorded in the target path information of the target device, until the information is transmitted to the end device through the shortest path from the target device to the end device. Compared with the related art, the method reduces the equipment for receiving information in the single information transmission process and reduces the resource consumption of communication between networking equipment. And the shortest path is utilized to transmit information, so that the communication resource overhead of the networking equipment is ensured to be lower, and the problem of saving the communication resource consumption is further solved.
Referring to fig. 10, a flowchart of another transmission path configuration apparatus according to an embodiment of the present application is shown. The transmission path configuration apparatus may be applied to the implementation environment described in fig. 1, and executed by a third networking device, where the third networking device is any device other than the target device in the target device group.
As shown in fig. 10, the transmission path configuration apparatus 1000 includes:
and a broadcasting module 1001, configured to broadcast a connection request to the target device group after the target device updates to obtain the target path information.
The receiving module 1002 is configured to receive a connection response sent by a fourth networking device, where the fourth networking device is a device in the target device group that is directly connected to the third networking device.
The obtaining module 1003 is configured to obtain target path information of a fourth networking device, where the target path information of the fourth networking device includes a shortest path length from the fourth networking device to any device in the target device group, and a next hop networking device of the fourth networking device on the shortest path.
The updating module 1004 is configured to update the target path information of the third networking device based on the target path information of the fourth networking device.
Optionally, the transmission path configuration apparatus 1000 further includes: the sending module is used for responding to the path verification instruction and sending a path verification request to the next hop device in the target path information of the third networking device;
the determining module is used for determining that the shortest path corresponding to the next-hop equipment is available under the condition that the path verification response of the end-point equipment on the shortest path corresponding to the next-hop equipment is received;
And the method is also used for determining that the shortest path corresponding to the next-hop device is not available under the condition that the path verification response of the end-point device on the shortest path corresponding to the next-hop device is not received.
In summary, in the transmission path configuration apparatus provided in the embodiment of the present application, after the target device updates the target path information, the target device sets a connection request to obtain the target path information of the fourth networking device directly connected to the third networking device. And updating the target path information of the third networking device based on the target path information of the fourth networking device, so that the updated target path information records the shortest path length from the third networking device to any device in the target device group and the next hop device of the third networking device on the shortest path.
In the technical device, after the target equipment obtains the target path information thereof by updating, the target path information of each networking equipment in the target equipment group is updated so as to ensure the validity of the target path information of each networking equipment in the target equipment group. And when the third networking device needs to send information to any terminal device in the target device group, the third networking device can transmit information to the next-hop device corresponding to the shortest path from the third networking device to the terminal device, which is recorded in the target path information of the third networking device, so that the next-hop device can transmit information to the next-hop device corresponding to the shortest path from the next-hop device to the terminal device, which is recorded in the target path information, until the information passes through the shortest path from the third networking device to the terminal device, and the information is transmitted to the terminal device. Compared with the related art, the method reduces the equipment for receiving information in the single information transmission process and reduces the resource consumption of communication between networking equipment. And the shortest path is utilized to transmit information, so that the communication resource overhead of the networking equipment is ensured to be lower, and the problem of saving the communication resource consumption is further solved.
The application provides electronic equipment to solve at present along with networking internet of things equipment's increase, the internet of things equipment adopts the communication mode of broadcasting form to have the great problem of communication resource consumption.
Referring to fig. 11, a block diagram of an electronic device according to an embodiment of the present application is shown. As shown in fig. 11, the electronic device 1100 includes a processor 1101, a memory 1102, and a program or instructions stored on the memory 1102 and executable on the processor 1101, which when executed by the processor 1101, implement the steps of the transmission path configuration method provided in any of the embodiments of the present application.
The electronic device and the transmission path configuration method provided in the embodiment of the present application have the same advantages as those of the prior art, and are not described herein.
The application provides a readable storage medium to solve the problems of low inversion precision and low inversion result image resolution in the existing transmission path configuration method.
The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the transmission path configuration method provided in the embodiments of the present application.
The advantages of the readable storage medium and the transmission path configuration method provided in the embodiments of the present application are the same as those of the prior art, and are not described herein.
The application provides a chip to solve the problems of low inversion precision and low inversion result image resolution in the existing transmission path configuration method.
The chip comprises a processor and a communication interface, wherein the communication interface is coupled with the processor, and the processor is used for running programs or instructions to realize the transmission path configuration method provided by the embodiment of the application.
The chip and the transmission path configuration method provided in the embodiment of the present application have the same advantages as those of the prior art, and are not described herein.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, and variations which fall within the spirit and principles of the present invention are intended to be included within the scope of the present invention.
It should be noted that, in the embodiment of the present application, the various data-related processes are all performed under the condition of conforming to the corresponding data protection rule policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.

Claims (10)

1. A transmission path configuration method, applied to a target device, comprising:
broadcasting a connection request to a target equipment group under the condition that the target equipment is accessed to the target equipment group for the first time;
receiving a connection response sent by a first networking device, wherein the first networking device is networking device directly connected with the target device in a plurality of networking devices included in the target device group;
recording initial path information, the initial path information including: the shortest path length from the target device to the first networking device;
acquiring target path information of the first networking device, wherein the target path information comprises: the shortest path length from the first networking device to the second networking device, and the next-hop device of the first networking device on the shortest path, wherein the second networking device is any device included by the target device group before the target device is accessed;
and updating the initial path information based on the target path information to obtain target path information of the target equipment, wherein the target path information of the target equipment records the next hop equipment of the target equipment on the shortest paths of the target equipment to any equipment in the target equipment group, and the target path information is used for the target equipment to transmit information based on the shortest paths.
2. The method of claim 1, wherein updating the initial path information based on the target path information yields target path information for the target device, comprising:
determining intermediate path information according to the target path information of the first networking device, wherein the intermediate path information records the shortest path length from the target device to the second networking device through the first networking device and the next hop device of the target device on the shortest path;
and updating the initial path information according to the intermediate path information to obtain the target path information of the target equipment.
3. The method of claim 2, wherein the initial path information comprises a plurality of sets of path data, each set of path data comprising a device identification of an end point device and a shortest path length, the end point device in the initial path information being the first networking device;
the target path information of the first networking device comprises a plurality of groups of path data, each group of path data comprises a device identifier of an end point device, a device identifier of a next hop device and a shortest path length, and the end point device in the target path information of the first networking device is the second networking device;
The determining intermediate path information according to the target path information of the first networking device includes: and adding 1 to the shortest path length in the target path information of the first networking device, and updating the device identification of the next-hop device to the device identification of the first networking device to obtain the intermediate path information.
4. The method of claim 3, wherein updating the initial path information based on the intermediate path information yields target path information for the target device, comprising:
traversing the equipment identifier of the terminal equipment of the intermediate path information, and determining the currently traversed target equipment identifier;
under the condition that the target equipment identifier does not exist in the initial path information, adding a group of path data in which the target equipment identifier is positioned in the intermediate path information to the initial path information to obtain target path information of the target equipment;
when the target equipment identifier exists in the initial path information and the shortest path length corresponding to the target equipment identifier in the initial path information is smaller than or equal to the shortest path length corresponding to the intermediate path information, a group of path data where the target equipment identifier is located is reserved in the initial path information, and target path information of the target equipment is obtained;
And under the condition that the target equipment identifier exists in the initial path information and the shortest path length corresponding to the target equipment identifier in the initial path information is larger than the shortest path length corresponding to the intermediate path information, replacing a group of path data in which the target equipment identifier is positioned in the initial path information with a group of path data in which the target equipment identifier is positioned in the intermediate path information to obtain the target path information of the target equipment.
5. The method according to claim 1, wherein the target path information of the target device is further used to record a shortest path length of the target device to any device in the target device group, respectively;
the target path information of the target device is used for updating the target path information of the third networking device by the third networking device, so that the updated target path information records the shortest path length from the third networking device to any device in the target device group and the next-hop device of the third networking device on the shortest path, and the third networking device is a device except the target device in the target device group.
6. The transmission path configuration method is characterized by being applied to third networking equipment, wherein the third networking equipment is any equipment except for target equipment in a target equipment group, and comprises the following steps:
After the target device is updated to obtain the target path information, broadcasting a connection request to the target device group;
receiving a connection response sent by fourth networking equipment, wherein the fourth networking equipment is equipment which is directly connected with the third networking equipment in the target equipment group;
acquiring target path information of the fourth networking device, wherein the target path information of the fourth networking device comprises the shortest path length from the fourth networking device to any device in the target device group and the next-hop networking device of the fourth networking device on the shortest path;
and updating the target path information of the third networking equipment based on the target path information of the fourth networking equipment.
7. The method according to claim 1, wherein the method further comprises:
responding to a path verification instruction, and sending a path verification request to next hop equipment in target path information of the third networking equipment;
under the condition that a path verification response of the end point equipment on the shortest path corresponding to the next-hop equipment is received, determining that the shortest path corresponding to the next-hop equipment is available;
and under the condition that the path verification response of the end point equipment on the shortest path corresponding to the next-hop equipment is not received, determining that the shortest path corresponding to the next-hop equipment is unavailable.
8. A transmission path configuration apparatus, characterized by being applied to a target device, comprising:
a broadcasting module, configured to broadcast a connection request to a target device group when the target device first accesses the target device group;
the receiving module is used for receiving a connection response sent by a first networking device, wherein the first networking device is networking device which is directly connected with the target device in a plurality of networking devices included in the target device group;
the recording module is used for recording initial path information, and the initial path information comprises: the shortest path length from the target device to the first networking device;
the acquisition module is configured to acquire target path information of the first networking device, where the target path information includes: the shortest path length from the first networking device to the second networking device, and the next-hop device of the first networking device on the shortest path, wherein the second networking device is any device included by the target device group before the target device is accessed;
the updating module is used for updating the initial path information based on the target path information to obtain target path information of the target device, the target path information of the target device records the next hop devices of the target device on the shortest paths of the target device to any device in the target device group, and the target path information is used for the target device to transmit information based on the shortest paths.
9. The transmission path configuration device is characterized by being applied to a third networking device, wherein the third networking device is any device except the target device in the target device group, and the transmission path configuration device comprises:
the broadcasting module is used for broadcasting a connection request to the target equipment group after the target equipment is updated to obtain the target path information of the target equipment;
the receiving module is used for receiving a connection response sent by fourth networking equipment, wherein the fourth networking equipment is equipment which is directly connected with the third networking equipment in the target equipment group;
the acquisition module is used for acquiring target path information of the fourth networking device, wherein the target path information of the fourth networking device comprises the shortest path length from the fourth networking device to any device in the target device group and the next-hop networking device of the fourth networking device on the shortest path;
and the updating module is used for updating the target path information of the third networking equipment based on the target path information of the fourth networking equipment.
10. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, the program or instruction when executed by the processor implementing the steps of the transmission path configuration method according to any one of claims 1 to 5 or the steps of the transmission path configuration method according to any one of claims 6 to 7.
CN202311777983.5A 2023-12-21 2023-12-21 Transmission path configuration method and device and electronic equipment Pending CN117880176A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311777983.5A CN117880176A (en) 2023-12-21 2023-12-21 Transmission path configuration method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311777983.5A CN117880176A (en) 2023-12-21 2023-12-21 Transmission path configuration method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN117880176A true CN117880176A (en) 2024-04-12

Family

ID=90578298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311777983.5A Pending CN117880176A (en) 2023-12-21 2023-12-21 Transmission path configuration method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN117880176A (en)

Similar Documents

Publication Publication Date Title
CN109842906B (en) Communication method, device and system
US9301122B2 (en) Apparatus and method for establishing a personal network for providing a CPNS service
EP1796342B1 (en) A method for transmitting requests
CN111225016B (en) Network service system and network service method
US8059598B2 (en) Wireless communication system and method for managing service flow identifier in the same
US20150088995A1 (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
WO2012000271A1 (en) Method for terminal access and wireless communication network
TWI640214B (en) Network access method, related equipment and system
CN113498110B (en) Service message transmission method and related equipment
CN116668511A (en) Data processing method, network element equipment and readable storage medium
JP2004535743A (en) Domain naming system (DNS) for accessing databases
CN110417876A (en) Node server and main control device in session method, distributed system
CN112511993A (en) Method, device and terminal for group data transmission
JP2024511907A (en) Network function registration method, discovery method, equipment, device and medium
WO2017045454A1 (en) Method, device and system for realizing terminal access
CN110868466B (en) Storage method, system and equipment for distributed storage network
WO2019119962A1 (en) Information processing method, system, terminal, and computer readable storage medium
CN117880176A (en) Transmission path configuration method and device and electronic equipment
US20090059840A1 (en) Wireless communication system and method for managing service flow identifier in the same
CN111315037B (en) Communication link establishing method and device, computer equipment and storage medium
CN112583873B (en) Service discovery method, device and functional network element
CN106550349B (en) Management method, server and the service node of subscription data based on group
CN110753921B (en) Query request processing method, device, computer equipment and storage medium
CN108848156B (en) Access gateway processing method, device and storage medium
EP2244497A1 (en) Radio communication system and authentication processing unit selecting method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination