CN109039901B - High-efficiency data network routing implementation method - Google Patents

High-efficiency data network routing implementation method Download PDF

Info

Publication number
CN109039901B
CN109039901B CN201811075143.3A CN201811075143A CN109039901B CN 109039901 B CN109039901 B CN 109039901B CN 201811075143 A CN201811075143 A CN 201811075143A CN 109039901 B CN109039901 B CN 109039901B
Authority
CN
China
Prior art keywords
interface
message
table entry
name
router
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811075143.3A
Other languages
Chinese (zh)
Other versions
CN109039901A (en
Inventor
王晓喃
程宏斌
姚宇峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changshu Institute of Technology
Original Assignee
Changshu Institute of Technology
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 Changshu Institute of Technology filed Critical Changshu Institute of Technology
Priority to CN201811075143.3A priority Critical patent/CN109039901B/en
Publication of CN109039901A publication Critical patent/CN109039901A/en
Application granted granted Critical
Publication of CN109039901B publication Critical patent/CN109039901B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Landscapes

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

Abstract

The invention provides a high-efficiency data network routing realization method, wherein the network is composed of more than two routers and more than two devices; each router is provided with more than two upstream wired interfaces and more than two downstream wired interfaces, each upstream wired interface is connected with one router, and the downstream wired interface of one router is connected with one device; a device is provided with a wired interface which is connected with a downstream wired interface of the router; in the invention, the mobile node can rapidly acquire data, greatly reduce data communication delay and improve data communication quality. The invention can be applied to various fields such as traffic road condition detection and control, agricultural engineering and the like, and has wide application prospect.

Description

High-efficiency data network routing implementation method
Technical Field
The present invention relates to a method for implementing, and more particularly, to a method for implementing an efficient data network route.
Background
Communication between nodes in a data network is realized through forwarding and routing of intermediate nodes, and therefore, one of key technologies to be solved for realizing the data network is to reduce data transmission delay so as to enable users to quickly acquire network services. With the development of data network technology, data networks will become a mode for providing services for future networks.
At present, the implementation mode of the data network is realized through broadcasting, so that both delay and cost are large, and the network service performance is reduced. Therefore, how to reduce the delay and cost of providing services by a data network becomes a hot issue of research in recent years.
Disclosure of Invention
The purpose of the invention is as follows: the technical problem to be solved by the present invention is to provide an efficient data network routing implementation method for overcoming the defects of the prior art.
The technical scheme is as follows: the invention discloses that the network is composed of more than two routers and more than two devices; each router is provided with more than two upstream wired interfaces and more than two downstream wired interfaces, each upstream wired interface is connected with one router, and the downstream wired interface of one router is connected with one device; a device is provided with a wired interface which is connected with a downstream wired interface of the router;
each interface is uniquely identified by an interface ID, the interface with the interface ID of i is recorded as an interface i, and i is a positive integer;
one type of data is uniquely identified by a name; a message is composed of a name, a message type, an interface ID set and a load; the message type values are as follows:
message type name Message type value
Publishing messages 1
Deleting 2
Request message 3
Rejection message 4
Response message 5
Query message 6
Acknowledgement messages 7
Reset message 8
Each router maintains a forwarding table, and each forwarding table item comprises a name domain, an interface ID set domain and a life cycle domain;
the device D1 is connected to the router R1, the data C1 is uniquely identified by the name NA1, and after the device D1 generates or acquires the data C1, the following operations are performed to maintain a forwarding table:
step 101: starting;
step 102: the device D1 sends a publish message, the name of the publish message is NA1, the message type value is 1, the interface ID set is empty, and the load is empty;
step 103: after receiving the release message from the interface x1, the router R1 adds the interface x1 to the interface ID set of the release message as the last element, and then checks a forwarding table, if there is a forwarding table entry whose name domain value and interface ID set domain value are respectively equal to the name domain value and interface ID set domain value of the release message, sets the lifetime of the forwarding table entry to the maximum value, otherwise creates a forwarding table entry whose name domain value and interface ID set domain value are respectively equal to the name domain value and interface ID set domain value of the release message, and sets the lifetime to the maximum value;
step 104: router R1 forwards the received publish message from each upstream interface;
step 105: after receiving the publish message from the interface x2, the router adds the interface x2 to the interface ID set of the publish message and uses the interface x2 as the last element, the router checks a forwarding table, if a forwarding table entry exists, the name domain value of the forwarding table entry is equal to the name domain value of the publish message, and the number of elements of the interface ID set is less than that of the interface ID set of the publish message, then step 113 is executed, otherwise step 106 is executed;
step 106: the router receiving the publish message from interface x2 checks the forwarding table, if there is a forwarding table entry, the name domain value and interface ID set of the forwarding table entry are equal to the name domain value and interface ID set of the publish message, respectively, step 107 is executed, otherwise step 108 is executed;
step 107: the router receiving the publish message from interface x2 checks the forwarding table, selects a forwarding table entry whose name domain value and interface ID set are equal to the name domain value and interface ID set of the publish message, respectively, sets the lifetime of the forwarding table entry to the maximum value, for example, 500ms, and executes step 112;
step 108: the router receiving the publish message from interface x2 checks the forwarding table, if there is a forwarding table entry, the name field value of the forwarding table entry is equal to the name field value of the publish message and the number of elements of the interface ID set is equal to the number of elements of the interface ID set of the publish message, then step 111 is executed, otherwise step 109 is executed;
step 109: the router receiving the publish message from interface x2 checks the forwarding table, if there is a forwarding table entry, the name field value of the forwarding table entry is equal to the name field value of the publish message and the number of elements of the interface ID set is greater than the number of elements of the interface ID set of the publish message, then step 110 is executed, otherwise step 111 is executed;
step 110: the router receiving the distribution message from the interface x2 checks the forwarding table, selects all forwarding table entries meeting the condition 1, and deletes all forwarding table entries meeting the condition 1;
condition 1: the name domain value of the forwarding table entry is equal to the name domain value of the release message, and the number of elements of the interface ID set is greater than that of the interface ID set of the release message;
step 111: the router receiving the release message from the interface x2 creates a forwarding table entry, the name domain value and the interface ID set domain value of the forwarding table entry are respectively equal to the name domain value and the interface ID set domain value of the release message, and the life cycle is set to be the maximum value;
step 112: the router that received the publish message from interface x2 forwards the publish message from each upstream interface except interface x2, performing step 105;
step 113: and (6) ending.
The device establishes the forwarding table through the above process, so that an optimal routing path to the destination device can be established through the interface ID set in the forwarding table, and the forwarding table entry ensures the real-time performance and the correctness of the forwarding table entry through the life cycle, thereby ensuring the real-time performance and the correctness of the routing.
In the method, equipment D1 is connected with a router R1, and data C1 is uniquely identified by a name NA 1; if device D1 deletes data C1, the following process is performed to update the forwarding table:
step 201: starting;
step 202: the device D1 sends a delete message, the name of which is NA1, the message type value is 2, the interface ID set is null, and the load is null;
step 203: after receiving the delete message from interface y1, router R1 adds interface y1 to the interface ID set of the delete message, checks the forwarding table, and deletes a forwarding table entry if there is a forwarding table entry whose name and interface ID set are equal to the name and interface ID set of the delete message, respectively;
step 204: router R1 forwards the delete message from each upstream interface;
step 205: after the router receives the delete message from interface y2, if there is a forwarding entry, the name of the forwarding entry is equal to the name of the delete message and the first element of the interface ID set is equal to the first element of the interface ID set of the delete message, go to step 206, otherwise go to step 207;
step 206: the router receiving the delete message from interface y2 selects a forwarding table with a name equal to the name of the delete message and a first element of the set of interface IDs equal to the first element of the set of interface IDs of the delete message, deletes the forwarding table, forwards the delete message from all upstream interfaces except interface y2, and performs step 205;
step 207: and (6) ending.
The device updates the forwarding table through the above process to ensure the correctness and real-time performance of the forwarding table, so that the optimal routing path to the destination device can be established through the interface ID set in the forwarding table, thereby ensuring the real-time performance and the correctness of the routing.
In the method of the invention, each router maintains an aggregation table, and each aggregation table item comprises a name domain, an interface ID domain and a life cycle domain;
each router maintains an interface table, and one interface table item comprises an interface ID field and a forwarding number field;
the device D2 is connected to the router R2, the data C1 is uniquely identified by the name NA1, and the device D2 acquires the data C1 by the following procedure:
step 301: starting;
step 302: the device D2 sends a request message, the name field value of which is NA1, the message type value is 3, the interface ID set is null, and the load is null;
step 303: judging whether the device or the router receives the request message from the interface z1, if the device is the device, executing the step 317, otherwise executing the step 304;
step 304: the router receives the request message from interface z1, looks at the aggregation table, if there is an aggregation table entry whose name equals the name of the request message and interface ID equals z1, then performs step 318, otherwise performs step 305;
step 305: the router receiving the request message from interface z1 looks up the aggregation table, if there is an aggregation table entry whose name is equal to the name of the request message, then step 306 is executed, otherwise step 307 is executed;
step 306: the router receiving the request message from interface z1 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the request message, the interface ID is equal to z1, the lifetime is set to the maximum value, and step 318 is executed;
step 307: judging whether the router receiving the request message from the interface z1 is the router R2, if so, executing the step 308, otherwise, executing the step 309;
step 308: the router receiving the request message from interface z1 selects all forwarding entries with name field values equal to the request message name field value; for each selected forwarding table entry, the router selects an interface table entry, the interface ID of which is equal to the last element of the interface ID set of the forwarding table entry; then the router selects an interface table entry E1 from all the selected interface table entries, the forwarding number domain value of the interface table entry is minimum, the router selects a forwarding table entry E2, the name domain value of the forwarding table entry is equal to the name domain value of the request message, the last element of the interface ID set is equal to the interface ID domain value of the interface table entry E1, and the interface ID set domain value of the request message is updated to the interface ID set of the forwarding table entry E2;
step 309: the router receiving the request message from interface z1 selects an interface entry with an interface ID equal to the last element of the interface ID set of the request message; if the forwarding number of the interface table entry is greater than the predetermined value TS1, performing step 311, otherwise, performing step 310; the TS1 is an integer larger than 10, the larger the TS1 is, the larger the number of messages which can be forwarded by the interface is, the smaller the TS1 is, the smaller the number of messages forwarded by the interface is;
step 310: the router receiving the request message from interface z1 creates an aggregation table entry from interface z1, the name of the aggregation table entry is equal to the name of the request message, the interface ID is equal to z1, the lifetime is set to the maximum value, the router selects the interface identified by the last element in the interface ID set of the request message, selects an interface table entry, the interface ID of the interface table entry is equal to the last element in the interface ID set of the request message, increments the forwarding number field value of the interface table entry by 1, deletes the last element from the interface ID set of the request message, forwards the request message from the selected interface, and executes step 303;
step 311: the router receiving the request message from interface z1 sends a reject message from interface z1, the name and interface ID set of the reject message being equal to the name and interface ID set of the request message, respectively, the message type value being 4, and the load being empty;
step 312: judging whether the device receives a rejection message or not, if the device receives the rejection message, executing step 321, and if the device does not receive the rejection message, executing step 313;
step 313: after receiving the reject message from the interface z3, the router selects all forwarding entries with name domain values equal to that of the reject message; for each selected forwarding table entry, the router selects an interface table entry, the interface ID of which is equal to the last element of the interface ID set of the forwarding table entry; then, from all selected interface table entries, the router selects all interface table entries with the minimum forwarding number threshold; if there is an interface table entry E3 in all the selected interface table entries, and the interface ID of the interface table entry is not equal to z3, execute step 314, otherwise execute step 315;
step 314: the router receiving the reject message from the interface z3 selects a forwarding table entry, the last element of the interface ID set of the forwarding table entry is equal to the interface ID of the interface table entry E3, updates the interface ID set of the reject message to the interface ID set of the forwarding table entry, if the forwarding number of the interface table entry E3 is greater than the threshold TS1, execute step 315, otherwise execute step 316;
step 315: the router receiving the reject message from interface z3 selects all aggregation table entries whose name domain values are equal to the name domain value of the reject message, and for each aggregation table entry, the router sends a reject message from the interface identified by the interface ID domain value of the aggregation table entry, the name and interface ID set of the reject message are respectively equal to the name and interface ID set of the received reject message, the message type value is 4, the load is null, the router deletes the aggregation table entry, and step 312 is executed;
step 316: the router receiving the reject message from interface z3 creates a request message whose name field value and interface ID set field value are equal to the name field value and interface ID set field value of the reject message, respectively, the message type value is 3, the load is null, selects the interface identified by the last element of the interface ID set of the request message, selects an interface table entry whose interface ID is equal to the last element of the interface ID set of the request message, increments the forwarding number field value of the interface table entry by 1, deletes the last element from the interface ID set of the request message, forwards the request message from the selected interface, and performs step 303;
step 317: after receiving the request message, the device sends a response message, the name field value of the response message is equal to the name field value of the request message, the interface ID set is empty, the message type value is 5, and the load is response data;
step 318: judging whether the device D2 or the router receives the response message, if the device D2 executes the step 320, otherwise, executes the step 319;
step 319: after receiving the response message, the router selects all aggregation table entries with name domain values equal to the name domain value of the response message, and for each selected aggregation table entry, the router performs the following operations: the router forwards the response message from the interface identified by the interface ID of the aggregation table entry, selects an interface table entry whose interface ID is equal to the interface ID of the aggregation table entry, decrements the forwarding number of the interface table entry by 1, deletes the aggregation table entry, and executes step 318;
step 320: after receiving the response message, the device D2 saves the data in the response message payload;
step 321: and (6) ending.
The equipment realizes data communication through the process, and the process ensures the performance of data communication by controlling the quantity of the forwarding messages, thereby reducing the delay and cost of data communication; meanwhile, the process realizes the aggregation of the messages through the aggregation table, so that a plurality of devices can acquire data through one-time data communication process, thereby reducing data communication delay and cost.
In the method of the present invention, the device D2 is connected to the router R2, the data C1 is uniquely identified by the name NA1, and if the device D2 cannot acquire the data C1 through steps 301 and 321, the following procedure is performed to acquire the data C1:
step 401: starting;
step 402: the device D2 sends a query message, the name domain value of which is NA1, the message type value is 6, the interface ID set is empty, the load is parameter h, and the initial value of parameter h is 0;
step 403: judging whether the device or the router receives the query message from the interface k1, if the device is the device, executing the step 410, otherwise executing the step 404;
step 404: the router receives the query message from the interface k1, and increments the parameter h in the query message load by 1; if there is an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message and the interface ID is equal to k1, execute step 411, otherwise execute step 405;
step 405: the router receiving the query message from the interface k1 checks the aggregation table, if there is an aggregation table entry whose name is equal to the name of the query message, then step 406 is executed, otherwise step 407 is executed;
step 406: the router receiving the query message from the interface k1 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message, the interface ID is equal to k1, the lifetime is set to T1- (h-1) T0, T1 and T0 are preset values, and T1 is much greater than T0, for example, T1 is equal to 1s, T0 is equal to 20ms, execute step 411;
step 407: the router receiving the query message from the interface k1 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message, the interface ID is equal to k1, the life cycle is set to T1- (h-1) T0, whether the router is the router R2 is judged, if yes, step 408 is executed, otherwise, step 409 is executed;
step 408: the router receiving the query message from interface k1 selects all forwarding table entries whose name domain values are equal to the name domain value of the query message, selects an interface table entry for each selected forwarding table entry, whose interface ID is equal to the last element of the interface ID set of the forwarding table entry, then selects an interface table entry E4 from all selected interface table entries, whose forwarding number domain value is the smallest, selects a forwarding table entry E5, whose name domain value is equal to the name domain value of the query message and whose last element is equal to the interface ID domain value of interface table entry E4, and updates the interface ID set domain value of the query message to the interface ID set of forwarding table entry E5;
step 409: the router receiving the query message from interface k1 selects the interface identified by the last element of the interface ID set of the query message, selects an interface table entry whose interface ID is equal to the last element of the interface ID set of the query message, increments the forwarding number field value of the interface table entry by 1, deletes the last element from the interface ID set of the query message, forwards the query message from the selected interface, and executes step 403;
step 410: after receiving the query message, the device sends a confirmation message, wherein the name field value of the confirmation message is equal to the name field value of the query message, the interface ID set is empty, the message type value is 7, and the load is response data;
step 411: judging whether the device D2 or the router receives the confirmation message, if the device D2 or the router receives the confirmation message, executing the step 423, and if the device D2 or the router receives the confirmation message, executing the step 412;
step 412: if the router receives the acknowledgement message if condition 2 is satisfied, then step 413 is performed, otherwise step 414 is performed;
condition 2: the life cycle of all aggregation table entries with the name domain value equal to the name domain value of the confirmation message is not attenuated to 0;
step 413: the router receiving the acknowledgement message selects all aggregation table entries having a name field value equal to the name field value of the acknowledgement message, and for each selected aggregation table entry, the router performs the following operations: the router forwards the acknowledgement message from the interface identified by the interface ID of the aggregation table entry, selects an interface table entry, the interface ID of the interface table entry is equal to the interface ID of the aggregation table entry, decrements the forwarding number of the interface table entry by 1, deletes the aggregation table entry, and executes step 411;
step 414: the router receiving the acknowledgement message selects the aggregation table entry whose name domain value is equal to that of the acknowledgement message, sets the life cycle of the selected aggregation table entries to be T1, and for each selected aggregation table entry E6, the router sends a reset message from the interface identified by the interface ID of the aggregation table entry E6, the name domain value of the reset message is equal to that of the aggregation table entry E6, the interface ID set is null, the message type value is 8, and the load is a preset time T1; the router selects all forwarding entries with the name domain value equal to the name domain value of the aggregation entry E6, constructs a query message aiming at each selected forwarding entry, the name domain value and the interface ID set domain value of the query message are equal to the name domain value and the interface ID set domain value of the forwarding entry, the message type value is 6, the load is parameter h1, the initial value of parameter h1 is 0, selects an interface entry, the interface ID of the interface entry is equal to the last element of the interface ID set of the query message, the forwarding number domain value of the interface entry is increased by 1, the interface identified by the last element in the interface ID set of the query message is selected, the last element is deleted from the interface ID set of the query message, and the query message is forwarded from the selected interface;
step 415: if the device receives a reset message, go to step 411, otherwise go to step 416;
step 416: if the router receives the reset message, go to step 417, otherwise go to step 418;
step 417: the router receiving the reset message selects all aggregation table entries whose name domain values are equal to the name domain value of the reset message, for each aggregation table entry, the router sets the lifetime of the aggregation table entry to T1, sends the reset message from the interface identified by the interface ID of the aggregation table entry, and executes step 415;
step 418: judging whether the device or the router receives the query message from the interface k2, if the device is the device, executing the step 410, otherwise executing the step 419;
step 419: the router receives the query message from the interface k2, and increments the parameter h1 in the query message load by 1; if there is an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message and the interface ID is equal to k2, execute step 411, otherwise execute step 420;
step 420: the router receiving the query message from interface k2 looks up the aggregation table, if there is an aggregation table entry whose name is equal to the name of the query message, then step 421 is executed, otherwise step 422 is executed;
step 421: the router receiving the query message from interface k2 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message, the interface ID is equal to k2, the lifetime is set to T1- (h1-1) T0, and step 411 is executed;
step 422: the router receiving the query message from the interface k2 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message, the interface ID is equal to k2, and the life cycle is set to T1- (h1-1) T0; the router selects all forwarding entries having a name domain equal to the name domain of the query message, and for each forwarding entry, the router performs the following operations: updating the interface ID set of the query message to the interface ID set of the forwarding table entry, selecting an interface table entry, wherein the interface ID of the interface table entry is equal to the last element of the interface ID set of the query message, increasing the forwarding number field value of the interface table entry by 1, selecting an interface identified by the last element in the interface ID set of the query message, deleting the last element from the interface ID set of the query message, and forwarding the query message from the selected interface; step 415 is executed;
step 423: after receiving the acknowledgment message, device D2 saves the data in the acknowledgment message payload;
step 424: and (6) ending.
The equipment realizes data communication through the process, and the process realizes message aggregation through the aggregation table, so that a plurality of equipment can acquire data through one-time data communication process, thereby reducing data communication delay and cost, and meanwhile, an optimal routing path is established through the forwarding table entry, thereby further reducing data communication delay and cost.
Has the advantages that: the invention provides a high-efficiency data network routing implementation method, in the invention, a mobile node can rapidly acquire data, greatly reduce data communication delay and improve data communication quality. The invention can be applied to various fields such as traffic road condition detection and control, agricultural engineering and the like, and has wide application prospect.
Drawings
The foregoing and/or other advantages of the invention will become further apparent from the following detailed description of the invention when taken in conjunction with the accompanying drawings.
Fig. 1 is a schematic diagram illustrating a process of establishing a forwarding table according to the present invention.
Fig. 2 is a schematic diagram illustrating a process of updating a forwarding table according to the present invention.
Fig. 3 is a schematic diagram of a data communication process according to the present invention.
Fig. 4 is a schematic diagram of a data acquisition process according to the present invention.
The specific implementation mode is as follows:
the invention provides a high-efficiency data network routing implementation method, in the invention, a mobile node can rapidly acquire data, greatly reduce data communication delay and improve data communication quality. The invention can be applied to various fields such as traffic road condition detection and control, agricultural engineering and the like, and has wide application prospect.
Fig. 1 is a schematic diagram illustrating a process of establishing a forwarding table according to the present invention. The network is composed of more than two routers and more than two devices; each router is provided with more than two upstream wired interfaces and more than two downstream wired interfaces, each upstream wired interface is connected with one router, and the downstream wired interface of one router is connected with one device; a device is provided with a wired interface which is connected with a downstream wired interface of the router;
each interface is uniquely identified by an interface ID, the interface with the interface ID of i is recorded as an interface i, and i is a positive integer;
one type of data is uniquely identified by a name; a message is composed of a name, a message type, an interface ID set and a load; the message type values are as follows:
message type name Message type value
Publishing messages 1
Deleting 2
Request message 3
Rejection message 4
Response message 5
Query message 6
Acknowledgement messages 7
Reset message 8
Each router maintains a forwarding table, and each forwarding table item comprises a name domain, an interface ID set domain and a life cycle domain;
the device D1 is connected to the router R1, the data C1 is uniquely identified by the name NA1, and after the device D1 generates or acquires the data C1, the following operations are performed to maintain a forwarding table:
step 101: starting;
step 102: the device D1 sends a publish message, the name of the publish message is NA1, the message type value is 1, the interface ID set is empty, and the load is empty;
step 103: after receiving the release message from the interface x1, the router R1 adds the interface x1 to the interface ID set of the release message as the last element, and then checks a forwarding table, if there is a forwarding table entry whose name domain value and interface ID set domain value are respectively equal to the name domain value and interface ID set domain value of the release message, sets the lifetime of the forwarding table entry to the maximum value, otherwise creates a forwarding table entry whose name domain value and interface ID set domain value are respectively equal to the name domain value and interface ID set domain value of the release message, and sets the lifetime to the maximum value;
step 104: router R1 forwards the received publish message from each upstream interface;
step 105: after receiving the publish message from the interface x2, the router adds the interface x2 to the interface ID set of the publish message and uses the interface x2 as the last element, the router checks a forwarding table, if a forwarding table entry exists, the name domain value of the forwarding table entry is equal to the name domain value of the publish message, and the number of elements of the interface ID set is less than that of the interface ID set of the publish message, then step 113 is executed, otherwise step 106 is executed;
step 106: the router receiving the publish message from interface x2 checks the forwarding table, if there is a forwarding table entry, the name domain value and interface ID set of the forwarding table entry are equal to the name domain value and interface ID set of the publish message, respectively, step 107 is executed, otherwise step 108 is executed;
step 107: the router receiving the distribution message from the interface x2 checks the forwarding table, selects a forwarding table entry whose name domain value and interface ID set are equal to the name domain value and interface ID set of the distribution message, sets the life cycle of the forwarding table entry to the maximum value, and executes step 112;
step 108: the router receiving the publish message from interface x2 checks the forwarding table, if there is a forwarding table entry, the name field value of the forwarding table entry is equal to the name field value of the publish message and the number of elements of the interface ID set is equal to the number of elements of the interface ID set of the publish message, then step 111 is executed, otherwise step 109 is executed;
step 109: the router receiving the publish message from interface x2 checks the forwarding table, if there is a forwarding table entry, the name field value of the forwarding table entry is equal to the name field value of the publish message and the number of elements of the interface ID set is greater than the number of elements of the interface ID set of the publish message, then step 110 is executed, otherwise step 111 is executed;
step 110: the router receiving the distribution message from the interface x2 checks the forwarding table, selects all forwarding table entries meeting the condition 1, and deletes all forwarding table entries meeting the condition 1;
condition 1: the name domain value of the forwarding table entry is equal to the name domain value of the release message, and the number of elements of the interface ID set is greater than that of the interface ID set of the release message;
step 111: the router receiving the release message from the interface x2 creates a forwarding table entry, the name domain value and the interface ID set domain value of the forwarding table entry are respectively equal to the name domain value and the interface ID set domain value of the release message, and the life cycle is set to be the maximum value;
step 112: the router that received the publish message from interface x2 forwards the publish message from each upstream interface except interface x2, performing step 105;
step 113: and (6) ending.
The device establishes the forwarding table through the above process, so that an optimal routing path to the destination device can be established through the interface ID set in the forwarding table, and the forwarding table entry ensures the real-time performance and the correctness of the forwarding table entry through the life cycle, thereby ensuring the real-time performance and the correctness of the routing.
Fig. 2 is a schematic diagram illustrating a process of updating a forwarding table according to the present invention. The device D1 is connected to the router R1, and the data C1 is uniquely identified by a name NA 1; if device D1 deletes data C1, the following process is performed to update the forwarding table:
step 201: starting;
step 202: the device D1 sends a delete message, the name of which is NA1, the message type value is 2, the interface ID set is null, and the load is null;
step 203: after receiving the delete message from interface y1, router R1 adds interface y1 to the interface ID set of the delete message, checks the forwarding table, and deletes a forwarding table entry if there is a forwarding table entry whose name and interface ID set are equal to the name and interface ID set of the delete message, respectively;
step 204: router R1 forwards the delete message from each upstream interface;
step 205: after the router receives the delete message from interface y2, if there is a forwarding entry, the name of the forwarding entry is equal to the name of the delete message and the first element of the interface ID set is equal to the first element of the interface ID set of the delete message, go to step 206, otherwise go to step 207;
step 206: the router receiving the delete message from interface y2 selects a forwarding table with a name equal to the name of the delete message and a first element of the set of interface IDs equal to the first element of the set of interface IDs of the delete message, deletes the forwarding table, forwards the delete message from all upstream interfaces except interface y2, and performs step 205;
step 207: and (6) ending.
The device updates the forwarding table through the above process to ensure the correctness and real-time performance of the forwarding table, so that the optimal routing path to the destination device can be established through the interface ID set in the forwarding table, thereby ensuring the real-time performance and the correctness of the routing.
Fig. 3 is a schematic diagram of a data communication process according to the present invention. Each router maintains an aggregation table, and each aggregation table item comprises a name domain, an interface ID domain and a life cycle domain;
each router maintains an interface table, and one interface table item comprises an interface ID field and a forwarding number field;
the device D2 is connected to the router R2, the data C1 is uniquely identified by the name NA1, and the device D2 acquires the data C1 by the following procedure:
step 301: starting;
step 302: the device D2 sends a request message, the name field value of which is NA1, the message type value is 3, the interface ID set is null, and the load is null;
step 303: judging whether the device or the router receives the request message from the interface z1, if the device is the device, executing the step 317, otherwise executing the step 304;
step 304: the router receives the request message from interface z1, looks at the aggregation table, if there is an aggregation table entry whose name equals the name of the request message and interface ID equals z1, then performs step 318, otherwise performs step 305;
step 305: the router receiving the request message from interface z1 looks up the aggregation table, if there is an aggregation table entry whose name is equal to the name of the request message, then step 306 is executed, otherwise step 307 is executed;
step 306: the router receiving the request message from interface z1 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the request message, the interface ID is equal to z1, the lifetime is set to the maximum value, and step 318 is executed;
step 307: judging whether the router receiving the request message from the interface z1 is the router R2, if so, executing the step 308, otherwise, executing the step 309;
step 308: the router receiving the request message from interface z1 selects all forwarding entries with name field values equal to the request message name field value; for each selected forwarding table entry, the router selects an interface table entry, the interface ID of which is equal to the last element of the interface ID set of the forwarding table entry; then the router selects an interface table entry E1 from all the selected interface table entries, the forwarding number domain value of the interface table entry is minimum, the router selects a forwarding table entry E2, the name domain value of the forwarding table entry is equal to the name domain value of the request message, the last element of the interface ID set is equal to the interface ID domain value of the interface table entry E1, and the interface ID set domain value of the request message is updated to the interface ID set of the forwarding table entry E2;
step 309: the router receiving the request message from interface z1 selects an interface entry with an interface ID equal to the last element of the interface ID set of the request message; if the forwarding number of the interface table entry is greater than the predetermined value TS1, performing step 311, otherwise, performing step 310; the TS1 is an integer larger than 10, the larger the TS1 is, the larger the number of messages which can be forwarded by the interface is, the smaller the TS1 is, the smaller the number of messages forwarded by the interface is;
step 310: the router receiving the request message from interface z1 creates an aggregation table entry from interface z1, the name of the aggregation table entry is equal to the name of the request message, the interface ID is equal to z1, the lifetime is set to the maximum value, the router selects the interface identified by the last element in the interface ID set of the request message, selects an interface table entry, the interface ID of the interface table entry is equal to the last element in the interface ID set of the request message, increments the forwarding number field value of the interface table entry by 1, deletes the last element from the interface ID set of the request message, forwards the request message from the selected interface, and executes step 303;
step 311: the router receiving the request message from interface z1 sends a reject message from interface z1, the name and interface ID set of the reject message being equal to the name and interface ID set of the request message, respectively, the message type value being 4, and the load being empty;
step 312: judging whether the device receives a rejection message or not, if the device receives the rejection message, executing step 321, and if the device does not receive the rejection message, executing step 313;
step 313: after receiving the reject message from the interface z3, the router selects all forwarding entries with name domain values equal to that of the reject message; for each selected forwarding table entry, the router selects an interface table entry, the interface ID of which is equal to the last element of the interface ID set of the forwarding table entry; then, from all selected interface table entries, the router selects all interface table entries with the minimum forwarding number threshold; if there is an interface table entry E3 in all the selected interface table entries, and the interface ID of the interface table entry is not equal to z3, execute step 314, otherwise execute step 315;
step 314: the router receiving the reject message from the interface z3 selects a forwarding table entry, the last element of the interface ID set of the forwarding table entry is equal to the interface ID of the interface table entry E3, updates the interface ID set of the reject message to the interface ID set of the forwarding table entry, if the forwarding number of the interface table entry E3 is greater than the threshold TS1, execute step 315, otherwise execute step 316;
step 315: the router receiving the reject message from interface z3 selects all aggregation table entries whose name domain values are equal to the name domain value of the reject message, and for each aggregation table entry, the router sends a reject message from the interface identified by the interface ID domain value of the aggregation table entry, the name and interface ID set of the reject message are respectively equal to the name and interface ID set of the received reject message, the message type value is 4, the load is null, the router deletes the aggregation table entry, and step 312 is executed;
step 316: the router receiving the reject message from interface z3 creates a request message whose name field value and interface ID set field value are equal to the name field value and interface ID set field value of the reject message, respectively, the message type value is 3, the load is null, selects the interface identified by the last element of the interface ID set of the request message, selects an interface table entry whose interface ID is equal to the last element of the interface ID set of the request message, increments the forwarding number field value of the interface table entry by 1, deletes the last element from the interface ID set of the request message, forwards the request message from the selected interface, and performs step 303;
step 317: after receiving the request message, the device sends a response message, the name field value of the response message is equal to the name field value of the request message, the interface ID set is empty, the message type value is 5, and the load is response data;
step 318: judging whether the device D2 or the router receives the response message, if the device D2 executes the step 320, otherwise, executes the step 319;
step 319: after receiving the response message, the router selects all aggregation table entries with name domain values equal to the name domain value of the response message, and for each selected aggregation table entry, the router performs the following operations: the router forwards the response message from the interface identified by the interface ID of the aggregation table entry, selects an interface table entry whose interface ID is equal to the interface ID of the aggregation table entry, decrements the forwarding number of the interface table entry by 1, deletes the aggregation table entry, and executes step 318;
step 320: after receiving the response message, the device D2 saves the data in the response message payload;
step 321: and (6) ending.
The equipment realizes data communication through the process, and the process ensures the performance of data communication by controlling the quantity of the forwarding messages, thereby reducing the delay and cost of data communication; meanwhile, the process realizes the aggregation of the messages through the aggregation table, so that a plurality of devices can acquire data through one-time data communication process, thereby reducing data communication delay and cost.
Fig. 4 is a schematic diagram of a data acquisition process according to the present invention. The device D2 is connected to the router R2, the data C1 is uniquely identified by the name NA1, and if the device D2 cannot acquire the data C1 through the steps 301 and 321, the following procedure is performed to acquire the data C1:
step 401: starting;
step 402: the device D2 sends a query message, the name domain value of which is NA1, the message type value is 6, the interface ID set is empty, the load is parameter h, and the initial value of parameter h is 0;
step 403: judging whether the device or the router receives the query message from the interface k1, if the device is the device, executing the step 410, otherwise executing the step 404;
step 404: the router receives the query message from the interface k1, and increments the parameter h in the query message load by 1; if there is an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message and the interface ID is equal to k1, execute step 411, otherwise execute step 405;
step 405: the router receiving the query message from the interface k1 checks the aggregation table, if there is an aggregation table entry whose name is equal to the name of the query message, then step 406 is executed, otherwise step 407 is executed;
step 406: the router receiving the query message from the interface k1 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message, the interface ID is equal to k1, the lifetime is set to T1- (h-1) T0, T1 and T0 are preset values, and T1 is much greater than T0, for example, T1 is equal to 1s, T0 is equal to 20ms, execute step 411;
step 407: the router receiving the query message from the interface k1 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message, the interface ID is equal to k1, the life cycle is set to T1- (h-1) T0, whether the router is the router R2 is judged, if yes, step 408 is executed, otherwise, step 409 is executed;
step 408: the router receiving the query message from interface k1 selects all forwarding table entries whose name domain values are equal to the name domain value of the query message, selects an interface table entry for each selected forwarding table entry, whose interface ID is equal to the last element of the interface ID set of the forwarding table entry, then selects an interface table entry E4 from all selected interface table entries, whose forwarding number domain value is the smallest, selects a forwarding table entry E5, whose name domain value is equal to the name domain value of the query message and whose last element is equal to the interface ID domain value of interface table entry E4, and updates the interface ID set domain value of the query message to the interface ID set of forwarding table entry E5;
step 409: the router receiving the query message from interface k1 selects the interface identified by the last element of the interface ID set of the query message, selects an interface table entry whose interface ID is equal to the last element of the interface ID set of the query message, increments the forwarding number field value of the interface table entry by 1, deletes the last element from the interface ID set of the query message, forwards the query message from the selected interface, and executes step 403;
step 410: after receiving the query message, the device sends a confirmation message, wherein the name field value of the confirmation message is equal to the name field value of the query message, the interface ID set is empty, the message type value is 7, and the load is response data;
step 411: judging whether the device D2 or the router receives the confirmation message, if the device D2 or the router receives the confirmation message, executing the step 423, and if the device D2 or the router receives the confirmation message, executing the step 412;
step 412: if the router receives the acknowledgement message if condition 2 is satisfied, then step 413 is performed, otherwise step 414 is performed;
condition 2: the life cycle of all aggregation table entries with the name domain value equal to the name domain value of the confirmation message is not attenuated to 0;
step 413: the router receiving the acknowledgement message selects all aggregation table entries having a name field value equal to the name field value of the acknowledgement message, and for each selected aggregation table entry, the router performs the following operations: the router forwards the acknowledgement message from the interface identified by the interface ID of the aggregation table entry, selects an interface table entry, the interface ID of the interface table entry is equal to the interface ID of the aggregation table entry, decrements the forwarding number of the interface table entry by 1, deletes the aggregation table entry, and executes step 411;
step 414: the router receiving the acknowledgement message selects the aggregation table entry whose name domain value is equal to that of the acknowledgement message, sets the life cycle of the selected aggregation table entries to be T1, and for each selected aggregation table entry E6, the router sends a reset message from the interface identified by the interface ID of the aggregation table entry E6, the name domain value of the reset message is equal to that of the aggregation table entry E6, the interface ID set is null, the message type value is 8, and the load is a preset time T1; the router selects all forwarding entries with the name domain value equal to the name domain value of the aggregation entry E6, constructs a query message aiming at each selected forwarding entry, the name domain value and the interface ID set domain value of the query message are equal to the name domain value and the interface ID set domain value of the forwarding entry, the message type value is 6, the load is parameter h1, the initial value of parameter h1 is 0, selects an interface entry, the interface ID of the interface entry is equal to the last element of the interface ID set of the query message, the forwarding number domain value of the interface entry is increased by 1, the interface identified by the last element in the interface ID set of the query message is selected, the last element is deleted from the interface ID set of the query message, and the query message is forwarded from the selected interface;
step 415: if the device receives a reset message, go to step 411, otherwise go to step 416;
step 416: if the router receives the reset message, go to step 417, otherwise go to step 418;
step 417: the router receiving the reset message selects all aggregation table entries whose name domain values are equal to the name domain value of the reset message, for each aggregation table entry, the router sets the lifetime of the aggregation table entry to T1, sends the reset message from the interface identified by the interface ID of the aggregation table entry, and executes step 415;
step 418: judging whether the device or the router receives the query message from the interface k2, if the device is the device, executing the step 410, otherwise executing the step 419;
step 419: the router receives the query message from the interface k2, and increments the parameter h1 in the query message load by 1; if there is an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message and the interface ID is equal to k2, execute step 411, otherwise execute step 420;
step 420: the router receiving the query message from interface k2 looks up the aggregation table, if there is an aggregation table entry whose name is equal to the name of the query message, then step 421 is executed, otherwise step 422 is executed;
step 421: the router receiving the query message from interface k2 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message, the interface ID is equal to k2, the lifetime is set to T1- (h1-1) T0, and step 411 is executed;
step 422: the router receiving the query message from the interface k2 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message, the interface ID is equal to k2, and the life cycle is set to T1- (h1-1) T0; the router selects all forwarding entries having a name domain equal to the name domain of the query message, and for each forwarding entry, the router performs the following operations: updating the interface ID set of the query message to the interface ID set of the forwarding table entry, selecting an interface table entry, wherein the interface ID of the interface table entry is equal to the last element of the interface ID set of the query message, increasing the forwarding number field value of the interface table entry by 1, selecting an interface identified by the last element in the interface ID set of the query message, deleting the last element from the interface ID set of the query message, and forwarding the query message from the selected interface; step 415 is executed;
step 423: after receiving the acknowledgment message, device D2 saves the data in the acknowledgment message payload;
step 424: and (6) ending.
The equipment realizes data communication through the process, and the process realizes message aggregation through the aggregation table, so that a plurality of equipment can acquire data through one-time data communication process, thereby reducing data communication delay and cost, and meanwhile, an optimal routing path is established through the forwarding table entry, thereby further reducing data communication delay and cost.
Example 1
Based on the simulation parameters in table 1, this embodiment simulates an efficient data network routing implementation method in the present invention, and the performance analysis is as follows: when the data transmission amount is increased, the data communication cost is increased, and when the data transmission amount is reduced, the data communication cost is reduced, and the average data communication cost is 8.4.
TABLE 1 simulation parameters
Figure BDA0001800585700000151
The present invention provides a high-efficiency data network routing implementation method, and the method and the way for implementing the technical solution are many, and the above description is only a preferred embodiment of the present invention, it should be noted that, for those skilled in the art, without departing from the principle of the present invention, several improvements and modifications may be made, and these improvements and modifications should also be regarded as the protection scope of the present invention. The components not specified in this embodiment can be implemented by the prior art.

Claims (4)

1. An efficient data network routing implementation method is characterized in that the network is composed of more than two routers and more than two devices; each router is provided with more than two upstream wired interfaces and more than two downstream wired interfaces, each upstream wired interface is connected with one router, and the downstream wired interface of one router is connected with one device; a device is provided with a wired interface which is connected with a downstream wired interface of the router;
each interface is uniquely identified by an interface ID, the interface with the interface ID of i is recorded as an interface i, and i is a positive integer;
one type of data is uniquely identified by a name; a message is composed of a name, a message type, an interface ID set and a load; the message type values are as follows:
message type name Message type value Publishing messages 1 Deleting 2 Request message 3 Rejection message 4 Response message 5 Query message 6 Acknowledgement messages 7 Reset message 8
Each router maintains a forwarding table, and each forwarding table item comprises a name domain, an interface ID set domain and a life cycle domain;
the device D1 is connected to the router R1, the data C1 is uniquely identified by the name NA1, and after the device D1 generates or acquires the data C1, the following operations are performed to maintain a forwarding table:
step 101: starting;
step 102: the device D1 sends a publish message, the name of the publish message is NA1, the message type value is 1, the interface ID set is empty, and the load is empty;
step 103: after receiving the release message from the interface x1, the router R1 adds the interface x1 to the interface ID set of the release message as the last element, and then checks a forwarding table, if there is a forwarding table entry whose name domain value and interface ID set domain value are respectively equal to the name domain value and interface ID set domain value of the release message, sets the lifetime of the forwarding table entry to the maximum value, otherwise creates a forwarding table entry whose name domain value and interface ID set domain value are respectively equal to the name domain value and interface ID set domain value of the release message, and sets the lifetime to the maximum value;
step 104: router R1 forwards the received publish message from each upstream interface;
step 105: after receiving the publish message from the interface x2, the router adds the interface x2 to the interface ID set of the publish message and uses the interface x2 as the last element, the router checks a forwarding table, if a forwarding table entry exists, the name domain value of the forwarding table entry is equal to the name domain value of the publish message, and the number of elements of the interface ID set is less than that of the interface ID set of the publish message, then step 113 is executed, otherwise step 106 is executed;
step 106: the router receiving the publish message from interface x2 checks the forwarding table, if there is a forwarding table entry, the name domain value and interface ID set of the forwarding table entry are equal to the name domain value and interface ID set of the publish message, respectively, step 107 is executed, otherwise step 108 is executed;
step 107: the router receiving the distribution message from the interface x2 checks the forwarding table, selects a forwarding table entry whose name domain value and interface ID set are equal to the name domain value and interface ID set of the distribution message, sets the life cycle of the forwarding table entry to the maximum value, and executes step 112;
step 108: the router receiving the publish message from interface x2 checks the forwarding table, if there is a forwarding table entry, the name field value of the forwarding table entry is equal to the name field value of the publish message and the number of elements of the interface ID set is equal to the number of elements of the interface ID set of the publish message, then step 111 is executed, otherwise step 109 is executed;
step 109: the router receiving the publish message from interface x2 checks the forwarding table, if there is a forwarding table entry, the name field value of the forwarding table entry is equal to the name field value of the publish message and the number of elements of the interface ID set is greater than the number of elements of the interface ID set of the publish message, then step 110 is executed, otherwise step 111 is executed;
step 110: the router receiving the distribution message from the interface x2 checks the forwarding table, selects all forwarding table entries meeting the condition 1, and deletes all forwarding table entries meeting the condition 1;
condition 1: the name domain value of the forwarding table entry is equal to the name domain value of the release message, and the number of elements of the interface ID set is greater than that of the interface ID set of the release message;
step 111: the router receiving the release message from the interface x2 creates a forwarding table entry, the name domain value and the interface ID set domain value of the forwarding table entry are respectively equal to the name domain value and the interface ID set domain value of the release message, and the life cycle is set to be the maximum value;
step 112: the router that received the publish message from interface x2 forwards the publish message from each upstream interface except interface x2, performing step 105;
step 113: and (6) ending.
2. The method of claim 1, wherein if device D1 deletes data C1, the following procedure is performed to update the forwarding table:
step 201: starting;
step 202: the device D1 sends a delete message, the name of which is NA1, the message type value is 2, the interface ID set is null, and the load is null;
step 203: after receiving the delete message from interface y1, router R1 adds interface y1 to the interface ID set of the delete message, checks the forwarding table, and deletes a forwarding table entry if there is a forwarding table entry whose name and interface ID set are equal to the name and interface ID set of the delete message, respectively;
step 204: router R1 forwards the delete message from each upstream interface;
step 205: after the router receives the delete message from interface y2, if there is a forwarding entry, the name of the forwarding entry is equal to the name of the delete message and the first element of the interface ID set is equal to the first element of the interface ID set of the delete message, go to step 206, otherwise go to step 207;
step 206: the router receiving the delete message from interface y2 selects a forwarding table with a name equal to the name of the delete message and a first element of the set of interface IDs equal to the first element of the set of interface IDs of the delete message, deletes the forwarding table, forwards the delete message from all upstream interfaces except interface y2, and performs step 205;
step 207: and (6) ending.
3. The method of claim 2, wherein each router maintains an aggregation table, each aggregation table entry comprising a name field, an interface ID field, and a lifetime field;
each router maintains an interface table, and one interface table item comprises an interface ID field and a forwarding number field;
the device D2 is connected to the router R2, the data C1 is uniquely identified by the name NA1, and the device D2 acquires the data C1 by the following procedure:
step 301: starting;
step 302: the device D2 sends a request message, the name field value of which is NA1, the message type value is 3, the interface ID set is null, and the load is null;
step 303: judging whether the device or the router receives the request message from the interface z1, if the device is the device, executing the step 317, otherwise executing the step 304;
step 304: the router receives the request message from interface z1, looks at the aggregation table, if there is an aggregation table entry whose name equals the name of the request message and interface ID equals z1, then performs step 318, otherwise performs step 305;
step 305: the router receiving the request message from interface z1 looks up the aggregation table, if there is an aggregation table entry whose name is equal to the name of the request message, then step 306 is executed, otherwise step 307 is executed;
step 306: the router receiving the request message from interface z1 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the request message, the interface ID is equal to z1, the lifetime is set to the maximum value, and step 318 is executed;
step 307: judging whether the router receiving the request message from the interface z1 is the router R2, if so, executing the step 308, otherwise, executing the step 309;
step 308: the router receiving the request message from interface z1 selects all forwarding entries with name field values equal to the request message name field value; for each selected forwarding table entry, the router selects an interface table entry, the interface ID of which is equal to the last element of the interface ID set of the forwarding table entry; then the router selects an interface table entry E1 from all the selected interface table entries, the forwarding number domain value of the interface table entry is minimum, the router selects a forwarding table entry E2, the name domain value of the forwarding table entry is equal to the name domain value of the request message, the last element of the interface ID set is equal to the interface ID domain value of the interface table entry E1, and the interface ID set domain value of the request message is updated to the interface ID set of the forwarding table entry E2;
step 309: the router receiving the request message from interface z1 selects an interface entry with an interface ID equal to the last element of the interface ID set of the request message; if the forwarding number of the interface table entry is greater than the predetermined value TS1, performing step 311, otherwise, performing step 310;
step 310: the router receiving the request message from interface z1 creates an aggregation table entry from interface z1, the name of the aggregation table entry is equal to the name of the request message, the interface ID is equal to z1, the lifetime is set to the maximum value, the router selects the interface identified by the last element in the interface ID set of the request message, selects an interface table entry, the interface ID of the interface table entry is equal to the last element in the interface ID set of the request message, increments the forwarding number field value of the interface table entry by 1, deletes the last element from the interface ID set of the request message, forwards the request message from the selected interface, and executes step 303;
step 311: the router receiving the request message from interface z1 sends a reject message from interface z1, the name and interface ID set of the reject message being equal to the name and interface ID set of the request message, respectively, the message type value being 4, and the load being empty;
step 312: judging whether the device receives a rejection message or not, if the device receives the rejection message, executing step 321, and if the device does not receive the rejection message, executing step 313;
step 313: after receiving the reject message from the interface z3, the router selects all forwarding entries with name domain values equal to that of the reject message; for each selected forwarding table entry, the router selects an interface table entry, the interface ID of which is equal to the last element of the interface ID set of the forwarding table entry; then, from all selected interface table entries, the router selects all interface table entries with the minimum forwarding number threshold; if there is an interface table entry E3 in all the selected interface table entries, and the interface ID of the interface table entry is not equal to z3, execute step 314, otherwise execute step 315;
step 314: the router receiving the reject message from the interface z3 selects a forwarding table entry, the last element of the interface ID set of the forwarding table entry is equal to the interface ID of the interface table entry E3, updates the interface ID set of the reject message to the interface ID set of the forwarding table entry, if the forwarding number of the interface table entry E3 is greater than the threshold TS1, execute step 315, otherwise execute step 316;
step 315: the router receiving the reject message from interface z3 selects all aggregation table entries whose name domain values are equal to the name domain value of the reject message, and for each aggregation table entry, the router sends a reject message from the interface identified by the interface ID domain value of the aggregation table entry, the name and interface ID set of the reject message are respectively equal to the name and interface ID set of the received reject message, the message type value is 4, the load is null, the router deletes the aggregation table entry, and step 312 is executed;
step 316: the router receiving the reject message from interface z3 creates a request message whose name field value and interface ID set field value are equal to the name field value and interface ID set field value of the reject message, respectively, the message type value is 3, the load is null, selects the interface identified by the last element of the interface ID set of the request message, selects an interface table entry whose interface ID is equal to the last element of the interface ID set of the request message, increments the forwarding number field value of the interface table entry by 1, deletes the last element from the interface ID set of the request message, forwards the request message from the selected interface, and performs step 303;
step 317: after receiving the request message, the device sends a response message, the name field value of the response message is equal to the name field value of the request message, the interface ID set is empty, the message type value is 5, and the load is response data;
step 318: judging whether the device D2 or the router receives the response message, if the device D2 executes the step 320, otherwise, executes the step 319;
step 319: after receiving the response message, the router selects all aggregation table entries with name domain values equal to the name domain value of the response message, and for each selected aggregation table entry, the router performs the following operations: the router forwards the response message from the interface identified by the interface ID of the aggregation table entry, selects an interface table entry whose interface ID is equal to the interface ID of the aggregation table entry, decrements the forwarding number of the interface table entry by 1, deletes the aggregation table entry, and executes step 318;
step 320: after receiving the response message, the device D2 saves the data in the response message payload;
step 321: and (6) ending.
4. The method as claimed in claim 3, wherein if the device D2 cannot obtain the data C1 through steps 301 and 321, the following procedure is performed to obtain the data C1:
step 401: starting;
step 402: the device D2 sends a query message, the name domain value of which is NA1, the message type value is 6, the interface ID set is empty, the load is parameter h, and the initial value of parameter h is 0;
step 403: judging whether the device or the router receives the query message from the interface k1, if the device is the device, executing the step 410, otherwise executing the step 404;
step 404: the router receives the query message from the interface k1, and increments the parameter h in the query message load by 1; if there is an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message and the interface ID is equal to k1, execute step 411, otherwise execute step 405;
step 405: the router receiving the query message from the interface k1 checks the aggregation table, if there is an aggregation table entry whose name is equal to the name of the query message, then step 406 is executed, otherwise step 407 is executed;
step 406: the router receiving the query message from interface k1 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message, the interface ID is equal to k1, the lifetime is set to T1- (h-1) T0, and T1 and T0 are preset values, and step 411 is executed;
step 407: the router receiving the query message from the interface k1 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message, the interface ID is equal to k1, the life cycle is set to T1- (h-1) T0, whether the router is the router R2 is judged, if yes, step 408 is executed, otherwise, step 409 is executed;
step 408: the router receiving the query message from interface k1 selects all forwarding table entries whose name domain values are equal to the name domain value of the query message, selects an interface table entry for each selected forwarding table entry, whose interface ID is equal to the last element of the interface ID set of the forwarding table entry, then selects an interface table entry E4 from all selected interface table entries, whose forwarding number domain value is the smallest, selects a forwarding table entry E5, whose name domain value is equal to the name domain value of the query message and whose last element is equal to the interface ID domain value of interface table entry E4, and updates the interface ID set domain value of the query message to the interface ID set of forwarding table entry E5;
step 409: the router receiving the query message from interface k1 selects the interface identified by the last element of the interface ID set of the query message, selects an interface table entry whose interface ID is equal to the last element of the interface ID set of the query message, increments the forwarding number field value of the interface table entry by 1, deletes the last element from the interface ID set of the query message, forwards the query message from the selected interface, and executes step 403;
step 410: after receiving the query message, the device sends a confirmation message, wherein the name field value of the confirmation message is equal to the name field value of the query message, the interface ID set is empty, the message type value is 7, and the load is response data;
step 411: judging whether the device D2 or the router receives the confirmation message, if the device D2 or the router receives the confirmation message, executing the step 423, and if the device D2 or the router receives the confirmation message, executing the step 412;
step 412: if the router receives the acknowledgement message if condition 2 is satisfied, then step 413 is performed, otherwise step 414 is performed;
condition 2: the life cycle of all aggregation table entries with the name domain value equal to the name domain value of the confirmation message is not attenuated to 0;
step 413: the router receiving the acknowledgement message selects all aggregation table entries having a name field value equal to the name field value of the acknowledgement message, and for each selected aggregation table entry, the router performs the following operations: the router forwards the acknowledgement message from the interface identified by the interface ID of the aggregation table entry, selects an interface table entry, the interface ID of the interface table entry is equal to the interface ID of the aggregation table entry, decrements the forwarding number of the interface table entry by 1, deletes the aggregation table entry, and executes step 411;
step 414: the router receiving the acknowledgement message selects the aggregation table entry whose name domain value is equal to that of the acknowledgement message, sets the life cycle of the selected aggregation table entries to be T1, and for each selected aggregation table entry E6, the router sends a reset message from the interface identified by the interface ID of the aggregation table entry E6, the name domain value of the reset message is equal to that of the aggregation table entry E6, the interface ID set is null, the message type value is 8, and the load is a preset time T1; the router selects all forwarding entries with the name domain value equal to the name domain value of the aggregation entry E6, constructs a query message aiming at each selected forwarding entry, the name domain value and the interface ID set domain value of the query message are equal to the name domain value and the interface ID set domain value of the forwarding entry, the message type value is 6, the load is parameter h1, the initial value of parameter h1 is 0, selects an interface entry, the interface ID of the interface entry is equal to the last element of the interface ID set of the query message, the forwarding number domain value of the interface entry is increased by 1, the interface identified by the last element in the interface ID set of the query message is selected, the last element is deleted from the interface ID set of the query message, and the query message is forwarded from the selected interface;
step 415: if the device receives a reset message, go to step 411, otherwise go to step 416;
step 416: if the router receives the reset message, go to step 417, otherwise go to step 418;
step 417: the router receiving the reset message selects all aggregation table entries whose name domain values are equal to the name domain value of the reset message, for each aggregation table entry, the router sets the lifetime of the aggregation table entry to T1, sends the reset message from the interface identified by the interface ID of the aggregation table entry, and executes step 415;
step 418: judging whether the device or the router receives the query message from the interface k2, if the device is the device, executing the step 410, otherwise executing the step 419;
step 419: the router receives the query message from the interface k2, and increments the parameter h1 in the query message load by 1; if there is an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message and the interface ID is equal to k2, execute step 411, otherwise execute step 420;
step 420: the router receiving the query message from interface k2 looks up the aggregation table, if there is an aggregation table entry whose name is equal to the name of the query message, then step 421 is executed, otherwise step 422 is executed;
step 421: the router receiving the query message from interface k2 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message, the interface ID is equal to k2, the lifetime is set to T1- (h1-1) T0, and step 411 is executed;
step 422: the router receiving the query message from the interface k2 creates an aggregation table entry, the name of the aggregation table entry is equal to the name of the query message, the interface ID is equal to k2, and the life cycle is set to T1- (h1-1) T0; the router selects all forwarding entries having a name domain equal to the name domain of the query message, and for each forwarding entry, the router performs the following operations: updating the interface ID set of the query message to the interface ID set of the forwarding table entry, selecting an interface table entry, wherein the interface ID of the interface table entry is equal to the last element of the interface ID set of the query message, increasing the forwarding number field value of the interface table entry by 1, selecting an interface identified by the last element in the interface ID set of the query message, deleting the last element from the interface ID set of the query message, and forwarding the query message from the selected interface; step 415 is executed;
step 423: after receiving the acknowledgment message, device D2 saves the data in the acknowledgment message payload;
step 424: and (6) ending.
CN201811075143.3A 2018-09-14 2018-09-14 High-efficiency data network routing implementation method Active CN109039901B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811075143.3A CN109039901B (en) 2018-09-14 2018-09-14 High-efficiency data network routing implementation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811075143.3A CN109039901B (en) 2018-09-14 2018-09-14 High-efficiency data network routing implementation method

Publications (2)

Publication Number Publication Date
CN109039901A CN109039901A (en) 2018-12-18
CN109039901B true CN109039901B (en) 2020-08-25

Family

ID=64622376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811075143.3A Active CN109039901B (en) 2018-09-14 2018-09-14 High-efficiency data network routing implementation method

Country Status (1)

Country Link
CN (1) CN109039901B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109768932B (en) * 2019-03-04 2020-12-11 常熟理工学院 Method for implementing named data network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325073A (en) * 2011-07-06 2012-01-18 杭州华三通信技术有限公司 VPLS (Virtual Private Local Area Network Service)-based message processing method and device thereof
CN106911570A (en) * 2017-03-29 2017-06-30 常熟理工学院 A kind of reliable network data communication method
CN106941449A (en) * 2017-03-29 2017-07-11 常熟理工学院 A kind of network data communication method based on mechanism on demand

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325073A (en) * 2011-07-06 2012-01-18 杭州华三通信技术有限公司 VPLS (Virtual Private Local Area Network Service)-based message processing method and device thereof
CN106911570A (en) * 2017-03-29 2017-06-30 常熟理工学院 A kind of reliable network data communication method
CN106941449A (en) * 2017-03-29 2017-07-11 常熟理工学院 A kind of network data communication method based on mechanism on demand

Also Published As

Publication number Publication date
CN109039901A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN109088778B (en) Data communication implementation method for future mobile network
CN109257789B (en) Vehicle-mounted network data communication method based on multi-hop cluster
CN110113264B (en) Method for realizing cache and route of named data network
CN109246785B (en) Method for realizing future mobile network
CN109462549B (en) Method for implementing new generation wireless mobile network
CN109150723B (en) Routing communication implementation method of Internet of things
CN106993321B (en) Network data communication method based on cluster
US9961020B2 (en) Packet forwarding system, device, and method
CN106911570B (en) A kind of reliable network data communication method
CN107852367B (en) Method of path establishment in mesh network, relay node and computer readable storage medium
WO2015117391A1 (en) Method for realizing resource attribute notification, and common service entity
CN109089241B (en) Data communication implementation method for vehicle-mounted network
CN109039901B (en) High-efficiency data network routing implementation method
CN110401911B (en) Vehicle-mounted cloud implementation method based on named data network
CN108696838B (en) Vehicle-mounted data routing method based on position information
CN111245725B (en) Future network implementation method based on distribution
CN109768893B (en) High-efficiency big data network data communication implementation method
CN111277497B (en) Method for realizing network service deployment and discovery based on distribution
CN110233889B (en) Network data communication implementation method based on cache mechanism
CN108494595B (en) High-efficiency new-generation big data network implementation method
CN109257276B (en) Efficient named data network implementation method
CN107949000B (en) Low-delay opportunistic network implementation method
CN110719208B (en) Method for implementing new generation network based on shortest path
CN108965138B (en) Method for implementing new generation multimedia sensor network
CN108462623B (en) High-efficiency data center network implementation method

Legal Events

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