WO2017206410A1 - 一种网络分享系统和网络分享方法 - Google Patents

一种网络分享系统和网络分享方法 Download PDF

Info

Publication number
WO2017206410A1
WO2017206410A1 PCT/CN2016/101290 CN2016101290W WO2017206410A1 WO 2017206410 A1 WO2017206410 A1 WO 2017206410A1 CN 2016101290 W CN2016101290 W CN 2016101290W WO 2017206410 A1 WO2017206410 A1 WO 2017206410A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
link state
network
routing
data
Prior art date
Application number
PCT/CN2016/101290
Other languages
English (en)
French (fr)
Inventor
王岳彪
Original Assignee
尚一民
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 尚一民 filed Critical 尚一民
Publication of WO2017206410A1 publication Critical patent/WO2017206410A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • 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/742Route cache; Operation thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • H04W84/22Self-organising networks, e.g. ad-hoc networks or sensor networks with access to wired networks

Definitions

  • the present invention belongs to the field of communication technologies, and in particular, to a network sharing system and a network sharing method.
  • the popularity of smart terminals has provided people with a more convenient lifestyle. People often use smart terminals to access the wireless LAN provided by wireless routers to access the Internet.
  • the wireless network coverage of a single wireless router is In order to expand the coverage of the wireless network, it is generally adopted to deploy multiple wireless routers or deploy a WDS (Wireless Distribution System). If multiple wireless routers are deployed, each wireless router is connected to the Internet, which leads to The cost of wireless network deployment increases; if WDS is deployed, the entire WDS has only one network egress, which results in limited bandwidth when the intelligent terminal accesses the Internet.
  • WDS Wireless Distribution System
  • the present invention provides a network sharing system and a network sharing method.
  • the network sharing system in the present invention includes a network access device and a network expansion device, and the network access device is connected to the Internet and provides wireless network services and network access.
  • the device and the network expansion device form a wireless self-organizing network, and the network expansion device connects to the network access device through the wireless self-organizing network to indirectly connect to the Internet and provides wireless network service, and the innovative invention is maintained in the network access device and the network expansion device.
  • the network sharing system of the invention greatly reduces the deployment cost of the wireless network, ensures that the intelligent terminal has sufficient bandwidth when accessing the Internet, has broad application prospects, and belongs to a brand-new network sharing technology.
  • a network sharing system includes at least one network access device and at least one network expansion device, the network access device is connected to the Internet, and the network access device and the network expansion device form a wireless ad hoc network, and the network expansion device Accessing the Internet through a network access device, the network access device and the network expansion device providing wireless network services for the use terminals in the respective coverage areas, each network access device maintaining network access routing information,
  • the network access routing information records a correspondence between an address of each destination network device that the network access device can access and an address of the next hop network device that is optimally selected when the network access device accesses each destination network device,
  • Each network expansion device maintains network extension routing information, and the network extension routing information records an address of each destination network device that the network expansion device can access and an optimal selection when the network expansion device accesses each destination network device.
  • the destination The network device is a network access device or a network expansion device
  • the next hop network device is a network access device or a network expansion device
  • the network access device is connected between the use terminal and the Internet within the coverage of the network access device.
  • each network access device maintains network access routing information and service information, wherein the service information records an address of the network expansion device and the network expansion device coverage Corresponding relationship between the addresses of the used terminals in the range, the address of the destination network device recorded in the network access routing information includes the address of the network expansion device recorded in the service information; each network Network expansion routing information and gateway information are maintained in the network expansion device, where the address of the network access device is recorded in the gateway information, and the address of the destination network device recorded in the network extension routing information includes the network recorded in the gateway information. The address of the access device.
  • each network access device comprises a network access networking unit, a data analysis unit, and a network access radio service unit
  • the network access networking unit including a routing subunit And a data transceiver sub-unit and a service information sub-unit
  • the network access radio service unit provides a wireless network service for the user terminal within the coverage of the network access device, and is connected to the data analysis unit, where the network access The networking unit is connected to the data analysis unit, and the data analysis unit is connected to the Internet; and the data accessing the wireless service unit and the data analysis unit is used to implement data between the use terminal and the Internet within the coverage of the network access device.
  • a routing allocation table is maintained in the routing subunit, and the network access route is maintained
  • the information is a plurality of allocation record entries included in the routing allocation table, and each allocation record The entry of the destination address and the candidate assigned routing address is recorded in the entry, where the destination address is the address of the destination network device that the network access device can access, and the candidate allocated routing address is the access destination address of the network access device.
  • the service information subunit maintains a service information table, and the service information is a plurality of service record entries included in the service information table, each The service record entry records the correspondence between the address of the used terminal and the address of the network extension device that provides the wireless network service for the user terminal.
  • each network expansion device comprises a network expansion networking unit and a network extension wireless service unit, the network expansion networking unit comprising a routing subunit and a data transceiver subunit
  • the network expansion wireless service unit provides a wireless network service for the use terminal within the coverage of the network expansion device; the use terminal within the coverage of the network expansion device expands the wireless service unit and the network expansion network unit and other network expansion devices or networks through the network
  • the access device performs data communication;
  • the routing sub-unit maintains a routing allocation table and a gateway list, and the network extended routing information is a plurality of allocation record entries included in the routing allocation table, and each allocation record entry is Recording a correspondence between a destination address and a candidate allocation routing address, where the destination address is an address of a destination network device that the network extension device can access, and the candidate distribution routing address is a destination network device corresponding to the network expansion device access destination address Optimal choice of next hop network Address of the device, said gateway access network apparatus information recorded in the list of gateway
  • the data analysis unit comprises a data unit and a gateway unit
  • the data unit passes data packets from the network access wireless service unit
  • the gateway unit sends the Internet to the Internet, and determines whether the data packet received by the gateway unit from the Internet is sent to the use terminal within the coverage of the network access device, and if so, sends the data packet from the Internet to the wireless service unit through the network access wireless service unit.
  • the data transceiver subunit encapsulates the data packet from the Internet into a payload data frame for transmission, the load
  • the sender address of the data frame is the address of the data transceiver subunit in the network access networking unit
  • the receiver address of the load data frame is the destination in the route allocation table maintained by the routing subunit in the network access networking unit.
  • the frame body of the load data frame includes the data packet from the Internet, and the data transceiver subunit in the network access networking unit receives or forwards load data frames from other network devices; each network expansion device covers The data packet sent by the using terminal in the range is sent to the network expansion networking unit through the network extension wireless service unit, and the network expansion networking unit encapsulates the data packet sent by the terminal into a load data frame for transmission, and the load data frame is sent.
  • the square address is in the network expansion networking unit.
  • the address of the data transceiver unit, the receiver address of the load data frame is an allocation record table in which the destination address in the route allocation table maintained by the routing subunit in the network extension networking unit is the same as the address of a network access device in the gateway list.
  • the candidate in the item allocates a routing address
  • the frame body of the payload data frame includes a data packet sent by the terminal, and the data transceiver subunit in the network extension networking unit receives or forwards a load data frame from another network device.
  • the routing subunits in the network access device and the network expansion device each include a routing information maintenance module and an original link state message generation module
  • the original link The status message generating module periodically constructs the original link state message according to the time interval and encapsulates the data into the original routing data frame, and the original routing data frame generated by the network access device includes the receiving party.
  • An address, a sender address, and a routing frame body where the routing frame body includes an original link state message, where the original link state message includes an original sender address, a link state value, a gateway tag, and a sequence number,
  • the original sender address is an address of a data transceiver subunit in the network access device, the link state value takes a maximum value, and the sequence number changes in a fixed step size;
  • the original route data frame generated by the network extension device includes a receiver address, a sender address, and a routing frame body, where the routing frame body includes an original link state packet, and the original chain
  • the status message includes an original sender address, a link state value, a terminal information, and a sequence number, where the original sender address is an address of a data transceiver subunit in the network extension device, and the link state value takes a maximum value.
  • the terminal information is the address of the user terminal in the coverage of the network expansion device, and the serial number is changed in a fixed step; the routing information maintenance module of the network access device receives and forwards the routing data frame generated by other network devices. And updating the link state value of the link state packet in the routing data frame when forwarding the routing data frame, and the updated link state value is used to respond to the network device corresponding to the original sender address of the link state message and the network a communication link state between the access devices, the routing information maintenance module in the network access device maintains a route allocation table based on the route data frame, and the destination address recorded in each allocation record entry of the route allocation table is Routing the original sender address of the link state message of the data frame, and recording the candidate route address for the access to the network access device The address of the next hop network device of the network access device with the highest link state stability value in the communication link of the network device corresponding to the address; the routing information maintenance module of the network extension device receives and forwards the route generated by the other network device a data frame,
  • the network sharing system wherein the network access device and the routing information maintenance module of the network extension device maintain an overlay table, a reception table, a link state table, and the route allocation based on the route data frame maintenance. table;
  • the overlay table includes a plurality of superimposed record entries, each of which records a correspondence between a candidate route address and a superimposed value, and in a correspondence relationship of each superimposed record entry, the candidate route address
  • the address of the neighboring one-hop network device of the network device, the superimposed value is that the routing data frame sent by the network device is received by the adjacent one-hop network device of the network device corresponding to the candidate routing address, and is forwarded again by the network device.
  • the probability of receiving and receiving received by the network device is that the routing data frame sent by the network device is received by the adjacent one-hop network device of the network device corresponding to the candidate routing address, and is forwarded again by the network device.
  • the receiving table includes a plurality of receiving record entries, each of which records a correspondence between a destination address, a candidate route address, and a received value, and in a correspondence relationship of each received record entry, Head
  • the address is the address of the destination network device
  • the candidate routing address is the address of the neighboring one-hop network device of the network device
  • the received value is corresponding to the routing data frame sent by the destination network device corresponding to the destination address.
  • the link state table includes a plurality of link state record entries, and each link state record entry records a correspondence between a destination address, a candidate route address, and a link state stable value, and the link state table
  • each link state record entry is formed by an overlay record entry having the same candidate route address and a received record entry, and the destination address in the link state record entry
  • the candidate route address in the link state record entry is the same candidate route address included in the overlay record entry and the receive record entry
  • the link state stability value in the calculation is calculated based on the superimposed value in the superimposed record entry and the received value in the received record entry;
  • the route allocation table is configured based on the link state table, extracting a link state record entry set having the same destination address in the link state table, and selecting a link state in the link state record entry set The link state record entry with the highest stable value, and the destination address and the candidate route address in the link state record entry with the highest link state stability value as the destination address in the allocation record entry of the route allocation table, respectively.
  • the network device is a network access device or a network expansion device
  • the address of the network device is an address of a data access subunit in the network access device or the network expansion device.
  • the network sharing system wherein the network access device and the routing information maintenance module of the network expansion device update the overlay table and the receiving table based on the latest routing data frame, when the chain of the routing data frame
  • the routing information maintenance module updates the overlay table, and queries the overlay table for the superimposed record entry whose candidate route address is the sender address of the route data frame. If the superimposed record entry is queried, the superimposed value in the superimposed record entry is updated, and if the superimposed record entry cannot be queried, an overlay record entry is added to the overlay table, and the new one is added.
  • the candidate routing address in the superimposed record entry is the sender address of the routing data frame.
  • the calculation method of the superimposed value in the newly added superimposed record entry is the same as the update method of the superimposed value; when the link state message of the routing data frame is received
  • the routing information maintenance module updates the receiving table, and queries the destination in the receiving table.
  • the address is the original sender address of the link state message of the routing data frame and the candidate routing address is the receiving record entry of the sender address of the routing data frame, and the receiving record is updated if the receiving record entry can be queried If the received value of the entry is not queried, a new receive record entry is added to the receive table.
  • the destination address in the new receive record entry is the link status report of the routed data frame.
  • the original sender address of the text, the candidate route address in the newly added record entry is the sender address of the route data frame, the calculation method of the received value in the newly received record entry, and the update method of the received value the same.
  • the routing information maintenance module updates the link state table at the same time each time after updating the receiving table: first extracting a link state of a routing data frame The link state value of the packet is recorded as x; secondly, in the overlay table, the candidate route address is searched for the superimposed record entry of the sender address of the route data frame, and if the superposition record entry cannot be queried in the overlay table, Ending the update of the link state table, if the superimposed record entry is queried in the overlay table, extracting the superimposed value in the superimposed record entry, denoted as y; and then extracting the destination address in the receive table as a route
  • the original sender address of the link state message of the data frame and the candidate routing address is the received value in the receiving record entry of the sender address of the routing data frame, denoted as z; when (y/z) ⁇ 1, The link state value of the link state packet of the routing data frame is updated to x*(y/z).
  • the link state of the link state packet of the data frame is routed.
  • the value is updated to the original value x;
  • the link state table is queried in the link state table for the original sender address of the link state message in the route data frame and the candidate route address is the link state record of the sender address of the route data frame. If the link state record entry is queried, the link state stable value in the link state record entry is updated based on the updated link state value of the link state packet of the route data frame. If the link state record entry cannot be queried, a link state record entry is added to the link state table, and the destination address of the newly added link state record entry is the link in the route data frame.
  • the original sender address of the status packet, the candidate route address of the newly added link state record entry is the sender address of the route data frame, and the link state stability value of the newly added link state record entry is the route data frame.
  • the updated link state value of the link state message in the middle is the sender address of the route data frame.
  • the network sharing system wherein the link state table maintains an average queue for each link state record entry, and the average queue corresponding to each link state record entry The same value is obtained.
  • the average queue state stores the updated link state value of the link state packet of the routing data frame, and the moving in and out of the link state value in the average queue follows the principle of first in first out.
  • the link state stability value in the link state record entry is an average value of all link state values stored in the average queue; the routing information maintenance module updates the site at the same time each time after updating the receiving table.
  • the link state table is: first, the link state value of the link state message of the route data frame is extracted, and is recorded as x; secondly, in the overlay table, the candidate route address is searched for the superimposed record entry of the sender address of the route data frame, If the superimposed record entry cannot be queried in the overlay table, the link state table is updated, and if the superimposed record entry is queried in the overlay table, Taking the superimposed value in the superimposed record entry, denoted as y; then extracting the original sender address of the link state message whose destination address is the route data frame in the receiving table and the candidate route address is the sender address of the route data frame The received value in the received record entry is marked as z; when (y/z) ⁇ 1, the link state value of the link state message of the routed data frame is updated to x*(y/z), when (y/z) ⁇ 1, the link state value of the link state packet of the routing data frame is updated to the original value x; finally, the link state message of the routing data frame
  • the original sender address and the candidate route address are the link state record entries of the sender address of the route data frame. If the link state record entry is queried, the link state record entry corresponding to the link state record entry is The link state value of the link state packet of the routing data frame is shifted, and the average value of all link state values in the averaging queue is recalculated, and the link state stable value in the link state record entry is Updated to the average, if the chain cannot be queried The status record entry adds a link state record entry to the link state table. The destination address of the newly added link state record entry is the original sender address of the link state packet of the routed data frame.
  • the candidate route address of the added link state record entry is the sender address of the route data frame, and is updated after the link state packet of the route data frame is moved to the average queue corresponding to the newly added link state record entry.
  • the link state value of the link state record of the newly added link state record entry is the average of the link state values in the corresponding mean queue.
  • the routing information maintenance module updates the routing allocation table at the same time each time after updating the link state table: first querying in the link state table Obtaining a link state record entry of the original sender address of the link state packet whose destination address is a route data frame; and then selecting a link state with the link state stable value being the largest in the link state record entry set The entry is recorded, and the destination address and the candidate route address in the link state record entry with the highest link state stability value are respectively used as the destination address and the candidate route address in the route update information; and then the query destination is used in the route allocation table.
  • the address is an allocation record entry of the destination address in the routing update information, and if the allocation record entry is found, the candidate allocation routing address in the allocation record entry is updated to the candidate route in the routing update information. Address, if the allocation record entry cannot be found, add an assignment record entry to the route assignment table, and add a new entry. Destination address and the routing address assignment candidate record table entry are updated and the candidate destination addresses in the routing address information for the route.
  • the network sharing system wherein the overlay table maintains a superimposed queue for each superimposed recording entry, and the superimposed queues corresponding to each superimposed recording entry have the same length, and the superimposed queue stores
  • the sequence number of the link state message with the routing data frame, and the moving in and out of the serial number in the superimposed queue follows the principle of first in first out, and the superimposed value in each superimposed record entry is stored in its corresponding superimposed queue.
  • the ratio of the number of the serial number to the length of the superimposed queue, and the process of moving in and out of the serial number in the superposition queue corresponding to each superimposed record entry in the superposition table is kept synchronized, and the routing information maintenance module is updated based on the latest routing data frame.
  • the superimposed value in the superimposed record entry is updated in the following manner: the superimposed record entry in the superimposed table whose candidate route address is the sender address of the route data frame is used as the superimposed record entry, and the superimposed record is recorded The sequence number of the link state packet that is moved into the routing data frame in the superimposed queue corresponding to the entry, and the stack is added to the overlay table. The superimposed queue corresponding to the superimposed record entry other than the record entry is moved into an empty element, and then the superimposed value of each superimposed record entry in the superimposed table is updated to the number and superposition of the serial number stored in the corresponding superimposed queue.
  • the serial number of the packet, and the sequence number of the receiving queue moves in and out according to the principle of first in first out, and the received value in each receiving record entry is the number of serial numbers stored in the corresponding receiving queue and the receiving queue.
  • the ratio of the length, and the process of moving in and out of the sequence number in the receiving queue corresponding to the receiving record entry having the same destination address in the receiving table is synchronized, and the routing information maintenance module updates the receiving table based on the latest routing data frame.
  • the destination address in the receive table is the chain of the routed data frame.
  • the original sender address of the status message and the candidate record address is the received record entry of the sender address of the route data frame as the received record entry, and the link of the route data frame is moved to the receive queue corresponding to the received record entry.
  • the sequence number of the status message is simultaneously shifted into the receiving queue corresponding to the other receiving record entries of the original sender address whose destination address is the link state message of the routing data frame in the receiving table except the receiving record entry.
  • An empty element and then updating the received value of each receiving record entry of the original sender address of the link state message whose destination address is the routing data frame in the table to the number of the serial number stored in the corresponding receiving queue and The ratio of the length of the receive queue.
  • the network sharing system wherein the superimposed queue is the same length as the receiving queue; the sequence number of the newly generated link state message is in a previous link state having the same original sender address The serial number of the message is incremented by a fixed step length L; the routing information maintenance module updates the superimposed value of the superimposed record item in the superimposed table each time the update table is updated: extracting each of the superimposed tables The maximum value of the sequence number in the superposition queue corresponding to the superimposed record entry, denoted as a, and extract the sequence number of the link state message of the routed data frame, which is denoted as b, and other than the superimposed record entry in the superposition table.
  • the superimposed queue corresponding to the superimposed record entry is sequentially shifted into ((ba)/L) empty elements, and sequentially moved into (((ba)/L)-1) empty elements and to the superposition queue corresponding to the superimposed record entry) Sequence number b, and then updating the superimposed value in each superimposed record entry in the superimposed table to the ratio of the number of serial numbers stored in the corresponding superimposed queue to the length of the superimposed queue; the routing information maintenance module each time When the receiving table is newly received, the receiving value of the related receiving record entry in the receiving table is updated in the following manner: the receiving record entry corresponding to the original sender address of the link state packet whose destination address is the routing data frame in the receiving table is extracted.
  • the maximum value of the sequence number in the receive queue is recorded as m, and the sequence number of the link state message of the routed data frame is extracted, denoted as n, and the destination address other than the received record entry in the receive table is a route data frame.
  • the receiving queue corresponding to the receiving record entry of the original sender address of the link state message is sequentially moved into ((nm)/L) empty elements, and is sequentially moved into the receiving queue corresponding to the receiving record entry ((( Nm) / L) -1) an empty element and a sequence number n, and then update the received value of each received record entry of the original sender address of the link state message whose destination address is the route data frame in the receive table to The ratio of the number of serial numbers stored in the corresponding receive queue to the length of the receive queue.
  • the network sharing system wherein the network access networking unit of the network access device further includes a preprocessing subunit, and the preprocessing subunit is connected to the network access networking unit.
  • the provided routing data frame is the latest routing data frame and is sent to the routing information maintenance module of the routing subunit, and is newly added in the preprocessing table.
  • a pre-processing record entry, the original sender address and sequence number of the newly added pre-processing record entry are respectively the original sender address and sequence number of the link state message of the routing data frame; if in the pre-processing table Querying the pre-processing record entry of the original sender address of the link state packet whose original sender address is the route data frame, comparing the sequence number of the pre-processed record entry with the link state report of the route data frame If the sequence number in the pre-processing record entry is smaller than the sequence number of the link state packet of the routing data frame, it is determined that the routing data frame provided by the data transceiver sub-unit is the latest routing data.
  • the pre-processing sub-unit determines that the routing data frame provided by the data transceiver sub-unit is the latest routing data frame, it further determines whether the terminal information is set in the link state packet of the latest routing data frame. If yes, the service information sub-unit is provided with service update information, where the service update information includes an original sender address of a link state message of the routed data frame and terminal information in the link state message.
  • the service information subunit receives the service update information provided by the preprocessing subunit, and updates the service information table in the following manner: each of the terminal information for the service update information Using the terminal address, look up the service record entry in the service information table that uses the terminal address as the use terminal address and the network extension device address is the original sender address in the service update information. If the service record entry cannot be found, Adding a service record entry to the service information table, the service terminal address of the newly added service record entry is the use terminal address, and the network extension device address of the newly added service record entry is the original transmission in the service update information.
  • the network sharing system wherein the network extension networking unit of the network extension device further includes a preprocessing subunit, the preprocessing subunit being connected to the route in the network extension networking unit a subunit and a data transceiving subunit, wherein the preprocessing subunit maintains a preprocessing table, wherein the preprocessing table includes a plurality of preprocessing record entries, and each preprocessing record entry records an original sender address and Corresponding relationship of the serial number, the pre-processing sub-unit maintains the pre-processing table based on the routing data frame received by the data transceiving sub-unit and determines whether the routing data frame is the latest routing data frame, first querying the original sending in the pre-processing table If the square address is the pre-processed record entry of the original sender address of the link state packet of the routing data frame, if the corresponding pre-processing record entry is not queried, it is determined that the routing data frame provided by the data transceiver sub-unit is the latest
  • the data is transmitted and received.
  • the routing data frame provided by the subunit is not the latest routing data frame, and the routing data frame is discarded.
  • the routing information maintenance module sends the link state message to the data each time the link state value of the link state message of the routing data frame is updated.
  • the transceiver unit, the data transceiver unit encapsulates the link state message into a routing data frame, and the received address of the encapsulated routing data frame is a broadcast address, and the sender address is an address of the data transceiver subunit, and the frame body Labeling data and the link status message.
  • the gateway list includes a plurality of gateway record entries, each gateway The record entry records the correspondence between the address of the network access device and the link state stability value.
  • the routing information maintenance module updates the gateway list at the same time as follows: First, it is determined whether a gateway flag is set in the link state packet of the routing data frame. If the gateway list is not updated, the link state table is used to query the original link state packet whose destination address is the routing data frame.
  • a link state record entry of the sender address selecting a link state record entry with the highest link state stability value in the link state record entry, and connecting the link with the highest link state stability value
  • the destination address and link state stability values in the status record entry are respectively used as the destination address and link state in the gateway update information. And then querying, in the gateway list, a gateway record entry whose network access device address is the destination address in the gateway update information, and if the gateway record entry can be found, the link state in the gateway record entry is The stable value is updated to the link state stable value in the gateway update information. If the gateway record entry cannot be found, a gateway record entry is added to the gateway list, and a network of the newly added gateway record entry is added.
  • the access device address and the link state stable value are respectively the destination address and the link state stable value in the gateway update information; the routing information maintenance module of the network extension device receives the data transceiver subunit sent from the network extension device After the gateway query request, the gateway record entry with the highest link state stability value is searched in the gateway list, and the network access device address in the found gateway record entry is sent as the gateway query response to the data transceiver. Subunit.
  • the network sharing system wherein the network access wireless service unit and the network extension wireless service unit both include an IP address allocation subunit and a client access subunit, and the client access sub
  • the unit provides a wireless network service for the use terminal in the coverage area, and the IP address assignment sub-unit allocates a unique IP address in the entire network sharing system to the use terminal in the wireless network provided by the access client access sub-unit.
  • the latest receiving time of the routing data frame is also recorded in each preprocessing record entry of the preprocessing table, and each receiving record entry in the receiving table is The latest receiving time of the routing data frame is also recorded, the routing information maintenance module includes a timing update subunit, and the timing update subunit periodically traverses the preprocessing table according to a certain time interval, for the preprocessing table Each pre-processing record entry determines whether the difference between the latest receiving time and the current time exceeds the first threshold.
  • the link state table and the route allocation table simultaneously delete the corresponding entry whose destination address is the original sender address in the preprocess record entry, and delete the network extension device address in the service information table as the original send in the preprocess record entry.
  • the table determines whether the difference between the latest receiving time and the current time exceeds the second threshold for each of the receiving record entries in the receiving table, and if so, deletes the corresponding receiving record entry in the receiving table, and sets The destination address of the deleted record entry is dest_mac, and the candidate route address is cand_mac. After deleting the receive record entry, delete the entry with the destination address dest_mac and the candidate route address cand_mac in the link state table.
  • the entry whose destination address is dest_mac is recorded as a dynamic update entry set, and the dynamic update entry is dynamically added.
  • the entry with the highest link state stability value is selected as the route update information, and the route allocation table is updated based on the route update information.
  • a network sharing method based on the network sharing system of the present invention comprising the following network sharing process:
  • the data packet from the user terminal is transmitted to the network access device through the network access wireless service unit of the network access device.
  • the unit is sent to the Internet via the data analysis unit;
  • the data analysis unit of the network access device receives the data packet, and determines whether the data packet is sent to a use terminal within the coverage of the network access device, and if so, Transmitting, by the network access wireless service unit of the network access device, the data packet to the use terminal; if the data analysis unit sends the data packet to the data transceiver subunit of the network access device,
  • the data transceiver subunit When receiving the data packet, the data transceiver subunit first sends a service query request to the service information subunit of the network access device, where the service query request includes a receiving terminal address of the data packet, and the service information subunit Querying, in the service information table maintained by the service record entry, the same service record entry as the receiving terminal address, and sending the network extension device address in the found service record entry as the service query response to the data Transceiver subunit, the data transceiver subunit sends the service query response to the routing subunit of the network access device Requested by the query, the route query request includes a network
  • the frame body includes a payload data tag, a final receiving device address, and the data packet, wherein a final receiving device address in a frame body of the payload data frame is a network extension device address in the service query response;
  • the data transceiver subunit of the network access device when the data transceiver subunit of the network access device receives the load data frame sent by the other network device, the data transceiver subunit extracts the final receiving device address in the frame body of the received load data frame, And determining whether the final receiving device address is the address of the network access device, and if yes, extracting the data packet in the frame body of the load data frame and sending the data packet to the data analyzing unit of the network access device, and the data analyzing unit Sending the data packet to the Internet, if the final receiving device address is not the address of the network access device, the data transceiver sub-unit first sends a routing query request to the routing sub-unit of the network access device.
  • the routing query request includes the final receiving device address, and the routing sub-unit searches in the routing allocation table maintained by the routing sub-unit to find an allocation record entry whose destination address is the same as the final receiving device address in the routing query request, and finds the The candidate allocation routing address in the allocation record entry is sent as a route query response to the location
  • the data transceiver unit, the data transceiver unit constructs and transmits a load data frame according to the route query response, and the receiver address of the constructed load data frame is a candidate allocation route address in the route query response, and the constructed load data frame is configured.
  • the sender address is an address of the data transceiving subunit, and the frame body of the constructed payload data frame includes a payload data tag, the final receiving device address, and the data packet;
  • the data packet from the user terminal is transmitted to the data transceiver unit of the network expansion device by the network extension wireless service unit of the network expansion device.
  • the data transceiver sub-unit sends a gateway query request to the routing sub-unit of the network extension device, and the routing sub-unit searches for the link state in the gateway list maintained by the gateway sub-unit after receiving the gateway query request.
  • the gateway record entry with the highest stability value, and the network access device address in the found gateway record entry is sent to the data transceiver sub-unit as a gateway query response, and the data transceiver sub-unit receives the gateway After the query response, the routing sub-unit sends a routing query request to the routing sub-unit of the network expansion device, where the routing query request includes the network access device address in the gateway query response, and the routing sub-unit searches in the routing allocation table maintained by the routing sub-unit The allocation record entry with the same destination address as the network access device address in the route query request And sending the candidate allocation routing address in the found allocation record entry to the data transceiver sub-unit as a route query response, where the data transceiver sub-unit constructs and transmits the load data frame according to the gateway query response and the route query response,
  • the receiver address of the constructed load data frame is a candidate allocation route address in the route query response
  • the sender address of the constructed load data frame is the address of the data transceiver subunit, and the frame body of
  • the data transceiver subunit When the data transceiver unit of the network extension device receives the load data frame sent by the other network device, the data transceiver subunit extracts the final receiving device address in the frame body of the received load data frame, and determines Whether the final receiving device address is the address of the network expansion device, and if yes, extracting the data packet in the frame body of the load data frame and transmitting the data packet to the network extension wireless service unit of the network expansion device, and expanding the wireless service unit through the network Sending the data packet to the use terminal in the coverage of the network expansion device; if the final receiving device address is not the address of the network expansion device, the data transceiver sub-unit first routes to the network expansion device The unit sends a route query request, the route query request includes the final receiving device address, and the routing sub-unit searches in the route allocation table maintained by the routing sub-unit to find an allocation record table whose destination address is the same as the final receiving device address in the route query request.
  • the routing query response is sent to the data transceiver sub-unit, and the data transceiver sub-unit constructs and transmits a load data frame according to the route query response, and the receiver address of the constructed load data frame is a candidate allocation route address in the route query response.
  • the sender address of the constructed payload data frame is the address of the data transceiving subunit, and the frame body of the constructed payload data frame includes a payload data tag, the final receiving device address, and the data packet.
  • the network sharing system proposed by the present invention comprises a plurality of network access devices and network expansion devices, and the network access device and the network expansion device both provide wireless network services, and expand the coverage of the wireless network.
  • the network access device in the network sharing system proposed by the present invention needs to be connected to the Internet, and the network expansion device does not need to be connected to the Internet, thereby reducing the wireless network deployment cost.
  • the network sharing system proposed by the present invention includes a plurality of network access devices, each of which is connected to the Internet as a network outlet, and the network expansion device in the present invention automatically selects an optimal one according to actual changes.
  • the network access device ensures that the intelligent terminal has sufficient bandwidth when accessing the Internet.
  • FIG. 1 is a block diagram showing the overall structure of a network access device in a network sharing system according to the present invention
  • FIG. 2 is a structural block diagram of a wireless service unit of a network access device in the network sharing system according to the present invention
  • FIG. 3 is a structural block diagram of a networking unit of a network access device in the network sharing system according to the present invention.
  • FIG. 4 is a structural block diagram of a routing subunit of a networking unit of a network access device in the network sharing system according to the present invention
  • FIG. 5 is a structural block diagram of a routing information maintenance module of a routing subunit of a networking unit of a network access device in the network sharing system according to the present invention
  • FIG. 6 is a block diagram showing the overall structure of a network expansion device in the network sharing system according to the present invention.
  • FIG. 7 is a structural block diagram of a wireless service unit of a network extension device in a network sharing system according to the present invention.
  • FIG. 8 is a structural block diagram of a networking unit of a network expansion device in the network sharing system according to the present invention.
  • FIG. 9 is a structural block diagram of a routing subunit of a networking unit of a network extension device in the network sharing system according to the present invention.
  • FIG. 10 is a structural block diagram of a routing information maintenance module of a routing subunit of a networking unit of a network extension device in the network sharing system according to the present invention
  • FIG. 11 is a schematic diagram of relative positions of network devices in a specific embodiment of the present invention.
  • FIG. 12 is a schematic diagram of a process of maintaining a queue in a specific embodiment of the present invention.
  • FIG. 13 is a schematic diagram of a process of maintaining a receive queue according to an embodiment of the present invention.
  • FIG. 14 is a schematic diagram of a maintenance process of a mean queue in a specific embodiment of the present invention.
  • Adjacent one-hop device This device (which can be any network access device or any network expansion device in the network sharing system), other devices within a certain distance (can be the network access in the network sharing system)
  • the device or the network expansion device is an adjacent one-hop device of the device, and the condition that the certain distance range needs to be satisfied is that the data sent by the device can be directly received by the adjacent one-hop device of the device without being forwarded by other devices, and simultaneously The data sent by the adjacent one-hop device of the device can be directly received by the device without being forwarded by other devices; within a certain distance range, there may be multiple adjacent one-hop devices of the device.
  • Link state message Each device (including the network access device and the network expansion device) in the present invention is used to maintain routing information, including the original sender's MAC (Media Access Control) address, and transmission. a distance, a link state value, a sequence number, and a gateway tag/terminal information, wherein the original sender's MAC address represents a network element of a device that generates the link state message (a device that does not forward the link state message)
  • the MAC address of the data transceiver unit, the other device does not change the original MAC address of the link state message when forwarding the link state message generated by the device; the transmission distance indicates that the link state message is used by other devices.
  • the link state value indicates the link state between the device transmitting the link state message and the device corresponding to the original sender MAC address of the link state message, and the link state value is when routing is performed.
  • the serial number is specifically defined in each device of the present invention, each device generates a sequence number when generating a link state message, and the link state message is being Means for forwarding a process in which no change sequence number, each device generates a link status for each new packet sequence number in its original sequence number (The last generated sequence number of the link state message with the same original sender MAC address as the newly generated link state message) is incremented or decremented according to the fixed step size, and the preferred sequence number is incremented by 1.
  • the original sender MAC address in the link state message and the sequence number in the link state message can identify the unique link state message in the network sharing system; the gateway tag It is used to indicate whether the device can be directly connected to the Internet.
  • the link state message generated by the network access device sets the gateway tag, and the link state message generated by the network extension device does not set the gateway tag; the terminal information indicates the service of the network extension device.
  • the address information of the smart terminal, the terminal information may be the MAC address of each intelligent terminal served by the network expansion device, or the IP address of each intelligent terminal served by the network expansion device, preferably the MAC address of each intelligent terminal served by the network extension device
  • the network Expansion means for generating a link-state message including terminal information the network access device generates a link status message does not include terminal information.
  • 802.11 data frame A type of 802.11 frame. According to the 802.11 standard, 802.11 data frames are used to transmit load data. The structure of the 802.11 data frame is shown in Table 1, where the Address 1 field indicates the receiver MAC address and the Address 2 field indicates the sender. The MAC address, the Frame Body field is used to transmit the payload data, and the meanings and values of other fields in the 802.11 data frame are prior art, and are not the focus of the present invention, and detailed descriptions are not provided herein.
  • Routing data frame and load data frame According to the content included in the frame body of the 802.11 data frame, the 802.11 data frame is further divided into a routing data frame and a load data frame, that is, the routing data frame and the load data frame are both 802.11.
  • the structure of the data frame, the routing data frame, and the payload data frame are the same as those of the 802.11 data frame.
  • the difference between the routing data frame and the payload data frame is that the frame body includes different contents, and the frame body of the routing data frame (Frame)
  • the structure of the body is as shown in Table 2 below.
  • the frame body of the routing data frame includes a type tag (TypeLable) and a link state packet (LinkStatePacket).
  • the TypeLable field indicates a type tag to distinguish the routing data frame from the load data.
  • the frame, the LinkStatePacket field indicates the link state message transmitted by the routing data frame, and the link state message includes the original sender's MAC address, transmission distance, link state value, sequence number, and gateway tag as previously described. / terminal information.
  • the frame body structure of the payload data frame is as shown in Table 3 below.
  • the frame body of the payload data frame includes a type tag (TypeLable), a final receiving device's MAC address (EndMAC), and an IP packet (IPPackage).
  • the TypeLable field indicates a type tag for distinguishing the routing data frame from the load data frame
  • the EndMAC field indicates the MAC address of the device that finally receives the IP packet of the frame body of the payload data frame
  • the IPPackage field indicates the IP of the payload data frame transmission. data pack.
  • the network sharing system of the present invention includes a plurality of network access devices and a plurality of network expansion devices.
  • the network access devices are directly connected to the Internet, and each network access device can be Intelligent terminals in its coverage provide wireless network services, and network access devices cover the range.
  • the IP data packet sent by the smart terminal to the Internet is directly sent to the Internet through the network access device for providing the wireless network service, and the IP data packet from the Internet for the purpose of the smart terminal served by the network access device passes the
  • the network access device sends the corresponding smart terminal, that is to say, the intelligent terminal within the coverage of each network access device communicates directly with the Internet through the network access device.
  • the network expansion device and the network access device form a wireless self-organizing network, and the network expansion device is connected to the network access device through the wireless self-organizing network, and then indirectly connected to the Internet via the network access device, that is, the network expansion device cannot directly
  • indirect communication with the Internet is required by means of network access devices, and each network expansion device can provide wireless network services for intelligent terminals within its coverage, different network expansion devices and different network accesses. Communication between the devices and between the network expansion device and the network expansion device is possible. For an IP packet sent from the smart terminal within the coverage of a network extension device to the Internet, the network extension device will select a network access device as the final data receiving device, and finally pass the selected network access device.
  • Sending an IP data packet to the Internet, and the network extension device may directly send an IP data packet to the network access device as the final data receiving device according to the optimal path selected in the network transmission.
  • the network access device sends an IP data packet, and may also send the IP data packet to the network access device after undergoing one or more other network expansion devices or network access devices (multi-hop mode);
  • For an IP data packet from the Internet for the purpose of an intelligent terminal within the coverage of a network extension device the IP data packet is first received by the network access device, and then the network access device will provide the smart terminal with a network extension device of a wireless network service as a final data receiving device, and in the network extension to the final data receiving device
  • the network access device may directly send the IP data packet to the network expansion device as the final data receiving device according to the selected optimal path in the network transmission, or may experience a Or the other network extension device or the network access device sends the IP data packet to the network access device as the final data receiving device, and finally the network expansion device as the
  • the main innovation of the present invention lies in selecting an optimal communication path between the intelligent terminal serving the network expansion device and the Internet, including selecting an optimal data communication path between the network expansion device and the network access device, such as a network expansion device. Selecting an optimal network access device, and transmitting the IP data packet sent by the intelligent terminal service provided by the network extension device to the Internet to the optimal network access device selected by the network expansion device through the optimal selection path, by selecting the most
  • the network access device sends the IP data packet directly to the Internet; the network access device sends the IP data packet from the Internet and the smart terminal served by the network expansion device to the network expansion device through the optimal selection path.
  • the network extension device sends the above IP data packet to the corresponding intelligent terminal, so that the smart terminal can access the Internet by accessing the wireless network provided by the network expansion device.
  • a network expansion device or a network access device selects another network expansion device or other network access device to transmit data, which is a multi-hop data transmission process, and a selected network expansion device or network access device is selected.
  • One of the jumps in a multi-hop is in a multi-hop.
  • Each device on the multi-hop data transmission path (which may be a network access device or a network expansion device) in the present invention is in the adjacent one-hop device of the device as the final data receiving device (if the transmitted IP data)
  • the IP data packet sent by the intelligent terminal serving the network expansion device to the Internet is the network access device.
  • the transmitted IP data packet is an intelligent terminal transmitted from the Internet and served by the network expansion device
  • the destination IP data packet, the final data receiving device is a network expansion device that provides wireless network service to the smart terminal), selects an optimal adjacent one hop device for the destination device, and sends the data to the selected most The optimal adjacent one-hop device, the optimal adjacent one-hop device of the device, after receiving the IP data packet, if it is not the final data receiving device, the optimal adjacent one-hop device of the device Selecting its optimal adjacent hop device in a similar manner, and then the above number
  • the data is transmitted to the final data receiving device in a multi-hop manner according to the optimal adjacent one-hop device of the optimal adjacent one-hop device of the device selected to be selected by the device for the final data receiving device.
  • Each network access device and each network extension device in the present invention maintains information required by the device to select its optimal neighboring one-hop device based on the link state message.
  • the network sharing according to the present invention
  • Each network access device and each network extension device in the system periodically generate link state messages and send them out in a broadcast manner, and the link states generated by each network access device and each network extension device
  • the original sender MAC address of the message is the MAC address of the data transceiver subunit of the networking unit of the device that generates the link state message, and the link status report generated by each network access device and each network extension device
  • the link state value of the text is the maximum value.
  • the other device After receiving the link state message generated by the device, the other device updates the link state value of the link state packet and broadcasts the qualified link state packet in the form of a broadcast. Forward it out.
  • the device receives the link state message generated by the other device (not the device) by the adjacent one hop device of the device, and if the device uses the device corresponding to the original sender MAC address of the link state message as the destination device And selecting an optimal adjacent one hop device from the adjacent one hop devices of the device as a next hop device when the device transmits the data to the final data receiving device by using the destination device, and selecting the optimal adjacent one
  • the basis of the hop device is the link status value.
  • the network access device of the network sharing system of the present invention includes an ARP unit 11, a gateway unit 12, a data unit 13, a networking unit 14, and a wireless service unit 15.
  • the ARP unit 11 maintains the correspondence between the IP address and the MAC address according to the well-known ARP (Address Resolution Protocol), and the ARP unit 11 accesses the data of the sub-unit 21 and the networking unit 14 via the client of the wireless service unit 15.
  • the sub-unit 31 sends and receives an ARP packet (not shown) for maintaining the corresponding relationship between the IP address and the MAC address, which is a well-known address resolution process in the art, and is not described in detail herein; the ARP unit 11 receives the sending self-group.
  • the query information of the network unit 14 includes the IP address, and the ARP unit 11 sends the query response information to the networking unit 14, and the query response information includes a MAC address corresponding to the IP address in the query information.
  • the gateway unit 12 receives the IP data packet sent by the data unit 13, and the gateway unit 12 performs NAT processing on the IP data packet sent from the data unit 13 according to a well-known NAT (Network Address Translation) technology, and then sends the data packet to the Internet; the gateway unit 12: Receiving the IP data packet sent from the interconnection, the gateway unit 12 performs NAT processing on the IP data packet sent from the Internet according to a known NAT technology, and then sends the data packet to the data unit 13.
  • NAT Network Address Translation
  • the wireless service unit 15 includes a client access subunit 21 and an IP address assignment subunit 22, and the client access subunit 21 operates in an AP (Access Point) mode according to the 802.11 standard.
  • the client access sub-unit 21 sends the IP data packet of the Internet access sent by the smart terminal served by the client access sub-unit 21 to the data unit 13, and the client access sub-unit 21
  • the client access subunit 21 receives the IP data packet sent by the smart terminal served by the client access subunit 21, the client access subunit 21 extracts the destination IP address of the IP data packet, and determines the IP data packet according to the destination IP address of the IP data packet.
  • the IP data packet is sent to the data unit 13, and the data unit 13 receives the above-mentioned transmission from the client terminal.
  • the IP data packet is sent to the gateway unit 12, and the IP data packet is sent to the Internet through the gateway unit, and is determined according to the destination IP address of the IP data packet.
  • the IP data packet is sent to the IP address served by the client access subunit 21 of the network access device to the IP of other devices (the network expansion device, the network access device, and the intelligent terminal it serves) in the network sharing system.
  • the client access subunit 21 receives the IP data packet sent by the data unit 13, and sends the IP data packet to the smart terminal served by the corresponding client access subunit 21 according to the destination IP address of the IP data packet.
  • the intelligent terminal provided by the system (including the wireless network provided by the network access device and the wireless network provided by the network expansion device) allocates a unique IP address in the network sharing system, so the wireless service unit 15 of the network access device includes The IP address allocation sub-unit 22 allocates an IP address to the intelligent terminal in the wireless network provided by the access client access sub-unit 21, and the wireless service unit 62 of the network extension device also includes an IP address allocation sub-unit. 72.
  • the IP address assignment sub-unit 22 of the network access device and the IP address assignment sub-unit 72 of the network extension device assign an IP address to the smart terminal in the corresponding service network according to the same rule. Specifically, the IP address allocation subunit 22 of the network access device and the IP address allocation subunit 72 of the network extension device all allocate IP addresses to the smart terminal based on the MAC address of the smart terminal, and the MAC addresses of different smart terminals are different.
  • An algorithm based on superior performance can calculate different IP addresses for different MAC addresses, so that access to the wireless network provided by the network sharing system (including the wireless network provided by the network access device and the wireless network provided by the network expansion device) The IP addresses of all intelligent terminals are different, so that the smart terminals accessing the network sharing system will not conflict due to duplicate IP addresses.
  • the data unit 13 receives the IP data packet transmitted from the client access subunit 21 of the wireless service unit 15, and according to the foregoing, the IP data packet is the intelligent terminal served by the client access subunit 21 of the network access device.
  • the data unit 13 transmits the IP packet to the gateway unit 12, and the IP packet is sent to the Internet through the gateway unit 12.
  • the IP data packet For IP data packets from the Internet, the IP data packet reaches the data unit via the gateway unit, and after receiving the IP data packet from the gateway unit 12, the data unit 13 extracts the destination IP address of the IP data packet, and the data unit 13 records The IP address of each intelligent terminal served by the client access subunit 21 of the network access device, the data unit 13 determines whether the destination IP address of the IP data packet sent from the gateway unit 12 is the network access device.
  • the client of the wireless service unit 15 accesses the IP address of any intelligent terminal served by the subunit 21, and if the destination IP address of the IP packet is the client access subunit of the wireless service unit 15 of the network access device 21 IP address of any intelligent terminal serving, indicating that the IP data packet is a data packet communicated between the smart terminal served by the client access subunit 21 of the wireless service unit 15 of the network access device and the Internet,
  • the data unit sends the IP data packet to the client access subunit 21 of the wireless service unit 15, and the client access subunit 21 sends the IP data packet to its service.
  • the corresponding intelligent terminal if the destination IP address is not the IP address of any intelligent terminal served by the client access subunit 21 of the wireless service unit 15 of the network access device, the IP packet is the network.
  • the data unit sends the IP data packet to the networking unit 14, and the network unit
  • the IP data packet is packaged into the payload data frame described in the invention and transmitted in the network sharing system.
  • the data unit 13 also receives the IP data packets sent from the networking unit 14 and sends them over the gateway unit 12 to the Internet.
  • the network sharing system of the present invention finally communicates with the Internet through the network access device, and the network access device finally implements data communication (IP data packet) with the Internet through the gateway unit and the data unit therein.
  • the networking unit includes a data transceiving subunit 31, a service information subunit 34, a routing subunit 32, and a preprocessing subunit.
  • the data transceiving subunit 31 of the networking unit 14 operates in the Ad-Hoc mode according to the 802.11 standard, and the data transceiving subunit 31 of the networking unit 14 receives the transmission from the data unit 13.
  • IP data packet the IP data packet is a data packet communicated between the smart terminal served by another device (not the network access device) and the Internet, and the networking unit 14 needs to send the IP data packet to the IP data packet.
  • the networking unit 14 first needs to determine which network extension device provides the wireless network service for the smart terminal corresponding to the destination IP address of the IP data packet, and thus the networking unit 14 includes the service information sub-unit 34.
  • the service information sub-unit 34 maintains the correspondence between the network extension device and the intelligent terminal served by the network extension device, and the networking unit 14 provides the wireless network corresponding to the smart terminal corresponding to the destination IP address of the IP packet by the service information sub-unit 34.
  • the device for the network expansion device needs to select an optimal adjacent hop device as the next hop in the adjacent one hop device of the network access device, and the IP data is used.
  • the packet is encapsulated into a payload data frame and sent to the selected optimal next hop device.
  • the networking unit further receives a load data frame and a routing data frame sent by other network access devices or network expansion devices in the network sharing system, and the load data frame is configured by using the network access device as a final data receiving device.
  • the networking unit extracts the IP data packet in the load data frame and sends it to the data unit 13, and sends the IP data packet to the Internet by the data unit, for the load data frame with the network access device as the intermediate one hop,
  • the networking unit sends the load data frame to the next hop device (without the data unit) after being re-packaged.
  • the networking unit sends and receives routing data frames (without data units), and maintains routing information based on the routing data frame as the basis for the optimal communication path selection by the network access device, so the networking unit 14 includes the The routing sub-unit 32 maintains the optimal next hop information of the device by using the routing sub-unit 32.
  • the units included in the networking unit are specifically described below.
  • the data transceiving subunit 31 receives an IP data packet transmitted from the data unit 13, which is a data packet communicated between the intelligent terminal served by another device (not the network access device) and the Internet, and the data transceiving subunit 31 Extracting the destination IP address of the IP data packet, first sending an address query request to the ARP unit 11, the address query request includes the destination IP address of the IP data packet, and the ARP unit 11 sends an address query response to the data transceiver subunit 31, and the address query response The MAC address corresponding to the destination IP address in the above address query request is included.
  • the data transceiving sub-unit 31 sends a service query request to the service information sub-unit 34 according to the address query response (directly discarding the IP data packet if not queried), and the service query request includes the destination IP in the address query response.
  • the MAC address corresponding to the address (that is, the MAC address of the smart terminal corresponding to the destination IP address of the IP packet)
  • the service information sub-unit 34 sends a service query response to the data transceiver sub-unit 31 according to the service query request, and the service query response includes the above
  • the smart terminal corresponding to the MAC address in the service query request provides the MAC address of the network extension device of the wireless network service, and then the data transceiver sub-unit 31 sends a route query request to the routing sub-unit 32, the route query request includes the destination MAC address, and the route query is performed.
  • the destination MAC address in the request is the MAC address of the network extension device in the service query response, and the routing sub-unit 32 selects the optimal next hop device among the adjacent one-hop devices of the device according to the destination MAC address in the route query request. And transmitting, to the data transceiving subunit 31, the above-mentioned optimal next hop device.
  • the routing query response of the MAC address the data transceiving sub-unit 31 constructs and transmits the payload data frame according to the routing query response, so as to ensure that the IP data packet is transmitted to the intelligent terminal corresponding to the destination IP address according to the optimal communication path.
  • the receiver MAC address of the payload data frame constructed by the data transceiver sub-unit 31 is the MAC address of the optimal next hop in the route query response, and the sender of the payload data frame constructed by the data transceiver sub-unit 31
  • the MAC address is the MAC address of the data transceiving subunit 31 in the device
  • the frame body of the payload data frame constructed by the data transceiving subunit 31 is a payload data tag and the above IP data packet.
  • the frame body of the payload data frame constructed by the data transceiver subunit 31 may also preferably include the MAC address of the final receiving device, and the MAC address of the final receiving device is the destination IP address of the IP packet to the frame body of the payload data frame.
  • the smart terminal corresponding to the address provides the MAC address of the network extension device of the wireless network service (ie, the MAC address of the network extension device in the service query response), if the above data is received
  • the frame body of the load data frame constructed by the hair sub-unit 31 includes the MAC address of the final receiving device, and the other receiving device in the multi-hop path receives the current load data frame, and extracts the final receiving device in the frame body of the load data frame.
  • MAC address which can directly determine the network extension device that finally receives the IP data packet of the frame body of the payload data frame; if the frame body of the payload data frame constructed by the data transceiver sub-unit 31 does not include the MAC address of the final receiving device, Other devices on the multi-hop path also need to maintain the correspondence between the network expansion device and the intelligent terminal served by the network extension device. After receiving the load data frame, the other device on the multi-hop path extracts the frame body of the load data frame.
  • the destination IP address of the IP data packet can be used to determine the MAC address of the intelligent terminal that receives the IP data packet in the frame body of the payload data frame by means of the ARP protocol, and then the intelligent terminal device served by the network expansion device and the network expansion device Corresponding relationship, determining the MAC address of the network extension device that finally receives the IP data packet in the frame body of the payload data frame ( MAC address of the device receiving the final).
  • the frame body of the load data frame constructed by the data transceiver subunit 31 includes the MAC address of the final receiving device, and the MAC address of the final receiving device is set to be the IP data packet of the frame body of the load data frame.
  • the intelligent terminal corresponding to the IP address provides the MAC address of the network extension device of the wireless network service (ie, the MAC address of the network extension device in the service query response), and the following describes the preferred embodiment of the present invention.
  • the data transceiver sub-unit 31 receives the 802.11 data frame sent from the network extension device or other network access device in the network sharing system, and the data transceiver sub-unit 31 receives the 802.11 data frame sent from the network extension device or other network access device. And extracting the type tag of the frame body of the received 802.11 data frame. If the type tag is a route data tag, indicating that the 802.11 data frame is a route data frame, sending the route data information to the pre-processing sub-unit 33, and routing the data information.
  • a sender MAC address of the received routing data frame ie, a MAC address of a neighboring one-hop device of the device that sends the routing data frame to the device
  • a link of the frame body of the received routing data frame a status message; if the type is marked as a payload data flag, indicating that the 802.11 data frame is a payload data frame, extracting a MAC address of a final receiving device in a frame body of the received payload data frame, if the final receiving device is The MAC address is the MAC address of the network access device, indicating the frame body of the received payload data frame.
  • the IP data packet is an IP data packet sent to the Internet by the intelligent terminal served by the network expansion device, and the network access device is the final device when the smart terminal transmits data to the Internet, and the data transceiver subunit 31 extracts the received Loading the IP data packet in the frame body of the data frame, and transmitting the IP data packet to the data unit 13, and the data unit 13 sends the IP data packet to the Internet via the gateway unit; if the received payload data frame is received
  • the MAC address of the final receiving device in the frame body is not the MAC address of the network access device, indicating that the network access device is only one of the hops of the multi-hop transmission path of the IP data packet in the frame body (ie, The optimal next hop device selected by the transmitting device of the payload data frame.
  • the device needs to forward the IP data packet in the frame body of the load data frame according to the optimal communication path determined by the device.
  • the data transceiving sub-unit 31 sends a routing query request to the routing sub-unit 32.
  • the routing query request includes a destination MAC address, and the destination MAC address in the routing query request is the foregoing receiving.
  • the MAC address of the final receiving device in the frame body of the load data frame selects the optimal next hop device in the adjacent one hop device of the device according to the destination MAC address in the routing query request and
  • the data transceiver sub-unit 31 sends a route query response including the MAC address of the optimal next hop device (the packet IP packet cannot be queried), and the data transceiver sub-unit 31 constructs a load data frame according to the route query response and transmits the data.
  • the receiver MAC address of the load data frame constructed by the subunit 31 is the MAC address of the optimal next hop in the route query response
  • the sender MAC address of the payload data frame constructed by the data transceiver subunit 31 is the data transceiver subunit 31.
  • the frame body of the payload data frame constructed by the data transceiver subunit 31 is a payload data flag, a MAC address of the final receiving device, and an IP data packet, and the frame body of the payload data frame constructed by the data transceiver subunit 31
  • the MAC address of the final receiving device is the MAC address of the final receiving device in the frame body of the received payload data frame
  • the IP data packet of the frame body of the payload data frame constructed by the data transceiver subunit 31 is the received The IP packet in the frame body of the payload data frame.
  • the last data transceiving sub-unit 31 sends the constructed payload data frame to the optimally selected next hop device according to its recipient MAC address.
  • the smart terminal itself and the Internet communicate with each other through the wireless service unit 15, the data unit 13, and the gateway unit 12.
  • the network access device receives the IP data packet sent from the Internet through the gateway unit and the data unit, and encapsulates the IP data packet structure into a load through the networking unit.
  • the data frame is sent to the network extension device where the intelligent terminal corresponding to the IP data packet destination address is located, and the network access device receives the load data frame sent by the other device, and passes the IP data packet in the load data frame to the data unit 13
  • gateway unit 12 is sent to the Internet.
  • the network access device generates a load data frame for transmitting an IP data packet sent from the Internet and for the smart terminal served by the network extension device to a network extension device for providing the wireless terminal service to the smart terminal, thereby
  • the input device sets the MAC address of the final receiving device in the frame body of the generated payload data frame to the MAC address of the network expansion device that provides the wireless network service for the smart terminal corresponding to the destination IP address of the IP data packet, the network expansion device or the like.
  • the network access device does not change the MAC address of the final receiving device in the frame body of the load data frame when forwarding the load data frame.
  • the networking unit of the network access device and the other network access devices and the network expansion device maintain the routing information for optimal communication path selection by sending and receiving routing data frames. The process of maintaining the routing information by the networking unit is described in detail below.
  • the original link state message generating module 42 of the routing subunit 32 periodically constructs the original link state message according to a certain time interval and sends it to the data transceiving subunit 31 of the device, and the data transceiving subunit.
  • the link state message (the link state packet not forwarded by other devices) configured by the original link state packet generating module 42 is used as the original chain.
  • the original sender MAC address of the original link state packet is the MAC address of the data transceiver subunit 31 of the device, and the link state value of the original link state packet is the maximum value, indicating the device.
  • the link state between the device corresponding to the destination device (the device corresponding to the original sender MAC address of the link state message, that is, the device) is the best; the sequence number of the original link state message is preferably in an incremental manner.
  • the set, that is, the sequence number in the newly generated link state message of the original link state message generating module 42 is on the original basis (the chain generated by the last original link state message generating module 42)
  • the sequence number of the route status message changes according to the fixed step size. More preferably, each time increases by 1 (but not limited to this, other step sizes can be added).
  • the serial number in the link status message is the set, that is, the sequence number in the newly generated link state message of the original link state message generating module 42 is on the original basis (the chain generated by the last original link state message generating module 42)
  • the sequence number of the route status message changes according to the fixed step size. More preferably, each time increases by 1 (but not limited to this, other step sizes can be added).
  • the device is a network access device, so the original link state message generating module 42 sets the gateway tag in the original link state message; the device is a network access device, so the above chain
  • the road status message does not include terminal information.
  • the adjacent one-hop device of the device receives the original link state message sent by the device, the adjacent one-hop device of the device calculates the link state between the device and the device, and then the adjacent device
  • the one-hop device updates the link state value in the original link state message sent by the device, and then forwards the updated updated link state message to the broadcast mode, and then, the adjacent two devices of the device
  • the hopping device receives, updates, and forwards the link state message forwarded by the adjacent one hop device of the device, and the adjacent two hop devices of the device recalculate the chain between the adjacent two hop devices of the device and the device.
  • the state of the path such that the multi-hop forwarding mode, the original link state message generated by the device is received by other devices, and other devices can calculate the link state with the device, and the other devices calculate The link state between the device and the device is used as the basis for selecting the optimal next hop when the device is the device of the device, and the device periodically transmits the original link state message to ensure that the other device calculates And real-time link between the state of the device.
  • the data transceiver subunit 31 receives the transmission self route
  • the original link state message of the original link state message generating module 42 of the subunit 32 and the original link state message are encapsulated into a routing data frame, and the receiving party MAC address of the routing data frame is the broadcast address FF.
  • the FF: FF: FF: FF: FF the sender MAC address of the routing data frame is the MAC address of the data transceiving subunit 31, and the frame body of the routing data frame is the routing data tag and the original link state message.
  • the data transceiver sub-unit 31 receives the routing data frame sent from other network expansion devices or other network access devices in the network sharing system, and extracts routing data information from the routing data frame, where the routing data information includes the routing data frame.
  • the link state message in the frame body and the sender MAC address of the route data frame that is, the MAC address of the adjacent one-hop device of the device that transmits the above-mentioned route data frame to the device).
  • the network access device periodically generates and transmits a link state message.
  • the network extension device also periodically generates and transmits a link state message, and each of the network sharing systems of the present invention
  • the network access device and each network expansion device periodically generate and send link state messages, and the link state messages may be transmitted through different multi-hop paths to be received by the device, and the device needs to ensure further processing.
  • the link state message is up-to-date, so the networking unit 14 includes a pre-processing sub-unit 33.
  • the pre-processing sub-unit 33 determines whether the routing data information sent from the data transceiving sub-unit 31 is up-to-date by the maintenance pre-processing record table.
  • the entry of the pre-processing record table includes the original sender MAC address, the sequence number, and the latest receiving time.
  • the pre-processing sub-unit 33 receives the routing data information sent from the data transceiving sub-unit 31, and the routing data information includes the link status message. Extracting the MAC address of the adjacent one-hop device of the device that sends the link state message to the device, and extracts the link shape in the routing data information. The original sender MAC address in the packet and the sequence number in the link state packet of the routing data information, and determine whether the original sender MAC address is the link state packet in the routing data information in the preprocessing record table.
  • the original sender MAC address is the original sender MAC of the link state packet in the routing data information
  • the serial number of the newly added record is the sequence number of the link state packet in the routing data information, and the new record is added.
  • the latest receiving time is the current system time; if the foregoing entry exists in the preprocessing record table, the relationship between the serial number of the entry and the serial number of the link state message in the routing data information is further compared, if The sequence number of the entry is greater than or equal to the sequence number of the link state packet in the routing data information, indicating that the link state packet is not up to date. The routing information is discarded, and the pre-processing process ends. If the sequence number of the entry is smaller than the sequence number of the link state packet in the routing data, the link state packet is the latest because the foregoing is as described above.
  • the sequence number of the above entry is updated to the sequence number of the link state message in the routing data information and the latest entry of the entry is The process of the pre-processing sub-unit 33 maintaining the pre-processing record table according to the routing data information is as described above, and the pre-processing sub-unit 33 only needs to determine that the link status message in the routing data information is the latest ( That is, if a new entry or an entry update operation is performed on the preprocessed record table, it is further determined whether the link state message in the route data information is set with a gateway flag, and if the link state in the route data information is The gateway flag is set to indicate that the link state message in the routing data information is originally generated by the network access device, and the The routing data information is sent to the routing information maintenance module 41 of the routing sub-unit 32; if the link status message in the routing data information is not provided with a gateway marking, the link status message in the routing data information is a network expansion device.
  • the link state message generated by the network extension device includes terminal information, preferably The terminal information is the MAC address of each intelligent terminal served by the network extension device, and the service update information sent by the pre-processing sub-unit 33 to the service information sub-unit 34 is the original sender MAC address of the link state message in the routing data information. And the terminal information in the link state message in the routing data information. In this way, the original sender MAC address, the sequence number in the link state message, and the latest receiving time in all the latest link state messages sent by other devices received by the device are recorded by the pre-processing sub-unit 33.
  • the pre-processing sub-unit 33 sends the routing data information including the latest link state message to the routing information maintenance module 41 of the routing sub-unit 32, and according to these latest link state messages.
  • the service information sub-unit 34 transmits the latest service update information.
  • the service information sub-unit 34 records the correspondence between the network extension device and the intelligent terminal served by the network extension device through the maintenance service information table.
  • the entry of the service information table includes the MAC address of the network extension device and the MAC address of the intelligent terminal served by the service extension table.
  • a network extension device MAC address and an intelligent terminal MAC address form an entry of the service information table, and a network extension device may serve more than one intelligent terminal, so the MAC address of the same network extension device may correspond in the service information table. Items.
  • the service information sub-unit 34 After receiving the service update information sent from the pre-processing sub-unit 33, the service information sub-unit 34 searches for the network extension device MAC address in the service information table for each smart terminal MAC address in the terminal information in the service update information.
  • the original sender MAC address in the service update information and the smart terminal MAC address is an entry of the smart terminal MAC address in the terminal information in the service update information. If the entry cannot be found in the service information table, the service is in the service. A new record is added to the information table, and the MAC address of the newly added network extension device is the original sender MAC address in the service update information, and the newly recorded intelligent terminal MAC address is the terminal information in the service update information.
  • Such a service information table can dynamically record the correspondence between the network expansion device and the intelligent terminals of its services.
  • the service information sub-unit 34 receives the service query request sent from the data transceiving sub-unit 31, the service query request includes the MAC address of the smart terminal, and the service information sub-unit 34 searches the service information table for the MAC address of the smart terminal as the service query request.
  • the communication process is abandoned. If the entry of the MAC address of the smart terminal cannot be found, the communication process is abandoned. If the entry is found, the service query response is sent to the data transceiver sub-unit 31, and the service query response includes the above.
  • the MAC address of the network extension device in the lookup entry ie, the MAC address of the network extension device that provides the wireless network service for the smart terminal corresponding to the MAC address in the service query request).
  • the routing information maintenance module 41 receives and processes the routing data information transmitted from the preprocessing subunit 33, and the routing data information includes a link state message and the local device that transmits the link state message to the device.
  • the MAC address of the adjacent one-hop device the routing information maintenance module 41 extracts the link state message in the routing data information, and the routing information maintenance module 41 determines whether the link state message needs to be forwarded.
  • the link state message constructs the forwarded link state message and sends it to the data transceiving subunit 31.
  • the routing information maintenance module 41 receives the route query request sent from the data transceiving subunit 31, and the routing information maintenance module 41 sends a request according to the route query.
  • the data transceiving subunit 31 transmits a routing query response.
  • the routing information maintenance module 41 which is an important invention of the present invention, is mainly used for processing link state messages sent from other devices (including link state messages generated by other devices and link state messages forwarded by other devices).
  • the routing information maintenance module 41 calculates the link status between the device and other devices by processing the link state message.
  • the routing information maintenance module 41 includes a link state calculation sub-module 51, a routing table sub-module 52, and a forwarding sub-module 53. The working process of each sub-module of the innovation of the present invention is described in detail below.
  • the link state calculation sub-module 51 calculates the link state value according to the link state message in the route data information sent from the pre-processing sub-unit 33, and the link state between the adjacent one-hop device and the destination device of the device is used.
  • the link state value in the link state message is represented. Therefore, the device needs to calculate the link state between the device and the adjacent one hop device of the device, and the device and the device are relative to the device.
  • the link between the adjacent one-hop devices can be divided into a transmit link and a receive link.
  • the link state between the device and the adjacent one-hop device of the device refers to the above-mentioned transmit chain.
  • Link state of the road the probability that the data transmitted by the device is successfully received (directly or indirectly) by the adjacent one hop device of the device and is forwarded by the adjacent one hop device of the device and successfully received by the device again
  • the superimposed value of the transmission link state and the reception link state between the device and the adjacent one-hop device of the device is indicated.
  • the original link state message generated by the device sent by the device may be successfully received by the adjacent one hop device of the device and forwarded by the adjacent one hop device of the device, and the probability of being successfully received by the device is Indicates the superposition value of the transmission link state and the reception link state between the device and the adjacent one-hop device of the device, and may also use the link state message generated by other devices transmitted by the device to be adjacent to the device.
  • the transmission link state and the receiving link state between the device and the adjacent one-hop device of the device are successfully received by the one-hop device and forwarded by the adjacent one-hop device of the device and successfully received by the device.
  • the superimposed value Preferably, the original link state message generated by the device sent by the device is successfully received by the adjacent one hop device of the device and is forwarded by the adjacent one hop device of the device and is successfully received by the device.
  • the superimposed value of the transmission link state and the reception link state between the present device and the adjacent one-hop device of the device is shown. The preferred method described below is based on the description of the principles of the present invention.
  • the present invention uses the probability that the data transmitted by the adjacent one-hop device of the device is successfully received by the device to indicate the received value of the receiving link state between the device and the adjacent one-hop device of the device, and the specific value may be adopted.
  • a link state message sent by the adjacent one hop device of the device (including the link state message originally generated by the adjacent one hop device of the device and the original link generated by the other device forwarded by the adjacent one hop device of the device)
  • the status message is successfully received by the device to indicate the received value of the receiving link state between the device and the adjacent one-hop device of the device, preferably by using the adjacent one-hop device of the device.
  • the probability that the link state message originally generated by the device is successfully received by the device indicates the received value of the receiving link state between the device and the adjacent one hop device of the device. Since the state of the transmission link between the device and the adjacent one-hop device of the device cannot be directly calculated, the present invention adopts an indirect calculation method. First, the present invention calculates the data transmitted by the device (preferably the original chain originally generated by the device) The status message is a superposition probability that is successfully received by the adjacent one-hop device of the device and is forwarded by the adjacent one-hop device of the device and successfully received by the device, to indicate that the device is adjacent to the device.
  • the successful transmission probability (P 1 *P 2 )/P 2 ' of the device successfully received by the adjacent one-hop device of the device is obtained, wherein the present invention "*" indicates the product, and "/" indicates the division.
  • This successful transmission probability can reflect the status of the transmission link between the device and the adjacent one-hop device of the device.
  • the adjacent one-hop device with a high probability of successful transmission will As a preferred next hop device when the device transmits data, an innovative implementation of this principle process is specifically described below, but the present invention is not limited to this transmission and reception probability calculation method.
  • the link state calculation sub-module 51 maintains a first binding table, where the first binding table is used to record the correspondence between the superposition values, and the entries of the first binding table include the candidate routing MAC address and the superimposed value.
  • Each The records maintain an overlay queue.
  • the length of the stack queue corresponding to each record in the first binding table is the same.
  • the sequence number of the link state message is stored in the overlay queue. Preferably, the number and superposition of the sequence numbers in the overlay queue are superimposed.
  • the ratio of the queue length is the superposition probability that the data transmitted by the device is successfully received by the adjacent one-hop device of the device and is forwarded by the adjacent one-hop device of the device and successfully received by the device, and the number of serial numbers in the superposition queue is The ratio of the length of the superimposed queue is the superimposed value of the corresponding entry.
  • the sequence number of the superimposed queue corresponding to each entry in the first binding table is moved in and out, and the elements in the superimposed queue are moved in and out of the superimposed queue. The principle of first in, first out.
  • the link state calculation sub-module 51 maintains a second binding table, where the second binding table is used to record the correspondence between the received values, and the entries of the second binding table include a destination MAC address, a candidate routing MAC address, a received value, and
  • the latest receiving time maintains one receiving queue for each record in the table, and the length of the receiving queue corresponding to each record in the second binding table is the same, and the preferred receiving queue has the same length as the overlapping queue.
  • the sequence number of the link state message is stored in the receiving queue, and the ratio of the number of the sequence number in the receiving queue to the length of the receiving queue is preferably received as the probability that the data sent by the adjacent one-hop device of the device is successfully received by the device.
  • the ratio of the number of the sequence number in the queue to the length of the receiving queue is the received value of the corresponding entry.
  • the sequence number of the receiving queue corresponding to the entry with the same destination MAC address in the second binding table is synchronized and removed.
  • the elements in the queue are moved in and out of the overlay queue on a first-in, first-out basis.
  • the link state calculation sub-module 51 receives the routing data information sent from the pre-processing sub-unit 33, and the routing data information includes a link state message and an adjacent one-hop device of the device that transmits the link state message to the device.
  • the MAC address the link state calculation sub-module 51 extracts the link state message in the routing data information, and if the original sender MAC address of the link state message is the MAC address of the data transceiver sub-unit 31 of the device, indicating
  • the link state message is generated by the device and the link state message is successfully received (directly or indirectly) by the adjacent one hop device of the device, and then forwarded by the adjacent one hop device and successfully received by the device. Then update the first binding table.
  • the link state calculation sub-module 51 searches the first binding table for the entry of the MAC address of the neighboring one-hop device of the device in the routing data information, if the candidate routing MAC address is not in the first binding. If the above entry is found in the table, a record is added to the first binding table, and the candidate route MAC address of the newly added record is the MAC address of the adjacent one-hop device of the device in the routing data information, new After the record is added, the process of updating the superimposed value of the following items is performed; if the above item is found in the first binding table, the process of updating the superimposed value of the following items is directly performed: corresponding to each item in the first binding table
  • the maximum value of the sequence number in the superimposition queue is a
  • the sequence number of the link state message in the routing data information received by the link state calculation sub-module 51 is b, (b must be greater than a because of the link state.
  • the routing data frame in the routing data information received by the calculation sub-module 51 is necessarily newly generated.
  • the sequence number in the link state message is incremented by 1 on the original basis (including 0). If b is less than or equal to a, Pre-processing sub-unit 33 will The routing data information is discarded, and the routing data information does not reach the link state calculation sub-module 51), and the candidate routing MAC address in the first binding table is the MAC address of the adjacent one-hop device of the device in the routing data information.
  • the entry of the entry is the overlay entry, and the (ba) empty elements are sequentially stored in the superposition queue of the other entries except the superimposed entry in the first binding table, and sequentially to the superposition queue of the superimposed entry.
  • the (ba-1) empty element and the serial number b are stored, and the superimposed value of each item in the first binding table is calculated, and the superimposed value is a ratio of the number of the serial number in the corresponding superimposed queue to the length of the superimposed queue, so that The serial number or the empty element is stored in the superposition queue corresponding to the entry in the first binding table.
  • the superimposed value can dynamically represent the adjacent one of the device and the device. The probability of superposition of the transmit link state of the hop device and the receive link state. The technical principle is explained in detail here.
  • each entry in the first binding table records the correspondence between the candidate route MAC address and the superimposed value, and the update of the first binding table is limited to the receiving of the device.
  • the original sender MAC address of the link state message of the routing data frame in the routing data information is The MAC address of the data transceiving subunit 31 of the device, that is, the first binding table actually records that the original link state message generated by the device is received by the adjacent one hop device of the device and forwarded to the device.
  • the situation in which the path state message is forwarded by the adjacent one-hop device of the device is automatically updated by the link state calculation sub-module 51 in the first binding table because the original link state message sent by the device may be Received and forwarded back to the local device by multiple adjacent hop devices of the device, so that there may be multiple candidate routing MAC addresses in the first binding table, in order to select an optimal candidate route among the multiple candidate routing MAC addresses.
  • the present invention adds the serial number to the superposition queue corresponding to the superposition entry at the same time, and fills the superposition queue corresponding to other entries at the same time (avoids the superposition queue 1) Keeping the number of previous serial numbers unchanged, ensuring the same dynamic update process as the superimposed table entry, and filling in the candidate routing MAC in the entry corresponding to the superimposed queue with the most serial number in the predetermined time period.
  • the corresponding device should be the device that receives the original link state message sent by the device during the period and forwards the original link state message to the device the most, that is, the candidate route MAC address (additional).
  • the neighboring one-hop device of the device corresponding to the candidate route MAC address in the entry corresponding to the stacking queue with the largest sequence number is frequently communicated with the device in the period of time, and the communication link state between the devices is relatively frequent.
  • it can be used as a next hop device preferred by the device. Therefore, the above superimposed value can reflect the superposition probability of successfully transmitting communication and successfully receiving communication between the device and the adjacent one-hop device of the device.
  • the present invention introduces the concept of the above-mentioned superimposition queue.
  • the more the routing data information received by the link state calculation sub-module 51 for updating the first binding table in the predetermined time period the routing data is explained.
  • the superimposed queue is introduced, and the supplementary superimposition queue is used.
  • the ratio of the number of serial numbers to the length of the superimposed queue is taken as the probability, that is, the superimposed value, which can effectively reflect the transmission link state and the receiving link state between the device and each adjacent one-hop device of the device.
  • Superposition probability but the present invention is not limited to this probability calculation method, and other successful communication probability calculation methods may be employed, or the superposition may be performed. Column select other parameters for the normalized probability, etc., following the receive queue and the reception value considering the same principle.
  • the link state calculation sub-module 51 receives the routing data information sent from the pre-processing sub-unit 33, and the routing data information includes a link state message and an adjacent one-hop device of the device that transmits the link state message to the device.
  • the MAC address the link state calculation sub-module 51 extracts the link state message in the routing data information, if the original sender MAC address of the link state message is not the data transceiver sub-unit 31 in the network access device.
  • the link state calculation sub-module 51 searches the second binding table for the original sender MAC address of the link state packet whose destination MAC address is the routing data information, and the candidate routing MAC address is the original in the routing data information. If the entry of the MAC address of the neighboring device of the device cannot be found in the second binding table, a new record is added to the second binding table, and the destination MAC address of the newly added record is added.
  • the address is the original sender MAC address of the link state message in the routing data information
  • the candidate route MAC address of the newly added record is the MAC address of the adjacent one hop device of the device in the routing data information, after the new record is added.
  • the following process is performed to receive the value update process; if the above entry is found in the second binding table, the following table item receives the value update process directly: the destination MAC address in the second binding table is the routing data information.
  • the maximum value of the sequence number of the receiving queue corresponding to the entry of the original sender MAC address of the state message is m, and the sequence number of the link state message in the routing data information received by the link state calculating submodule 51 is n (n must be greater than m, if n is less than or equal to m, the pre-processing sub-unit 34 will discard the above-mentioned routing data information, the link state calculation sub-module 51 will not receive the above-mentioned routing data information), said in the second binding
  • the destination MAC address in the table is the original sender MAC address of the link state message in the routing data information
  • the candidate routing MAC address is the MAC address entry of the neighboring one hop device of the device in the routing data information.
  • the entry to the entry queue of the original sender MAC address of the link state packet in the routing data information in the second binding table is sequentially stored in the receiving queue of the entry other than the receiving entry. Entering (nm) empty elements, sequentially storing (nm-1) empty elements and sequence number n into the receiving queue of the receiving entry, and calculating and updating the destination MAC address in the second binding table as routing data information.
  • each entry records a correspondence between a destination MAC address, a candidate routing MAC address, a received value, and an latest receiving time, where the destination MAC address is the original transmission of the link state message in the routing data information.
  • the side MAC address that is, the device corresponding to the original sender MAC address of the link state message in the routing data information is used as the destination device of the device, and the candidate routing MAC address is the adjacent hop of the device in the routing data information.
  • the MAC address of the device that is, the device that will transmit the link state message (the link state message originally generated by the destination device) to the device, is the candidate next hop device for the device to transmit data to the destination device. Therefore, the second binding table actually records the communication status of the receiving link of the communication data transmitted by the apparatus receiving the adjacent one-hop device of the device.
  • all network access devices and all network extension devices in the network sharing system of the present invention periodically generate original link state messages and send them out in a broadcast manner, and each of the network sharing systems in the present invention
  • Each network access device and each network expansion device newly generate an original link state message, and its serial number will be incremented by 1 on the original basis, so that each newly generated original link state message of the other device is used by the device.
  • the situation in which the adjacent one-hop device is sent to the device is automatically updated by the link state calculation sub-module 51 in the second binding table.
  • the same destination MAC address in the second binding table may correspond to multiple candidate routing MAC addresses. In order to select an optimal candidate routing MAC address among the multiple candidate routing MAC addresses, the present invention is in the above update.
  • the sequence number is added to the receiving queue corresponding to the receiving entry, and the receiving queue corresponding to the other entry is added to the empty queue (the number of serial numbers before the receiving queue is kept unchanged) is avoided, and the receiving table is guaranteed.
  • the item is in the same dynamic update process), and the adjacent one-hop device of the device corresponding to the candidate routing MAC address in the entry corresponding to the receiving queue with the highest sequence number in the predetermined time period should be the time period
  • the device that sends the link state message the most times that is, the device receives the candidate route MAC address (the candidate route MAC in the entry corresponding to the receive queue with the largest sequence number)
  • the corresponding link state message sent by the adjacent one-hop device of the device is relatively frequent, so the received value can reflect the device corresponding to the candidate route MAC address.
  • the present invention introduces the concept of the receiving queue, as described above, the link state calculating sub-module within a predetermined time period.
  • the more the routing data information received by the device 51 for updating the second binding table, the adjacent one-hop device of the device corresponding to the MAC address of the adjacent one-hop device of the device in the routing data information and the device The more frequent the communication, and because each new routing data information includes a new serial number, the number of serial numbers updated within the predetermined time period can represent the above-mentioned communication frequency, so that the serial number is further
  • the number of updates is converted to a probability, the introduction
  • the receiving queue uses the ratio of the number of serial numbers in the receiving queue to the length of the receiving queue as the probability, that is, the received value, which can effectively reflect the relationship between the device and each adjacent one-hop device of the device. The probability of successful reception of the received link state.
  • the length of the superposition queue which is the basis of the probability normalization to be consistent with the length of the reception queue.
  • the link state calculation sub-module 51 receives the routing data information sent from the pre-processing sub-unit 33, and the routing data information includes a link state message and an adjacent one-hop device of the device that transmits the link state message to the device.
  • the MAC address the link state calculation sub-module 51 extracts the link state message in the routing data information, and if the original sender MAC address of the link state message is not the MAC address of the data transceiver sub-unit 31 of the device, It is indicated that the link state message is a device (other than the device, including the adjacent one hop device of the device, and the other device can be used as the destination device of the device) and passes through the adjacent hop of the device.
  • the link state calculation sub-module 51 further needs to update the link status report in the routing data information.
  • the link state value of the text (generated by other devices) and the updated link state message is sent to the forwarding sub-module 53, that is, the link state calculation sub-module 51 base
  • the received routing data information needs to update the link state value of the link state packet in the routing data information each time the second binding table is updated, and specifically set the link state in the pre-update routing data information.
  • the link state value (in which the original sender MAC address of the link state message is not the MAC address of the data transceiver subunit 31 of the device) is x, and the link state calculation submodule 51 reads the link state.
  • the value is x
  • the candidate binding MAC address is the entry of the MAC address of the neighboring one-hop device of the device in the routing data information in the first binding table, if the above-mentioned binding table cannot be found in the first binding table.
  • the entry of the routing data is directly discarded, and the link state packet update process ends; if the above entry is found in the first binding table (indicating the first binding table and the second binding table) When the data is sent and received, the corresponding candidate MAC address is correspondingly set.
  • the superimposed value of the entry found in the first binding table is y, and the receiving entry is set in the second binding table.
  • the MAC address is the link status in the routing data information.
  • z indicates that the data sent by the device is The superposition probability that the adjacent one-hop device of the device corresponding to the MAC address of the neighboring one-hop device of the device in the routing data information is successfully received and forwarded by the device and successfully received by the device, and z represents the routing data information.
  • the data transmitted by the adjacent one-hop device of the device corresponding to the MAC address of the adjacent one-hop device of the device is successfully received by the device, and the data transmitted by the device is adjacent to the device in the routed data information.
  • adjacent hop apparatus corresponds to the MAC address of the device adjacent hop routing data information of the apparatus
  • the probability of successfully transmitting data, and preferably the same denominator in the normalization process for the values y and z, that is, the length of the superimposed queue and the receiving queue are the same, so that when y/z ⁇ 1, the updated routing data is
  • the link state value of the link state message of the information is set to x*(y/z) because the link state between the device and the device corresponding to the original sender MAC address of the link state message is higher than the device.
  • the link state between the adjacent one-hop device (the device transmitting the link state message) and the device corresponding to the original sender MAC address of the link state message is worse, and the link state value should be reduced.
  • the link state between the devices is not more than the link state between the neighboring one-hop device (the device transmitting the link state message) and the device corresponding to the original sender MAC address of the link state message.
  • the link state message of the routing data information is directly sent to the forwarding sub-module 53, and the link state message in this case is also referred to as the updated link state message.
  • the device determines the link state between the device and the destination device by calculating the average value of the last several link states of the device and the destination device, and the link state calculation sub-module 51 Maintaining a third binding table, where the third binding table is used to record the correspondence between the average values of the link states, and the entries of the third binding table include the destination MAC address, the candidate routing MAC address, and the link state average value, and the link The state average is used to represent the average of the last few link states.
  • An average queue is maintained for each record in the table.
  • the average queue length of each record in the third binding table is the same, and the average queue is stored in the queue.
  • the link state value, the link state mean is the average of the link state values in the average queue.
  • the link state calculation sub-module 51 sends the updated link state message to the forwarding sub-module 53 each time (that is, each time the link state value of the link state message is updated), and needs to be based on the routing data.
  • the information and the updated link state message are used to update the third binding table.
  • the third binding table is used to find the original sender MAC address of the link state message in the routing data information.
  • the candidate route MAC address is the entry of the MAC address of the neighboring one-hop device of the device in the routing data information, and stores the updated link of the link state message in the average queue of the found entry.
  • the status value is used to calculate the link state average value of the preceding entry.
  • the link state average is the average value of the link state value in the average queue. If the above entry cannot be found in the third binding table, the third binding is performed. A new record is added to the fixed list. The destination MAC address of the newly added record is the original sender MAC address of the link state message in the route data information, and the candidate route MAC address of the newly added record is in the route data information. Phase of the device The MAC address of the hop device adds the link record value of the updated link state packet to the averaging queue of the entry in the third binding table, and calculates the link state of the entry. The mean value of the path state, and the mean value of the link state is the average of the link state values in the mean queue.
  • the link state calculation sub-module 51 searches all the tables in the third binding table for the original sender MAC address whose destination MAC address is the link state message in the routing data information. In the entry, the entry with the highest link state average value is selected, and the route update information is sent to the routing table sub-module 52.
  • the route update information includes the destination MAC address of the selected entry and the candidate route of the selected entry. MAC address.
  • the route update information indicates that when the device sends data to the device (destination device) corresponding to the destination MAC address in the route update information, if the device corresponding to the candidate route MAC address in the route update information is the next hop, the device can implement the present The link state optimal communication between the device and the device (destination device) corresponding to the destination MAC address in the routing update information.
  • the routing table sub-module 52 maintains a fourth binding table, and the fourth binding table records the correspondence between the destination MAC address and the next hop MAC address, and the entries of the fourth binding table include the destination MAC address and the next hop MAC address.
  • the routing table sub-module 52 receives the routing update information sent from the link state calculation sub-module 51.
  • the routing update information includes the destination MAC address and the candidate routing MAC address, and the routing table sub-module 52 searches the fourth binding table for the destination MAC address. If the entry of the destination MAC address in the route update information is found in the fourth binding table, the next hop MAC address of the entry is updated to the candidate route MAC address in the route update information.
  • the routing table sub-module 52 receives the routing query request sent from the data transceiving sub-unit 31.
  • the routing query request includes the destination MAC address, and the routing table sub-module 52 searches the fourth binding table for the destination MAC address as the destination MAC in the routing query request. If the entry of the address cannot be found in the fourth binding table, the time is discarded.
  • the communication process if the foregoing entry is found in the fourth binding table, sends a route query response to the data transceiver sub-unit 31, where the route query response includes the above-mentioned entries in the fourth binding table.
  • One hop MAC address For each device in the present invention transmits the original link state message according to the original link state message generation sub-module according to the predetermined time period interval, and each device transmits the original link state message by itself.
  • the communication process forwarded by the device and received by itself maintains its first binding table, and each device maintains its own second binding table and third binding table by receiving link state messages sent by other devices, and finally based on The information about these binding tables maintains its own fourth binding table, so that in the fourth binding table of each device, the MAC addresses of the groups whose communication link status is optimal (the link state average is the largest) are recorded.
  • Corresponding relationship with the next hop MAC address so that each device sends a communication data to the device corresponding to the destination MAC address recorded in the fourth binding table, and selects the next hop in the entry of the destination MAC address.
  • the device corresponding to the MAC address serves as the next hop device to ensure that the communication path is optimal.
  • Each network access device and each network expansion device in the network sharing system selects a next hop device in this manner, which ensures that each network access device and each network expansion device in the network sharing system are in the most Good communication status.
  • the forwarding sub-module 53 receives the updated link state message sent from the link state calculation sub-module 51, and performs the following processing:
  • step (2) (1) determining whether the transmission distance in the link state packet is less than or equal to 1, and if so, discarding the link state packet, and not forwarding the link state packet, if not, proceeding to step (2);
  • the transmission distance in the link state message is decremented by 1 and sent to the data transceiving subunit 31, and the processed link state message sent by the forwarding submodule 53 to the data transceiving subunit 31 is forwarded.
  • Link status message The data transceiver sub-unit 31 receives the forwarded link state message sent from the forwarding sub-module 53 and encapsulates the forwarded link state message into a routing data frame, and the receiving MAC address of the routing data frame is broadcast.
  • the address FF: FF: FF: FF: FF: FF: FF, the sender MAC address of the routing data frame is the MAC address of the data transceiving subunit 31, and the frame body of the routing data frame is the routing data tag and the forwarded link state.
  • the networking unit 14 includes a timing update sub-unit 35 that processes the above. Specifically, the timing update sub-unit 35 periodically traverses the pre-processing record table maintained by the pre-processing sub-unit 33 at a certain time interval, and determines the difference between the latest reception time and the current time for each record in the pre-processing record table.
  • the value exceeds a certain threshold it indicates that the routing information of the destination device corresponding to the original sender MAC address maintained by the device is not up to date, and the routing information of the device destined for the device needs to be deleted.
  • the record of the original sender is deleted in the pre-processing record table, and the original sender MAC address of the record is time_out_mac, and the entry of the network extension device whose MAC address is time_out_mac is deleted in the service information table maintained by the service information sub-unit 34.
  • the entry whose destination MAC address is time_out_mac is deleted, and the table whose destination MAC address is time_out_mac is deleted in the third binding table maintained by the link state calculation sub-module 51.
  • the entry in the fourth binding table maintained by the routing table sub-module 52 deletes the entry with the destination MAC address being time_out_mac.
  • the timing update sub-unit 35 periodically traverses the second binding table maintained by the link state calculation sub-module 51 according to a certain time interval, and determines the latest reception time and current time for each record in the second binding table.
  • the second binding table is Delete this record, set the destination MAC address of this record to dest_mac, candidate route MAC address For the cand_mac, the third binding table deletes the entry with the destination MAC address being dest_mac and the candidate routing MAC address being the cand_mac.
  • the link state calculation sub-module 51 searches the third binding table for the entry with the destination MAC address dest_mac.
  • routing table submodule 52 selecting, from the foregoing table entries in the third binding table, an entry having the largest link state average value, and sending routing update information to the routing table submodule 52, where the routing update information includes the destination MAC address of the selected entry. And the candidate route MAC address of the selected entry.
  • the network extension device in the network sharing system of the present invention comprises a networking unit 61 and a wireless service unit 62.
  • the wireless service unit 62 includes a client access subunit 71 and an IP address assignment subunit 72, and the client access subunit 71 Working in an AP (Access Point) mode according to the 802.11 standard and providing a wireless network service for the smart terminal, the client access subunit 71 receives the IP data packet sent by the smart terminal served by the client access subunit 71.
  • the client access subunit 71 extracts the destination IP address of the IP data packet, and determines that the IP data packet is sent by the smart terminal served by the client access subunit 71 of the network extension device according to the destination IP address of the IP data packet.
  • the IP data packet When the IP data packet is sent to the Internet, the IP data packet is sent to the networking unit 61; when the IP data packet is determined according to the destination IP address of the IP data packet, the IP data packet is served by the client access subunit 71 of the network expansion device.
  • the intelligent terminal sends IP data packets to other devices (network expansion devices, network access devices, and intelligent terminals served by them) in the network sharing system, the above IP data packets are Abandoned, put an end to this kind of communication, in order to ensure safe access within the network sharing system.
  • the client access subunit 71 receives the IP data packet sent by the data transceiving subunit 81 of the networking unit 61, and sends the IP data packet to the client access subunit 71 according to the destination IP address of the IP data packet. Corresponding to the intelligent terminal, as shown in Figure 6-7.
  • the intelligent terminal provided by the wireless network (including the wireless network provided by the network access device and the wireless network provided by the network expansion device) allocates a unique IP address in the network sharing system, so the wireless service unit 62 of the network extension device includes the IP address.
  • the assignment sub-unit 72, the IP address assignment sub-unit 72 assigns a unique IP address to the intelligent terminal of the wireless network provided by the access client access sub-unit 71, the IP address assignment sub-unit 72 of the network extension device and the network access device
  • the IP address assignment sub-unit 22 assigns an IP address to the smart terminal based on the MAC address of the smart terminal, and the IP address assignment sub-unit 72 of the network extension device and the IP address assignment sub-unit 22 of the network access device are smart based on the MAC address of the smart terminal.
  • the rules for assigning IP addresses to terminals are the same.
  • the MAC addresses of different intelligent terminals are different, based on An excellent algorithm can calculate different IP addresses for different MAC addresses, so that all the wireless networks (including the wireless network provided by the network access device and the wireless network provided by the network expansion device) provided by the network sharing system are accessed.
  • the IP addresses of the smart terminals are different, so that the smart terminals accessing the network sharing system will not conflict due to duplicate IP addresses.
  • the networking unit 61 includes a data transceiving subunit 81, a routing subunit 82, a preprocessing subunit 83, and a timing update subunit 84.
  • the data transceiver sub-unit 81 operates in the Ad-Hoc mode according to the 802.11 standard.
  • the smart terminal provides the wireless service unit of the network extension device of the wireless network to which the smart terminal is provided.
  • the client access subunit 71 sends an IP data packet, and the client access subunit 71 sends the IP data packet to the data transceiver subunit 81, and the data transceiver subunit 81 receives the client data connection.
  • the gateway query request When entering the IP data packet of the sub-unit 71, the gateway query request is first sent to the routing sub-unit 82, and the routing sub-unit 82 sends a gateway query response to the data transceiving sub-unit 81.
  • the gateway query response includes the optimal network selected by the network expansion device.
  • the data transceiving sub-unit 81 After the MAC address of the access device, the data transceiving sub-unit 81 sends a routing query request to the routing sub-unit 82.
  • the routing query request includes a destination MAC address, and the destination MAC address in the routing query request is in the gateway query response.
  • the MAC address of the optimal network access device selected by the network expansion device, the routing sub-unit 82 selects and selects the optimal next hop device among the adjacent one-hop devices of the device according to the destination MAC address in the route query request. And transmitting a routing query response including the MAC address of the optimal next hop device to the data transceiving subunit 81, such that the networking unit 61 determines the optimal network access device and aims at the optimal network access device described above.
  • the device selects an optimal next hop device in the adjacent one hop device of the device, and the data transceiver subunit 81 constructs a load data frame according to the gateway query response and the route query response, and is configured by the specific data transceiver subunit 81.
  • the sender MAC address of the load data frame is the MAC address of the optimal next hop in the route query response
  • the sender MAC address of the payload data frame constructed by the data transceiver subunit 81 is the MAC address of the data transceiver subunit 81.
  • the frame structure of the load data frame constructed by the data transceiver subunit 81 and the load constructed by the data transceiver subunit 31 of the network access device According to the structure of the frame body of the frame, that is, the frame body of the payload data frame constructed by the data transceiver subunit 81 is the load data flag, the MAC address of the final receiving device, and the IP data packet, and the load configured by the data transceiver subunit 81 is configured.
  • the MAC address of the final receiving device in the frame body of the data frame is the MAC address of the optimal network access device selected by the network expansion device in the gateway query response, and the frame of the load data frame constructed by the data transceiver subunit 81
  • the IP data packet in the body is the IP data packet transmitted from the client access subunit 71 received by the data transceiver subunit 81.
  • the above IP data packet sent by the smart terminal to the Internet is transmitted to the selected optimal network access device according to the optimal communication path, and when other devices on the multi-hop path receive the payload data frame, pass Extracting the MAC address of the final receiving device in the frame body of the payload data frame may directly determine the MAC address of the network access device that finally receives the payload data frame, and select an optimal next hop in a similar manner, and finally The IP data packet is sent to the network access device as the final receiving device, and the IP data packet is sent to the Internet via the network access device to realize access to the Internet.
  • the data transceiver sub-unit 81 receives the 802.11 data frame sent from the other network extension device or the network access device, and extracts the type of the frame body of the received 802.11 data frame. If the 802.11 data frame is a routing data frame, the routing data information is sent to the pre-processing sub-unit 83, and the routing data information includes the sender MAC address of the received routing data frame.
  • the 802.11 data frame is a load data frame, and the MAC address of the final receiving device in the frame body of the received load data frame is extracted, if the MAC address of the final receiving device is the data transceiver subunit 81 of the network expansion device.
  • the data transceiver sub-unit 81 extracts the IP data packet in the frame body of the received load data frame and sends it to the client access sub-unit of the wireless service unit 62.
  • the client access sub-unit 71 further delivers the IP data packet to the smart terminal served by the client service sub-unit 71 according to the destination IP address of the IP data packet; if the MAC address of the final receiving device is not the network extension
  • the MAC address of the data transceiving subunit 81 of the device indicates that the network extension device is one hop in the multi-hop path, and the network expansion device needs to forward the IP data packet in the frame body of the received payload data frame, and the foregoing receiving
  • the MAC address of the final receiving device in the frame body of the loaded data frame may be the MAC address of the network access device, or may be the MAC address of the other network expansion device, and the network expansion device needs the frame body of the load data frame.
  • the network access device or the network expansion device corresponding to the MAC address of the final receiving device is the adjacent device in the adjacent device of the network expansion device.
  • the optimal next hop device is selected, and the data transceiver unit 81 sends a route query request to the routing subunit 82.
  • the route query request includes a destination MAC address, and the destination MAC address in the route query request is received as described above.
  • Frame of load data frame The MAC address of the final receiving device in the body, the routing sub-unit 82 selects and selects the optimal next hop device among the adjacent one-hop devices of the device according to the destination MAC address in the routing query request and sends the data to the data transceiver sub-unit 81.
  • the data query sub-unit 81 constructs a load data frame according to the route query response and transmits the data, and specifically, the receiver MAC of the load data frame constructed by the data transceiver sub-unit 81.
  • the address is the MAC address of the optimal next hop in the routing query response, and the sender MAC address of the payload data frame constructed by the data transceiver subunit 81 is the MAC address of the data transceiving subunit 81, and the data transceiving subunit 81 is constructed.
  • the frame body of the load data frame includes a load data flag, a MAC address of a final receiving device in a frame body of the received load data frame, and an IP data packet in a frame body of the received load data frame, so that Ensuring that the IP data packet in the frame body of the received load data frame is transmitted to the above received negative according to the optimal communication path
  • the final MAC frame body receiving apparatus of a data frame corresponding to a network access device or a network expansion device.
  • the network expansion device After the network extension device receives the IP data packet sent by the smart terminal serving the network extension device to the Internet, it needs to generate a load according to the IP data packet.
  • Data frame in this case, the network expansion device generates the load data frame in order to send the IP data packet sent by the intelligent terminal served by the network extension device to the Internet to the optimal network access device selected by the network expansion device, and thus the network expansion
  • the device sets the MAC address of the final receiving device in the frame body of the generated load data frame to the MAC address of the optimal network access device selected by the network expansion device, and the other network expansion device or the network access device forwards the load data.
  • the MAC address of the final receiving device in the frame body of the above-mentioned payload data frame is not changed at the time of the frame.
  • the original link state message generating module 92 of the routing sub-unit 82 periodically constructs the original link state message and sends it to the data transceiving sub-unit 81 of the device at a certain time interval.
  • the data transceiving sub-unit 81 will use the original link.
  • the link state message is encapsulated in a routing data frame and is sent, and the link state message (the link state message that has not been forwarded by other devices) configured by the original link state packet generating module 92 is the original link state packet.
  • the original sender MAC address of the original link state packet is the MAC address of the data transceiver subunit 81 of the device; the link state value of the original link state packet is the maximum value, indicating that the device and the destination device (
  • the sequence number setting rule of the original link state packet generated by the original link state packet generating module 42 of the routing subunit 32 of the networking unit 14 is the same, that is, the original link state message is
  • the serial number is preferably set in an incremental manner, that is, the sequence number in the newly generated link state message of the original link state message generating module 92 is on the original basis (generated by the original original link state message generating module 92).
  • the sequence number of the link state packet changes according to the fixed step size. More preferably, each time increases by 1 (but not limited to this, other steps can be added).
  • the device does not change during the forwarding process; the device is a network extension device, so the original link state message generation module 92 does not set the gateway tag in the original link state message; the device is a network extension device, so the above chain
  • the path status message includes the terminal information, and the terminal information indicates the address information of the intelligent terminal served by the network extension device.
  • the terminal information in the original link state message generated by the original link state message generating module 92 is the network.
  • the correspondence between the network extension device and the intelligent terminal it serves can be dynamically recorded.
  • the adjacent one-hop device of the network expansion device receives the original link state message sent by the device, the adjacent one-hop device of the device calculates the link state between the device and the device, and then the device The adjacent one-hop device updates the link state value in the original link state message sent by the device, and then forwards the updated updated link state message to the broadcast mode.
  • the adjacent two-hop device of the device receives, updates, and forwards the link state message forwarded by the adjacent one-hop device of the device, and the adjacent two-hop device of the device recalculates the adjacent two hops of the device.
  • the link state between the device and the device so that the original link state message generated by the device is received by other devices by means of multi-hop forwarding, and other devices can calculate the link with the device.
  • the state, the link status between the device and the device calculated by the other device is used as the basis for selecting the optimal next hop when the device is the device of the device, and the device periodically transmits the original link state message to ensure The real-time nature of the link state between the device and the device calculated by other devices.
  • the data transceiver sub-unit 81 receives the original link state message sent by the original link state message generating module 92 of the routing sub-unit 82, and encapsulates the original link state message into a routing data frame, and sends the routing data frame.
  • the receiving MAC address is the broadcast address FF: FF: FF: FF: FF
  • the sender MAC address of the routing data frame is the MAC address of the data transceiving subunit 81
  • the frame body of the routing data frame is the routing data tag.
  • the original link state message; and the data transceiver sub-unit 81 receives the routing data frame sent from other network expansion devices or other network access devices in the network sharing system, and extracts routing data information from the routing data frame.
  • the routing data information includes a link state message in a frame body of the routing data frame and a sender MAC address of the routing data frame (ie, a MAC address of a neighboring one-hop device of the device that sends the routing data frame to the device) .
  • Each network access device and each network extension device in the network sharing system of the present invention periodically generates and transmits a link state message, and the link state message may be transmitted through different multi-hop paths.
  • the device receives, the device needs to ensure that the link state message that is further processed is up-to-date, so the networking unit 61 includes a pre-processing sub-unit 83, and the pre-processing sub-unit 83 determines that the data transmission and reception sub-unit is transmitted through the maintenance pre-processing record table.
  • the structure of the preprocessing recording table maintained by the preprocessing subunit 83 of the network expansion device is the same as the structure of the preprocessing recording table maintained by the network access device, that is, the preprocessing of the network expansion device
  • the entry of the pre-processing record table maintained by the processing sub-unit 83 includes the original sender MAC address, the sequence number, and the latest reception time.
  • the pre-processing sub-unit 83 receives the routing data information transmitted from the data transceiving sub-unit 81, and the routing data information includes the chain.
  • the sub-unit 83 extracts the original sender MAC address of the link state message in the routing data information and the sequence number of the link state message in the routing data information, and determines whether the original sender MAC address exists in the pre-processing record table. If the entry of the original sender MAC address of the link state packet in the routing data information is not included in the preprocessing record table, indicating that the link state packet is the latest, the preprocessed record is A new record is added to the table, and the routing data information is sent to the routing sub-unit 82.
  • the original sender MAC address of the newly added record is the original sender MAC of the link state message in the routing data information
  • the new The sequence number of the added record is the sequence number of the link state message in the routing data information
  • the latest receiving time of the newly added record is the current system time; if the foregoing entry exists in the preprocessing record table, the table is further compared.
  • the relationship between the sequence number of the entry and the sequence number of the link state packet in the routing data information if the sequence number of the entry is greater than or equal to The sequence number of the link state packet in the routing data information indicates that the link state packet is not up to date, and the routing data information is discarded, and the preprocessing process ends. If the sequence number of the entry is smaller than the routing data.
  • the sequence number of the link state message in the information indicates that the link state message is the latest, because the sequence number of the original link state message is increased by 1 each time the new link state message is newly generated, as described above.
  • the sequence number of the entry is updated to the sequence number of the link state message in the routing data information, and the latest receiving time of the entry is updated to the current system time, and the routing data information is sent to the routing subunit 82.
  • the original sender MAC address, the sequence number in the link state message, and the latest receiving time in all the latest link state messages sent by other devices received by the device are recorded in the pre-processing record by the pre-processing sub-unit 83. In the table, these latest routing data information is sent to the routing sub-sheet through the pre-processing sub-unit 83. Yuan 82.
  • the routing information maintenance module 91 receives and processes the routing data information sent from the pre-processing sub-unit 83.
  • the routing data information includes a link state message and an adjacent one-hop device of the device that transmits the link state message to the device.
  • the MAC address the routing information maintenance module 91 extracts the link state message in the routing data information, and the routing information maintenance module 91 determines whether the link state message needs to be forwarded, and if it needs to be forwarded, constructs the forwarding based on the link state message.
  • the link state message is sent to the data transceiving subunit 81; the routing information maintenance module 91 receives the route query request sent from the data transceiving subunit 81, and the routing information maintenance module 91 sends a route to the data transceiving subunit 81 according to the route query request.
  • the routing information maintenance module 91 which is an important invention of the present invention, is mainly used for processing link state messages sent from other devices (including link state messages generated by other devices and link state messages forwarded by other devices).
  • the routing information maintenance module 91 calculates the link status between the device and other devices by processing the link state message. Specifically, as shown in FIG. 10, the routing information maintenance module 91 includes a link state calculation submodule 101, a routing table submodule 102, a gateway selection submodule 103, and a forwarding submodule 104. The subroutines of the routing information maintenance module 91 are described in detail below. The working process of the module.
  • the link state calculation sub-module 101 calculates a link state value according to the link state message sent from the route data information of the pre-processing sub-unit 83, and the link state between the adjacent one-hop device of the device and the destination device. It is represented by the link state value in the link state message. Therefore, the device needs to calculate the link state between the device and the adjacent one hop device of the device, and the device and the device are relative to the device.
  • the link between adjacent one-hop devices of the device may be divided into a transmit link and a receive link.
  • the link state between the device and the adjacent one-hop device of the device refers to the above-mentioned transmission.
  • the link state of the link; the data transmitted by the device in the present invention is successfully received (directly or indirectly) by the adjacent one-hop device of the device and is forwarded by the adjacent one-hop device of the device and successfully received by the device.
  • the probability represents a superposition of the transmission link state and the reception link state between the device and the adjacent one-hop device of the device.
  • the original link state message generated by the device sent by the device is successfully received by the adjacent one hop device of the device and forwarded by the adjacent one hop device of the device, and
  • the probability of successful reception by the device indicates the superimposed value of the transmission link state and the reception link state between the device and the adjacent one-hop device of the device.
  • the present invention uses the probability that the data transmitted by the adjacent one-hop device of the device is successfully received by the device to indicate the received value of the receiving link state between the device and the adjacent one-hop device of the device, specifically, the network The access device is consistent.
  • the probability that the link state message originally generated by the device that is not transmitted by the device is successfully received by the device is represented by the probability that the device is successfully received by the device, and the device is adjacent to the adjacent device of the device.
  • the received value of the receive link state Since the state of the transmission link between the device and the adjacent one-hop device of the device cannot be directly calculated, the present invention adopts an indirect calculation method.
  • the present invention calculates the data transmitted by the device (preferably the original chain originally generated by the device)
  • the status message is a superposition probability that is successfully received by the adjacent one-hop device of the device and is forwarded by the adjacent one-hop device of the device and successfully received by the device, to indicate that the device is adjacent to the device.
  • n 1 indicates that the data transmitted by the device is adjacent to the hop of the device
  • n 2 represents the successful reception probability of the device successfully transmitted by the adjacent one-hop device of the device by the device, and thus the superposition probability may reflect the device and the device
  • the transmit link state and the receive link state between adjacent one-hop devices may reflect the device and the device The transmit link state and the receive link state between adjacent one-hop devices.
  • the successful reception probability n 2 ' of the device successfully received by the device for indicating the device and the device Received value of the receive link state between adjacent one hop devices.
  • the successful transmission probability (n 1 *n 2 )/n 2 ' of the device successfully received by the adjacent one-hop device of the device is obtained.
  • the probability may reflect the status of the transmission link between the device and the adjacent one-hop device of the device, and the adjacent one-hop device with a high probability of successful transmission will serve as a preferred next hop device when the device transmits data, which is described in detail below.
  • the preferred solution of a principle process, but not limited thereto, can be used by those skilled in the art under the technical concept of the solution (such as non-queue return probability statistics) communication probability calculation method.
  • the link state calculation sub-module 101 maintains the first binding table, and the first binding table maintained by the link state calculation sub-module 101 is used to record the correspondence between the superposition values, and the first binding of the link state calculation sub-module 101
  • the table is the same as the entry of the first binding table maintained by the link state calculation sub-module 51, that is, the entry of the first binding table maintained by the link state calculation sub-module 101 includes the candidate route MAC address and the superimposed value.
  • Each record in the first binding table maintained by the link state calculation sub-module 101 maintains an overlay queue, and the length of the overlay queue corresponding to each record in the first binding table maintained by the link state calculation sub-module 101
  • the length of the superposition queue corresponding to each record in the first binding table maintained by the link state calculation sub-module 51 is the same, and the sequence number of the link state message is stored in the superposition queue, and the number of the sequence numbers in the superposition queue is
  • the ratio of the length of the superimposed queue is the superposition probability that the data transmitted by the device is successfully received by the adjacent one-hop device of the device and is forwarded by the adjacent one-hop device of the device and successfully received by the device.
  • the ratio of the number of the sequence number in the superimposition queue to the length of the superimposed queue is the superposition value of the corresponding entry, and the sequence number of the superposition queue corresponding to each entry in the first binding table maintained by the link state calculation sub-module 101 is moved in.
  • the removal process is kept in sync, and the elements in the overlay queue are moved in and out of the overlay queue according to the principle of first in first out.
  • the link state calculation sub-module 101 maintains a second binding table, and the second binding table maintained by the link state calculation sub-module 101 is used to record the correspondence between the received values, and the second binding maintained by the link state calculation sub-module 101
  • the table is the same as the entry of the second binding table maintained by the link state calculation sub-module 51, that is, the entry of the second binding table maintained by the link state calculation sub-module 101 includes the destination MAC address, the candidate route MAC address, Receiving the value and the latest receiving time, maintaining a receiving queue for each record in the second binding table maintained by the link state calculation sub-module 101, and the length of the receiving queue corresponding to each record in the second binding table is the same
  • the preferred receiving queue has the same length of the overlapping queue corresponding to each record in the first binding table maintained by the link state calculation sub-module 101, and the serial number of the link state message is stored in the receiving queue, and the receiving queue is received.
  • the ratio of the number of serial numbers in the queue to the length of the receiving queue is the probability that the data sent by the adjacent one-hop device of the device is successfully received by the device, and the number and receiving of the serial number in the receiving queue
  • the ratio of the length of the column is the received value of the corresponding entry.
  • the serial number of the receiving queue corresponding to the entry with the same destination MAC address in the second binding table maintained by the link state calculation sub-module 101 is synchronized.
  • the elements in the receive queue are moved in and out of the receive queue on a first-in, first-out basis.
  • the link state calculation sub-module 101 receives and processes the routing data information sent from the pre-processing sub-unit 83.
  • the routing data information includes a link state message and a neighboring hop of the device that sends the link state message to the device.
  • the MAC address of the device, the link state calculation sub-module 101 extracts the link state message in the routing data information, if the original sender MAC address of the link state message is the data transceiver sub-unit 81 of the network extension device.
  • the MAC address indicates that the link state message is generated by the device and the link state message is successfully received (directly or indirectly) by the adjacent one hop device of the device, and then forwarded by the adjacent one hop device and is further When the device successfully receives, the first binding table maintained by the link state calculation sub-module 101 is updated.
  • the link state calculation sub-module 101 receives the routing data information sent from the pre-processing sub-unit 83.
  • the routing data information includes a link state message and an adjacent one-hop device of the device that sends the link state message to the device.
  • the MAC address the link state calculation sub-module 101 extracts the link state message in the routing data information, if the original sender MAC address of the link state message is not the MAC of the data transceiver sub-unit 31 of the network extension device.
  • An address indicating that the link state message is a device (other than the network expansion device, including an adjacent one-hop device of the device, and the other device can be used as a destination device of the device) and passes through the device.
  • the neighboring one-hop device forwards and is successfully received by the device, and then updates the second binding table maintained by the link state calculation sub-module 101.
  • the process of the link state calculation sub-module 101 updating the second binding table maintained by the link state calculation sub-module 101 and the process of the link state calculation sub-module 51 updating the second binding table maintained by the link state calculation sub-module 51 The same, no repeated description here.
  • the link state calculation sub-module 101 also needs to update the link state value of the link state message (the link state message generated by the other device) in the routing data information.
  • the link state value of the link state message in the information specifically the link state message in the pre-update route data information (where the original sender MAC address of the link state message is not the data transceiver of the device)
  • the link state value of the MAC address of the unit 81 is a, and the link state calculation sub-module 101 reads the link state value a, and searches for the candidate route MAC address in the first binding table as the routing data information.
  • the routing data information is directly discarded, and the link state message update process ends; First binding
  • the above table entry is found (indicating that the device in the first binding table and the second binding table corresponding to the same candidate MAC address when transmitting and receiving data), and setting the table found in the first binding table
  • the superimposed value of the item is b
  • the destination MAC address set in the second binding table is the original sender MAC address of the link state message in the routing data information
  • the candidate routing MAC address is the device in the routing data information.
  • the updated received value of the entry of the MAC address of the adjacent one-hop device is c
  • b represents the phase of the device corresponding to the MAC address of the adjacent one-hop device of the device in the data transmitted by the device.
  • the data transmitted by the adjacent one-hop device is successfully received by the device, and c is equal to n 2 , so n 1 can be obtained by b/c, that is, the device succeeds to the adjacent one-hop device of the device.
  • the probability of sending data, and preferably the same denominator in the normalization process for values b and c, that is, the length of the superimposed queue and the receiving queue are the same, so that when b/c ⁇ 1, the updated routing data information will be updated.
  • the link state value of the link state message is set to a*(b/c) because the link state between the device and the device corresponding to the original sender MAC address of the link state message is higher than that of the device.
  • Adjacent one-hop device (sends this link state message)
  • the link state between the devices corresponding to the original sender MAC address of the link state message is worse, the link state value should be reduced, and the updated link state message is sent to the forwarding submodule 104.
  • the link state value of the link state message of the routing data information is kept unchanged, because the device corresponds to the original sender MAC address of the link state message.
  • the link state between the devices is not more than the link state between the neighboring one-hop device (the device transmitting the link state message) and the device corresponding to the original sender MAC address of the link state message.
  • the link state message of the routing data information is directly sent to the forwarding sub-module 104, and the link state message in this case is also referred to as the updated link state message.
  • the process of updating the link state message by the link state calculation sub-module 101 is the same as the process of updating the link state message by the link state calculation sub-module 51, and the lengths of the superimposed queue and the receive queue are the same in both.
  • the link state of the wireless channel is jittery. Therefore, the network expansion device determines the link state between the network extension device and the destination device by calculating the average value of the last link states of the network extension device and the destination device.
  • the path state calculation sub-module 101 maintains a third binding table, and the third binding table is used to record the correspondence between the average values of the link states, and the third binding table maintained by the link state calculation sub-module 101 and the maintenance process thereof.
  • the third binding table maintained by the link state calculation sub-module 51 and the maintenance process thereof are the same, that is, the entry of the third binding table maintained by the link state calculation sub-module 101 includes the destination MAC address, the candidate routing MAC address, and the link.
  • the average value of the link state is used to represent the average value of the link state of the last few links.
  • the length of the mean queue corresponding to each record in the third binding table maintained by the link state calculation submodule 101 is the same.
  • the length of the mean queue corresponding to each record in the third binding table maintained by the state calculation sub-module 101 and each item in the third binding table maintained by the link state calculation sub-module 51 The corresponding average queues have the same length.
  • the average queue stores link state values.
  • the link state average is the average of the link state values in the average queue.
  • the process of the state calculation sub-module 101 updating the third binding table maintained by the link state calculation sub-module 101 is the same as the process of the link state calculation sub-module 51 updating the third binding table maintained by the link state calculation sub-module 51, that is, Specifically, the third binding table is configured to search for the original sender MAC address of the link state message in the routing data information, and the candidate routing MAC address is the adjacent one hop device of the device in the routing data information.
  • the entry of the MAC address entry, and the link state value of the updated link state packet is stored in the average queue of the above-mentioned entry, and the link state average value of the entry is calculated, and the link state average value is obtained.
  • the sender MAC address, the newly added candidate route MAC address is the MAC address of the neighboring one-hop device of the device in the routing data information, and the new entry is added to the third binding table.
  • the link state value of the updated link state packet is stored in the averaging queue, and the link state average value of the entry is calculated.
  • the link state average is the average value of the link state value in the averaging queue, and will be calculated.
  • the link state average is used as the link state average in the new entry.
  • the link state calculation sub-module 101 After the link state calculation sub-module 101 updates the third binding table, the link state calculation sub-module 101 searches the third binding table for the original sender of the link state message whose destination MAC address is the routing data information. All the entries of the MAC address, the entries with the highest link state average are selected in the entries, and the routing update information is sent to the routing table sub-module 102, where the routing update information includes the destination MAC address of the selected entry and the selected.
  • the route update information indicates that when the device sends data to the device (destination device) corresponding to the destination MAC address in the route update information, if the device corresponding to the candidate route MAC address in the route update information is The next hop can implement link state optimal communication between the device (destination device) corresponding to the destination MAC address in the routing update information.
  • the route state calculation sub-module 101 sends the route update information to the routing table sub-module 102, it is determined whether the link state message in the routing data information is set with a gateway tag, and if yes, the routing information information is The link state message is originally generated by the network access device, and the original sender MAC address of the link state message in the route data information is the MAC address of the network access device that generates the link state message.
  • the link state calculation sub-module 101 further needs to send the gateway update information to the gateway selection sub-module 103, where the gateway update information includes the destination in the entry with the largest link state selected in the third binding table.
  • the gateway update information indicates that the device corresponding to the destination MAC address in the gateway update information (that is, the device corresponding to the destination MAC address in the route update information, and also the link state in the route data information)
  • the optimal link state that can be achieved between the network access devices corresponding to the original sender MAC address of the message, and the routing table sub-module 102 records the device and the original link state message by means of the route update information.
  • the next hop device selected by the device when the network access device (the device corresponding to the destination MAC address in the gateway update information and the device corresponding to the destination MAC address in the route update information) reaches the optimal link state .
  • the routing table sub-module 102 maintains a fourth binding table, and the fourth binding table records the correspondence between the destination MAC address and the next hop MAC address, and the entries and routing tables of the fourth binding table maintained by the routing table sub-module 102
  • the entry of the fourth binding table maintained by the module 52 is the same, that is, the entry of the fourth binding table maintained by the routing table sub-module 102 includes the destination MAC address and the next hop MAC address, and the routing table sub-module 102 receives the transmitted chain.
  • the routing update information includes the destination MAC address and the candidate routing MAC address, and the routing table sub-module 102 searches the fourth binding table for the destination MAC address as the destination MAC address in the routing update information.
  • the next hop MAC address of the entry is updated to the candidate routing MAC address in the routing update information; if the fourth binding table is found in the fourth binding table, If the entry is less than the above entry, a new record is added to the fourth binding table.
  • the destination MAC address of the newly added record is the destination MAC address in the route update information, and the next hop MAC address of the newly added record is the route. Update letter MAC address of the candidate routes.
  • the routing table sub-module 102 receives the routing query request sent from the data transceiving sub-unit 81.
  • the routing query request includes the destination MAC address, and the routing table sub-module 102 searches the fourth binding table for the destination MAC address as the destination MAC in the routing query request.
  • each device in the present invention transmits the original link state message according to the original link state message generation sub-module according to the predetermined time period interval, and each device transmits the original link state message by itself.
  • the communication process forwarded by the device and received by itself maintains its first binding table, and each device maintains its own second binding table and third binding table by receiving link state messages sent by other devices, and finally based on The information about these binding tables maintains its own fourth binding table, so that in the fourth binding table of each device, the MAC addresses of the groups whose communication link status is optimal (the link state average is the largest) are recorded.
  • Corresponding relationship with the next hop MAC address so that each device sends a communication data to the device corresponding to the destination MAC address recorded in the fourth binding table, and selects the next hop in the entry of the destination MAC address.
  • the device corresponding to the MAC address serves as the next hop device to ensure that the communication path is optimal.
  • Each network access device and each network expansion device in the network sharing system selects the next hop device in this manner, and can ensure that each network access device and each network expansion device in the network sharing system are in the most Good communication status.
  • the gateway selection sub-module 103 maintains a gateway list.
  • the gateway list entry includes a MAC address and a link state average value of the network access device, and the gateway selection sub-module 103 receives the gateway update information sent from the link state calculation sub-module 101, and the gateway updates.
  • the information includes the destination MAC address and the link state average, and the gateway selection sub-module 103 updates the gateway list according to the received gateway update information.
  • the specific gateway selection sub-module 103 searches the gateway list for the network access device MAC address as the gateway update information. If the entry of the destination MAC address entry can be found in the gateway list, the link state average of the entry is updated to the link state average value in the gateway update information, and cannot be found in the gateway list.
  • the above entry is new in the gateway list. Adding a record, the MAC address of the newly added network access device is the destination MAC address in the gateway update information, and the link state of the newly added record is the link state average value in the gateway update information.
  • the gateway selection sub-module 103 receives the gateway query request sent from the data transceiving sub-unit 81, and searches for the entry with the largest link state average value in the gateway list. If the entry is not found in the gateway list (the gateway list is empty) , the communication process is abandoned; if the above entry can be found in the gateway list (the gateway list is not empty), the gateway query response is sent to the data transceiver sub-unit 81, and the gateway query response includes the gateway list.
  • each network extension device in the present invention records, by using a maintenance gateway list, a correspondence relationship between optimal link states (maximum link state average values) that can be achieved by each network access device, in each of the above network access devices.
  • the network access device with the highest link state average value is selected as the network access device that finally receives the data of the network expansion device (ie, the final receiving device of the network expansion device), and can ensure the network expansion device and the above as the final receiving device.
  • the network access devices are in an optimal communication state.
  • the data transceiver sub-unit 81 sends a route query request to the routing table sub-module 102 according to the gateway query response.
  • the route query request includes a destination MAC address
  • the destination MAC address in the route query request is the MAC address of the network access device in the gateway query response.
  • the address, the routing table sub-module 102 queries the fourth binding table for the destination MAC address as the entry of the destination MAC address in the routing query request, and discards the current communication if it cannot be found, and if it is found, the data transceiver sub-unit 81 Sending a route query response, where the route query response includes a next hop MAC address in the entry found in the fourth binding table.
  • the networking unit 61 determines the optimal network access device and selects the optimal next hop device among the adjacent one hop devices of the device with the above-mentioned optimal network access device as the destination device, and transmits and receives data.
  • the sub-unit 81 constructs and transmits a load data frame according to the gateway query response and the route query response.
  • the receiver MAC address of the payload data frame constructed by the specific data transceiver sub-unit 81 is the next-hop MAC address in the route query response, and the foregoing data.
  • the sender MAC address of the payload data frame constructed by the transceiver subunit 81 is the MAC address of the data transceiving subunit 81.
  • the frame body of the payload data frame constructed by the data transceiving subunit 81 is the payload data tag, the MAC address of the final receiving device, and
  • the MAC address of the final receiving device in the frame body of the payload data frame constructed by the data transceiver subunit 81 is the MAC address of the network access device in the gateway query response. This can ensure that the IP data packet is transmitted to the selected optimal network access device according to the optimal communication path, and when the other device on the multi-hop path receives the payload data frame, the frame of the load data frame is extracted.
  • the MAC address of the final receiving device in the body can directly determine the MAC address of the network access device that ultimately receives the payload data frame.
  • the forwarding sub-module 104 receives the updated link state message sent from the link state calculation sub-module 101, and performs the following processing:
  • step (2) (1) determining whether the transmission distance of the link state packet is less than or equal to 1, and if so, discarding the link state packet, and not forwarding the link state packet, if not, proceeding to step (2);
  • the transmission distance of the link state message is decremented by one and sent to the data transceiving subunit 81, and the processed link state message sent by the forwarding submodule 104 to the data transceiving subunit 81 is forwarded.
  • Link status message The data transceiver sub-unit 38 receives the forwarded link state message sent from the forwarding sub-module 104 and encapsulates the forwarded link state message into a routing data frame, and the receiving MAC address of the routing data frame is broadcast.
  • the address FF: FF: FF: FF: FF: FF, the sender MAC address of the routing data frame is the MAC address of the data transceiving subunit 81, and the frame body of the routing data frame is the routing data tag and the forwarded link state. Message.
  • the networking unit 61 includes a timing update subunit 84. Handle the above situation. Specifically, the timing update sub-unit 84 periodically traverses the pre-processing record table maintained by the pre-processing sub-unit 83 at a certain time interval, and determines the difference between the latest reception time and the current time for each record in the pre-processing record table.
  • the value exceeds a certain threshold it indicates that the routing information of the destination device corresponding to the original sender MAC address maintained by the device is not up to date, and the routing information of the device destined for the device needs to be deleted.
  • Delete the record in the pre-processing record table set the original sender MAC address of the record to delay_mac, and delete the table with the destination MAC address as delay_mac in the second binding table maintained by the link state calculation sub-module 101.
  • the entry with the destination MAC address being the delay_mac is deleted, and the table with the destination MAC address being the delay_mac is deleted in the fourth binding table maintained by the routing table sub-module 102.
  • the entry of the network access device whose MAC address is delay_mac is deleted.
  • the timing update sub-unit 84 periodically traverses the second binding table maintained by the link state calculation sub-module 101 according to a certain time interval, and determines the latest reception time and the current time for each record in the second binding table. The difference, if the difference exceeds a certain threshold, indicating that the routing information of the neighboring one-hop device of the device corresponding to the candidate routing MAC address maintained by the device is not up-to-date, the second binding table is Delete the record, set the destination MAC address of the record to goal_mac, and the candidate route MAC address to select_mac.
  • the state calculation sub-module 51 searches the third binding table for the entry with the destination MAC address as the goal_mac, and selects the entry with the largest link state value from the table entry found in the third binding table to the routing table.
  • the sub-module 52 sends routing update information, where the routing update information includes the destination MAC address of the selected entry and the candidate routing MAC address of the selected entry.
  • the network sharing system of the present invention includes a plurality of network access devices and a plurality of network expansion devices, and the network access device is directly connected to the Internet and provides wireless for intelligent terminals within the coverage of the network access device.
  • the intelligent terminal can access the Internet by accessing the wireless network provided by the network access device; the network access device and the network expansion device form a wireless self-organizing network, and the network expansion device is connected to the network access device through the wireless self-organizing network, thereby indirectly Connected to the Internet, and the network expansion device provides wireless network services for the intelligent terminals in the coverage area thereof, and the intelligent terminal can access the Internet through the wireless network provided by the access network expansion device, and the communication object of the network access device includes the intelligent terminal of its own service. , other network access devices and network expansion devices.
  • the communication objects of the network expansion device include intelligent terminals, network access devices and other network expansion devices that are self-serviced.
  • Each network access device and each network extension device in the network sharing system of the present invention periodically generates and transmits a link state message, and each device in the network sharing system according to the present invention receives After the link state message is processed, the link state message is sent out.
  • Each device in the network sharing system of the present invention will generate the link state message originally generated by the device.
  • the device of the link state message is a destination device, and the neighboring one hop device of the device that transmits the link state message originally generated by the device to the device is used as a candidate for the device to transmit data to the destination device.
  • the link state message generated by the network access device includes a gateway tag, and the network extension device identifies, by using the gateway tag, whether the link state message received by the network extension device is originally generated by the network access device, and the network extension device is based on the network access.
  • the link state message originally generated by the device maintains the gateway information, and after the network extension device receives the link state message originally generated by the network access device, the original link is generated.
  • the network access device of the status message is used as a candidate network access device, and the network expansion device selects the optimal one among the candidate network access devices of the network expansion device as the network connection selected when the network expansion device transmits data to the Internet.
  • the link state message originally generated by the network extension device includes the terminal information, and after receiving the link state message originally generated by the network extension device, the network access device can determine the link state message originally generated by the network extension device. Terminal information (correspondence between the network expansion device and the intelligent terminal served by the network extension device).
  • Each network access device in the network sharing system of the present invention maintains routing information and terminal information.
  • Each network extension device in the network sharing system of the present invention maintains routing information and gateway information, routing information, The terminal information and the gateway information are the basis for the normal operation of the network sharing system of the present invention. The specific communication process is given below.
  • the smart terminal For the case where the smart terminal served by a network access device accesses the Internet, the smart terminal sends the IP data packet sent by the smart terminal to the Internet to the client access subunit 21 of the network access device for which the wireless network service is provided.
  • the client access subunit 21 extracts the destination IP address of the IP data packet after receiving the IP data packet, and when the IP data packet is sent to the Internet according to the destination IP address, the client accesses the subunit 21 to the IP address.
  • the data packet is sent to the data unit 13, and the data unit 13 transmits the IP data packet to the gateway unit 12.
  • the gateway unit 12 performs NAT processing on the IP data packet and sends it to the Internet.
  • the gateway unit 12 performs NAT processing on the IP data packet sent from the Internet, and then sends the data packet to the data unit 13, and the data unit 13 receives the IP data packet and extracts the IP data.
  • the destination IP address of the packet if the destination IP address is the IP address of a certain intelligent terminal served by the client access subunit 21 of the wireless service unit 15 of the network access device, the data unit 13 will use the IP packet.
  • the client access subunit 21 is sent to the wireless service unit 15, and the client access subunit 21 sends the IP data packet to the client access subunit 21 according to the destination IP address of the IP data packet.
  • Corresponding intelligent terminal if the data unit 13 determines that the destination IP address of the IP data packet is not the IP address of a smart terminal served by the client access subunit 21 of the wireless service unit 15 of the network access device, then The data unit 13 sends the IP data packet to the data transceiving subunit 31 of the networking unit 14, and after receiving the IP data packet, the data transceiving subunit 31 extracts the destination IP address of the IP data packet, and based on the The destination IP address first sends an address query request to the ARP unit 11, the address query request includes the destination IP address of the IP data packet, and the ARP unit 11 sends an address query response to the data transceiver subunit 31, where the address query response includes the address query.
  • the service information sub-unit 34 sends a service query response to the data transceiving sub-unit 31 according to the service query request, the service query response includes the MAC address in the service query request.
  • the corresponding intelligent terminal provides the MAC address of the network extension device of the wireless network service, and then the data transceiver sub-unit 31 sends a route query request to the routing sub-unit 32.
  • the route query request includes the destination MAC address, and the destination MAC address in the route query request is MAC address of the network expansion device in the service query response
  • the routing sub-unit 32 searches the fourth binding table in the routing query request for the same entry as the destination MAC address in the routing query request, and searches the obtained table according to the destination MAC address in the routing query request.
  • the next hop MAC address in the item is sent to the data transceiving subunit 31 as a route query response, and the data transceiving subunit 31 constructs and transmits a load data frame according to the route query response, and the receiver of the load data frame constructed by the data transceiving subunit 31 is received.
  • the MAC address is the next hop MAC address in the route query response
  • the sender MAC address of the payload data frame constructed by the data transceiver subunit 31 is the MAC address of the data transceiver subunit 31 in the device
  • the data transceiver subunit 31 The frame body of the constructed payload data frame is the payload data tag, the MAC address of the final receiving device, and the above-mentioned IP data transmitted from the data unit 13.
  • the MAC address of the final receiving device of the frame body of the payload data frame constructed by the data transceiver subunit 31 is the MAC address of the network extension device in the service query response.
  • the data transceiver subunit 31 receives the load data frame transmitted from the network extension device or other network access device. Afterwards, the data transceiver subunit 31 extracts the MAC address of the final receiving device in the frame body of the received load data frame, and if the MAC address of the final receiving device is the MAC address of the network access device, the data transceiver subunit Extracting the IP data packet in the frame body of the received load data frame and transmitting it to the data unit 13, the data unit 13 transmitting the IP data packet to the gateway unit 12 after receiving the IP data packet, the gateway unit 12 After receiving the IP data packet, the IP data packet is subjected to NAT processing and then sent to the Internet; if the MAC address of the final receiving device is not the MAC address of the network access device, the data transceiver sub-unit 31 first routes to the Internet.
  • the sub-unit 32 sends a route query request, where the route query request includes a destination MAC address, and the destination MAC address in the route query request is the final receiving
  • the routing sub-unit 32 searches the fourth binding table in the routing query request for the same entry as the destination MAC address in the routing query request according to the destination MAC address in the routing query request, and
  • the next hop MAC address in the found entry is sent to the data transceiving subunit 31 as a route query response, and the data transceiving subunit 31 constructs a load data frame according to the route query response and transmits the load configured by the data transceiving subunit 31.
  • the sender MAC address of the data frame is the next hop MAC address in the route query response
  • the sender MAC address of the payload data frame constructed by the data transceiver subunit 31 is the MAC address of the data transceiver subunit 31, and the data transceiver subunit
  • the frame body of the load data frame of 31 is the payload data flag, the MAC address of the final receiving device, and the IP data packet
  • the MAC address of the final receiving device of the frame body of the payload data frame constructed by the data transceiver subunit 31 is the above data transmission and reception.
  • the MAC address of the final receiving device in the frame body of the payload data frame received by the subunit 31, constructed by the data transceiving subunit 31 The IP packet of the frame body of the payload data frame is an IP packet in the frame body of the payload data frame received by the data transceiver subunit 31.
  • the smart terminal When the smart terminal served by a network extension device accesses the Internet, the smart terminal sends the IP data packet sent by the smart terminal to the Internet to the client access subunit 71 of the network expansion device that provides the wireless network service for the smart terminal.
  • the client access subunit 71 extracts the destination IP address of the IP data packet after receiving the IP data packet, and when the IP data packet is sent to the Internet according to the destination IP address, the client access subunit 71
  • the IP data packet is sent to the data transceiving sub-unit 81.
  • the data transceiving sub-unit 81 After receiving the IP data packet, the data transceiving sub-unit 81 first sends a gateway query request to the routing sub-unit 82, and the routing sub-unit 82 sends a gateway to the data transceiving sub-unit 81.
  • the query response, the gateway query response includes a MAC address of a network access device, and the network access device acts as an optimal data receiving device for the network extension device to transmit data to the Internet, and then the data transceiver sub-unit 81 sends a route to the routing sub-unit 82.
  • the query request includes a destination MAC address, and the destination MAC address in the route query request is the gateway query.
  • the routing sub-unit 82 searches for the destination MAC address in the fourth binding table maintained by the destination MAC address in the routing query request to be the same as the destination MAC address in the routing query request.
  • next hop MAC address in the found entry is sent to the data transceiver sub-unit 81 as a route query response, and then the data transceiver sub-unit 81 constructs a load data frame according to the gateway query response and the route query response.
  • the sender MAC address of the payload data frame constructed by the data transceiver unit 81 is the next hop MAC address in the route query response, and the sender MAC address of the payload data frame constructed by the data transceiver subunit 81 is data transmission and reception.
  • the MAC address of the subunit 81, the frame body of the payload data frame constructed by the data transceiving subunit 81 is the payload data tag, the MAC address of the final receiving device, and the IP data packet, and the frame of the payload data frame constructed by the data transceiving subunit 81
  • the MAC address of the final receiving device in the body is the above
  • the gateway queries the MAC address of the network access device in the response, and the IP data packet in the frame body of the payload data frame constructed by the data transceiver subunit 81 is received by the data transceiver subunit 81 and transmitted from the client access subunit 71. IP packet.
  • the data transceiver sub-unit 81 When the networking unit of the network extension device receives the load data frame sent from the network access device or other network expansion device, the data transceiver sub-unit 81 receives the load data frame sent from the network access device or other network expansion device. The data transceiver sub-unit 81 extracts the MAC address of the final receiving device in the frame body of the received load data frame. If the MAC address of the final receiving device is the MAC address of the network extension device, the data transceiver sub-unit 81 extracts The IP data packet in the frame body of the received payload data frame is sent to the client access subunit 71 of the wireless service unit 62.
  • the client access subunit 71 After receiving the IP data packet, the client access subunit 71 is configured according to the The IP address of the IP data packet is sent to the corresponding intelligent terminal served by the client access subunit 71; if the MAC address of the final receiving device is not the MAC address of the network extension device, the data transceiver The unit 81 first sends a route query request to the routing subunit 82.
  • the route query request includes a destination MAC address, and the destination in the route query request.
  • the MAC address is the MAC address of the final receiving device, and the routing sub-unit 82 searches for the destination MAC address in the fourth binding table maintained by the destination MAC address in the routing query request to be the same as the destination MAC address in the routing query request.
  • the data entry is sent to the data transceiver sub-unit 81 as a route query response, and the data transceiver sub-unit 81 constructs a load data frame according to the route query response and transmits the data.
  • the receiver MAC address of the payload data frame constructed by the sub-unit 81 is the MAC address of the optimal next hop in the route query response
  • the sender MAC address of the payload data frame constructed by the data transceiver sub-unit 81 is the data transceiver sub-unit 81.
  • the frame body of the payload data frame constructed by the data transceiver subunit 81 is the payload data tag, the MAC address of the final receiving device, and the IP data packet, and the final frame body of the payload data frame constructed by the data transceiving subunit 81 is finalized.
  • the MAC address of the receiving device is the MAC address of the final receiving device in the frame body of the payload data frame received by the data transceiver subunit 81.
  • IP payload data packet frame body of the frame body IP data payload data transceiving said data frame sub-unit 81 configured as above-described packet data transmission and reception unit 81 receives the sub-frame in the.
  • the network sharing system of the present invention innovates a plurality of network access devices and network expansion devices, and the network access device and the network expansion device both provide wireless network services, which greatly expands the coverage of the wireless network and has a broad scope.
  • Proven application prospects, an embodiment of the invention is given below.
  • the network access device and the network expansion device in the present invention are respectively selected in the adjacent one-hop device of the device by using the embodiment.
  • the optimal device as the process of the next hop and the process of selecting the optimal network access device by the network expansion device and the multi-hop mode by means of the optimal next hop device selected above and the above-mentioned optimal network access device
  • the process of transmitting a data packet exchanged between the intelligent terminal and the Internet assuming that, in the initial situation, the network sharing system of the present invention includes a network access device a, a network access device b, a network expansion device c, a network expansion device d,
  • the network expansion device e and the network expansion device f the relative positions of the above six devices and the corresponding relationship of the intelligent terminals served by the above six devices are as shown in FIG.
  • the IP address allocation process is as follows: the IP address is represented by 32 bits in binary, the IP is represented by 8 bits in hexadecimal, the MAC address is represented by binary in 48 bits, and the MAC address is represented by 12 bits in hexadecimal.
  • a, b, c, d, e are the first two digits of the IP address assigned by the intelligent terminal (the first two digits when the IP address is represented by 8-bit hexadecimal, that is, the first 8 when the IP address is represented by 32-bit binary Bit) is the same and both are 0A (hexadecimal), let client1_mac be 0A0B0C0D0E0F (for the sake of simplicity, the MAC address, where the MAC address is expressed in hexadecimal, and this MAC address is generally expressed as 0A:0B:0C: 0D:0E:0F, here to explain the calculation process omits ":", the same below), a uses the MD5 algorithm to calculate 0A0B0C0D0E0F 128-bit binary number, for the sake of brevity, the above calculated 128-bit binary number is converted to The hexadecimal number is 348C7D6F98BEC35CEAF39
  • the IP address assigned by a for client1 is 0A7F173F in hexadecimal, and the IP address indicated by the above hexadecimal is converted into a point.
  • Decimal It is 10.127.23.63, that is, the IP address assigned by a is client1 is 10.127.23.63; the client2_mac is 0B0C0D0E0F0A, a uses the MD5 algorithm to calculate 0B0C0D0E0F0A to obtain a 128-bit binary number. For the sake of brevity, the 128-bit binary number calculated above is converted.
  • the IP address assigned by a for client2 is 0AA89E75 in hexadecimal, and the IP address represented by the above hexadecimal is converted into a point.
  • the decimal point is 10.168.158.117, that is, the IP address assigned by a2 for client2 is 10.168.158.117;
  • the client5_mac is 0C0D0E0F0A0B, and c is calculated by the MD5 algorithm to obtain a 128-bit binary number for the 0C0D0E0F0A0B.
  • the above-mentioned 128-bit binary is calculated.
  • the number is converted to hexadecimal as 05BFF7A28F867C9254C8E7EDC5311D4C.
  • the 6 digits are 311D4C, then the IP address assigned by c for client5 is represented by 0A311D4C in hexadecimal, and the IP address of the above hexadecimal representation is converted.
  • the dotted decimal point is 10.49.29.76, that is, the IP address assigned by c to client5 is 10.49.29.76;
  • A, b, c, d, and e all allocate IP addresses to the intelligent terminals accessing the network sharing system in the above manner, so as to avoid conflicts between the IP addresses of the smart terminals accessing the network sharing system.
  • the network access device generates the original link state packet and sends it.
  • the original sender MAC address of the original link state packet is a_mac
  • the transmission distance of the original link state packet generated by a is a_distance
  • the link state value of the original link state packet generated by a is a_max
  • a The sequence number of the original link state message generated is a_num, where a is the network access device, so the original link state message generated by a sets the gateway tag, and a is the network access device, so the original link state generated by a
  • the packet does not include the terminal information.
  • A encapsulates the original link state packet into a routing data frame and then sends it out in broadcast according to the 802.11 standard.
  • the receiver MAC address of the a-encapsulated routing data frame is the broadcast address FF: FF. : FF: FF: FF: FF, the sender MAC address of the a-encapsulated routing data frame is a_mac, and the frame body of the a-encapsulated routing data frame is a routing data tag and the original link state message; example
  • the original extension state MAC address of the original link state packet generated by e is e_mac, and the transmission distance of the original link state packet generated by e is e_distance, e
  • the link state value of the original link state packet is e_max, and the sequence number of the original link state packet generated by e is e_num, where e is a network extension device.
  • the original link state packet generated by e does not have a gateway.
  • e is a network expansion device, so the original link state message generated by e includes terminal information, and the original link shape generated by e
  • the terminal information of the state message is the MAC address client9_mac of the smart terminal client9 of the e-service and the MAC address client10_mac sent by the smart terminal client10 of the e-service.
  • the e-mail encapsulates the original link state packet into a routing data frame and broadcasts according to the 802.11 standard.
  • the sender MAC address of the e-encapsulated routing data frame is the broadcast address FF: FF: FF: FF, and the sender MAC address of the e-encapsulated routing data frame is e_mac, the above e-package
  • the frame body of the routing data frame is a routing data tag and the above original link state message.
  • A, b, c, d, and e all maintain routing information for devices targeting other devices, and a, b, c, d, and e maintain the above by processing link state messages of the frame body of the received routing data frame. Routing information, for the network access device, the network access device also needs to maintain the information (ie, terminal information) corresponding to the intelligent terminal served by the network expansion device and the network expansion device, and a is used as an example to describe the maintenance of the network access device.
  • the information ie, terminal information
  • gateway information the optimal network access device selected by the network expansion device in addition to the maintenance of the routing information
  • the maintenance preprocessing record table is used to determine whether the received link state message needs to be further processed. For example, the preprocessing record table is used.
  • the maintenance process set a maintenance preprocessing record table as shown in Table 5 below:
  • a receives the link state message sent from b at time t7, the original sender MAC address of the link state message is b_mac, and the sequence number of the link state message is 27, in the preprocessing record table.
  • the entry of the original sender MAC address is the b_mac entry, and the foregoing entry is found in the pre-processing record table, and the sequence number of the entry is 26, and the sequence number of the obtained entry is smaller than the link state packet.
  • the sequence number is considered to further process the link state message, and the sequence number of the above entry is updated to 27 and the latest receiving time of the entry is updated to t7; a is received and sent at time t8.
  • the original sender MAC address of the link state packet is d_mac
  • the sequence number of the link state packet is 30, and the original sender MAC address is searched in the preprocessing record table.
  • the d_mac entry may be found in the pre-processing record table, and the sequence number of the above-mentioned entry is 31, and the sequence number of the above-mentioned listed entry is greater than the serial number of the link state message, link The status message is not up-to-date and the link state message is discarded, and the link state message is not further processed; a receives the link state message sent from c at time t9, and the link state message is If the original sender MAC address is e_mac and the sequence number of the link state packet is 30, the table of the original sender MAC address is e_mac is found in the preprocessing record table.
  • the above table can be found in the preprocessing record table. If the sequence number of the entry is 28, and the sequence number of the above-mentioned entry is smaller than the sequence number of the link state packet, it is considered that the link state message needs to be further processed, and the table is further The serial number of the item is updated to 30 and The latest receiving time of the foregoing entry is updated to t9; the following link state messages for maintaining routing information and terminal information are link state messages that are considered to require further processing after the maintenance process of the preprocessing record table.
  • the maintenance service information table is used to record the information (ie, terminal information) of the correspondence between the network expansion device and the intelligent terminal served by the network expansion device, and the maintenance process of the service information table is exemplified.
  • the service information table maintained by a is as shown in Table 6 below. Shown as follows:
  • Table 6 shows an example of service information maintained by the network access device a
  • the smart terminal MAC address of the network extension device MAC address d_mac entry is only client7_mac, then a new record is added to the service information table.
  • the MAC address of the network extension device that is added to the record is d_mac and the MAC address of the smart terminal is client8_mac; a receives the link state message of the original sender MAC address sent from c as e_mac, and the link state message includes the terminal information,
  • the terminal information includes the smart terminal MAC address client9_mac and the smart terminal MAC address client10_mac, and the smart terminal MAC address of the network extension device whose MAC address is e_mac in the service information table has client9_mac, client10_mac, and client13_mac, and the terminal in the link state message
  • the information does not include the smart terminal MAC address client13_mac, then the service In the information table, the entry of the network extension device whose MAC address is e_mac and the smart terminal MAC address is client13_mac is deleted, and a maintains the terminal information in this manner.
  • the data sent by the maintenance of the first binding table calculation a is successfully received by the adjacent one hop device (including b, c, d) of a and forwarded by the adjacent one hop device (including b, c, d) of a and The probability of being successfully received by a is used to illustrate the maintenance process of the first binding table. Assume that the first binding table maintained by a is as shown in Table 7 below:
  • the superimposed queue corresponding to the entry of the candidate route MAC address b_mac in Table 7 is the superposition queue 1
  • the superposition queue corresponding to the entry of the candidate route MAC address c_mac in Table 7 is the superposition queue 2, which is called Table 7.
  • the superimposed queue corresponding to the entry of the candidate route MAC address d_mac is the superposition queue 3, and the storage and removal processes of the elements of the superposition queue 1, the superposition queue 2, and the superposition queue 3 are kept synchronized, as shown in FIG. 12(a).
  • the ratio of the number of serial numbers in the superposition queue 1, the superposition queue 2, and the superposition queue 3 to the length of the superimposed queue respectively represents the superimposed value of the corresponding entry in Table 7, that is, On this basis, as shown in FIG.
  • a receives a link state message with the original sender MAC address of a being sent from a_mac and the sequence number of the link state message is 37, and then superimposes
  • the serial number 37 is stored in the queue 1, and the superposition value of the entry corresponding to the superposition queue 1 is Adding an empty element to the overlay queue 2, and superimposing the value of the entry corresponding to the queue 2 Adding an empty element to the superposition queue 3, and superimposing the superposition value of the corresponding item of the superposition queue 3
  • the superposition value of the entry corresponding to the superposition queue 1, the superposition queue 2, and the superposition queue 3 is updated in the first binding table maintained by a. On the basis of this, as shown in FIG. 12(c), a is received and sent from d.
  • the original sender MAC address is a link state packet of a_mac and the sequence number of the link state packet is 38
  • an empty element is stored in the overlay queue 1
  • the superposition value of the entry corresponding to the superposition queue 1 is Adding an empty element to the overlay queue 2, and superimposing the value of the entry corresponding to the queue 2
  • the serial number 38 is stored in the superposition queue 3, and the superposition value of the entry corresponding to the superposition queue 3 is The superposition value of the entry corresponding to the superposition queue 1, the superposition queue 2, and the superposition queue 3 is updated in the first binding table maintained by a.
  • a is received and sent from c.
  • the original sender MAC address is a link state packet of a_mac and the sequence number of the link state packet is 40
  • two empty elements are sequentially stored in the overlay queue 1, and the superposition of the entry corresponding to the queue 1 is superimposed.
  • Value An empty element and a serial number 40 are sequentially stored in the superposition queue 2
  • the superposition value of the entry corresponding to the superposition queue 2 is
  • Two empty elements are sequentially stored in the superposition queue 3
  • the superposition values of the items corresponding to the superposition queue 3 are The superimposed values of the entries corresponding to the superposition queue 1, the superposition queue 2, and the superposition queue 3 are updated in the first binding table maintained by a.
  • the problem to be solved by the present invention is to select an optimal adjacent hop from a plurality of adjacent one hop devices of the device during multi-hop data transmission.
  • the device transmits data as the next hop.
  • the phase in a Only the b is selected as an example in the adjacent one-hop device listed in Table 8):
  • the receiving queue corresponding to the entry with the destination MAC address being e_mac and the candidate routing MAC address being c_mac in Table 8 is the receiving queue 1, and the entry corresponding to the destination MAC address being e_mac and the candidate routing MAC address being d_mac is corresponding in Table 8.
  • the receiving queue is the receiving queue 2, and the receiving queue corresponding to the entry in the table 8 whose destination MAC address is e_mac and the candidate routing MAC address is b_mac is the receiving queue 3, and the receiving queue 1, the receiving queue 2, and the receiving queue 3 correspond to each other.
  • the destination MAC address of the entry is the same, and the process of receiving and removing the elements of the receiving queue 1, the receiving queue 2, and the receiving queue 3 is synchronized, as shown in FIG.
  • a receives a link state message with the original sender MAC address of e_mac sent from d and the sequence number of the link state message is 47, and then receives The queue number is stored in queue 2, and the received value of the entry corresponding to queue 2 is the received value.
  • An empty element is stored in the receiving queue 1, and the receiving value of the entry corresponding to the receiving queue 1 is An empty element is stored in the receiving queue 3, and the receiving value of the entry corresponding to the receiving queue 3 is The received values of the entries corresponding to the receiving queue 1, the receiving queue 2, and the receiving queue 3 are updated in the second binding table maintained by a.
  • Received value Two empty elements are stored in the receiving queue 1, and the receiving value of the entry corresponding to the receiving queue 1 is Two empty elements are stored in the receive queue 2, and the received value of the entry corresponding to the receive queue 2 is The received value of the entry corresponding to the receive queue 1, the receive queue 2, and the receive queue 3 is updated in the second binding table maintained by a.
  • a is received and sent from c. If the original sender MAC address is the link state packet of e_mac and the sequence number of the link state packet is 50, the sequence number 50 is stored in the receiving queue 1, and the receiving value of the entry corresponding to the queue 1 is received.
  • An empty element is stored in the receiving queue 2, and the receiving value of the entry corresponding to the receiving queue 2 is An empty element is stored in the receiving queue 3, and the receiving value of the entry corresponding to the receiving queue 3 is
  • the received values of the entries corresponding to the receiving queue 1, the receiving queue 2, and the receiving queue 3 are updated in the second binding table maintained by a. In this way, a is based on a and b, c, d in a predetermined time period.
  • the link state value is that a selects an optimal neighboring one hop device from a plurality of adjacent one hop devices (including b, c, d) of a as a next hop to transmit data in the process of multi-hop data transmission.
  • An important basis for the calculation of the link state value If a link state message is sent from the original sender MAC address of e_mac and the link state value of the link state packet is link_state, a In the first binding table maintained in a (Table 7), look up the entry with the candidate route MAC address being c_mac. The superimposed value of the above entry is multi2, and a is in the second binding table maintained in a (Table 8).
  • the calculated link state value indicates a link state when a device with e is the destination device and c is the link state when the data is sent by the next hop device; a determines the transmission distance of the link state message, and if the link state message is transmitted If the distance is less than or equal to 1, the link state packet is discarded, and a does not forward the link state packet. If the link state packet transmission distance is greater than 1, the a link state packet needs to be updated. Then, the link state value of the link state packet is updated to the calculated link state value, and the transmission distance of the link state packet is decreased by 1.
  • the updated link state packet is encapsulated as a routing data frame and then sent out.
  • the receiving MAC address of the routing data frame constructed above is the broadcast address FF: FF: FF: FF: FF, and the routing data frame constructed as described above.
  • the sender MAC address is a_mac, and the frame body of the routing data frame constructed above is the route data label route_lable and the updated link state message.
  • a Determine the relationship between a and the destination device (including b, c, d, e, f) by calculating the average of the last few link states of a and the destination device (including b, c, d, e, f)
  • the link state, a maintains the correspondence between the link state averages by maintaining the third binding table, and illustrates the maintenance process of the third binding table, and assumes that the third binding table maintained by a is as shown in Table 9 below.
  • the problem to be solved by the present invention is to select an optimal adjacent one-hop device from multiple adjacent one-hop devices of the device to transmit data as a next hop during multi-hop data transmission, when the device When the adjacent one-hop device of the device is the destination device, the problem of multi-hop data transmission is not involved. Therefore, in order to make the example more representative, only b is selected as an example in the adjacent one-hop device of a in Table 9. Listed in).
  • MAC address is the link status e_mac link state packets and calculates the value of a 4, then the link status is stored in a queue in the mean value a 4, updates the link status table entry corresponding to the mean average queue 1 For (a 2 + a 3 + a 4 )/3, on the basis of this, as shown in FIG. 14(c), a receives the link state message of the original sender MAC address sent from c as e_mac and calculates link state value after a 5, then stored in a queue in the link state mean values a 5, a queue corresponding to the mean update the link state entries mean (a 3 + a 4 + a 5) / 3. On the basis of this, as shown in FIG.
  • a receives the link state message of the original sender MAC address sent from c as e_mac and the calculated link state value is a 6 , then Mean team The link state value a 6 is stored in column 1, and the link state average of the entry corresponding to the update averaging queue 1 is (a 4 + a 5 + a 6 ) / 3.
  • the fourth binding table maintained by a is updated according to the third binding table maintained by a, and the maintenance process of the fourth binding table is illustrated. It is assumed that the fourth binding table maintained by a is as shown in Table 10 (the problem to be solved by the present invention is to focus on selecting an optimal neighbor from a plurality of adjacent one-hop devices of the device in the process of multi-hop data transmission.
  • the one-hop device transmits data as the next hop.
  • the problem of multi-hop data transmission is not involved. Therefore, in order to make the example more representative, in a Of the adjacent one-hop devices, only b is selected as an example listed in Table 10.
  • a receives the link state message of the original sender MAC address f_mac sent from d, a calculates and updates the destination MAC address in the third binding table (Table 9) maintained by a based on the link state message.
  • the value of the link state of the entry that is f_mac and the candidate route MAC address is d_mac is avg8, and the entry in the third binding table is the entry with the destination MAC address being f_mac.
  • the link state average value is the largest.
  • the entry in the table is the fourth binding table maintained in a (Table 10), if the entry with the highest link state value is the one whose destination MAC address is f_mac and the candidate route MAC address is d_mac. Find the entry whose destination MAC address is f_mac and update the next hop MAC address of the above entry to d_mac.
  • the network access device a maintains the terminal information and the routing information in the above manner, and a receives the IP data packet transmitted from the client1, assuming that the destination IP address of the IP data packet transmitted from the client1 is 180.149.132.47, the first 8 digits of the IP address. (The first 8 digits when the IP address is represented by a 32-bit binary) is expressed as 180 in decimal. As mentioned above, the IP address assigned by a for client1 is 10.127.23.63, and the first 8 digits of the IP address of client1 (the IP address is 32). The first 8 digits of the binary representation) are expressed in decimal notation of 10, not 180.
  • A determines that the IP packet sent from client1 is the IP packet sent by client1 to the Internet, and a directly sends the IP packet of this client1 to the Internet. (Do not forward) to the Internet, the same reason, a IP service packet sent by the smart terminal client2 of the service to the Internet is directly sent (not forwarded) to the Internet, and a IP packet sent by the Internet to the intelligent terminal of the service is directly (Do not forward) to the corresponding intelligent terminal; a receives the IP data packet sent from the Internet and performs NAT processing on the IP data packet. If the destination IP address of the IP data packet after NAT processing is client9_ip, then a is based on ARP.
  • the MAC address client9_mac corresponding to client9_ip, a is found in the service information table (Table 6) maintained by a, and the MAC address of the smart terminal is client9_mac, and the MAC address of the network extension device of the entry found in the service information table.
  • the above IP packet is a packet for communication between the intelligent terminal served by the network extension device e corresponding to e_mac and the Internet, and a is found in the fourth binding table maintained in a (Table 10) as the destination MAC address is e_mac.
  • next hop MAC address of the entry found in the fourth binding table is c_mac
  • a selects c as the next hop and a encapsulates the IP data packet into a payload data frame and sends the above.
  • the sender MAC address of the payload data frame is c_mac
  • the sender MAC address of the payload data frame is a_mac
  • the frame body of the payload data frame is the payload data tag data_lable
  • the final receiving device MAC address in the frame body of the frame is e_mac.
  • the final receiving device MAC address in the frame body of the load data frame is e_mac, and the e-mac is used as the next hop according to the routing information maintained by c, c is according to the above
  • the load data frame constructs a new load data frame and transmits it again.
  • the sender MAC address of the load data frame of the c structure is e_mac, and the sender MAC address of the load data frame of the c structure is c_mac, and the load data frame of the c structure is configured.
  • the frame body is the IP data packet in the frame body of the payload data tag data_lable and the final receiving device MAC address and the above-mentioned load data frame sent to c, and the final receiving device MAC address in the frame body of the load data frame constructed by c above After e_mac;e receives the load data frame sent from c, e extracts the final receiving device MAC address in the frame body of the load data frame as e_mac, and e extracts the IP data packet in the frame body of the load data frame.
  • the destination IP address is client9_ip, and e directly sends the IP data packet in the frame body of the payload data frame to client9.
  • the above part takes a as an example to illustrate the process of the network access device maintaining routing information and terminal information.
  • the network access device directly transmits the IP data packet communicated between the intelligent terminal served by the network access device and the Internet, The IP data packet sent by the Internet to the intelligent terminal serviced by the network expansion device, the network access device determines the network expansion device that finally receives the IP data packet by maintaining the terminal information, and the network access device determines the network expansion device by using the maintenance routing information. For the optimal next hop device of the device of the destination device, if the other device on the multi-hop path is not the device that finally receives the IP packet, the device forwards the IP packet with the device that finally receives the IP packet. .
  • the network expansion device e determines whether the received link state message needs to be further processed by maintaining the pre-processing record table.
  • the pre-processing record table maintained by the e-preservation is the same as the table of the pre-processing record table maintained by a.
  • the process of processing the record table is the same as the process of maintaining the pre-process record table.
  • the link state messages used to maintain the routing information and the gateway information are the maintenance process of the pre-processing record table of e and are considered to be further processed. Link status message.
  • e calculates that the data sent by e by maintaining the first binding table is successfully received by the adjacent one hop device (including c, d, f) of e and is forwarded by the adjacent one hop device (including c, d, f) of e and The probability that e is successfully received, the first binding table maintained by e is the same as the entry of the first binding table maintained by a, and the process of updating the first binding table is the same as the process of updating the first binding table. .
  • e maintains the second binding table to calculate the neighboring one-hop device of e (including c, d, f), the probability that the transmitted data is successfully received by e, the second binding table maintained by e, and the second maintained by a
  • the binding table has the same entry, and the process of updating the second binding table is the same as the process of updating the second binding table.
  • e calculates the link state value in the same way as a calculates the link state value, e determines by calculating the average of the last few link states of the destination device (including a, b, c, d, f)
  • the link state between the e and the destination device (including a, b, c, d, and f), e records the correspondence between the link state averages by maintaining the third binding table, and the third binding table maintained by e
  • the process of updating the third binding table is the same as the process of updating the third binding table, and the third binding table maintained by e is as shown in Table 11 below.
  • the problem to be solved by the present invention is to select an optimal adjacent one-hop device from multiple adjacent one-hop devices of the device to transmit data as a next hop during multi-hop data transmission, when the device When the adjacent one-hop device of the device is the destination device, the problem of multi-hop data transmission is not involved. Therefore, in order to make the example more representative, only c is selected as an example in the adjacent one-hop device of e. And listed in Table 12; e maintains the fourth binding table, the fourth binding table maintained by e, and the fourth maintained by a The process of maintaining the fourth binding table is the same as the process of maintaining the fourth binding table. Each time the third binding table is updated, the fourth binding table needs to be updated according to the third binding table. The table is assumed to be maintained. The fourth binding table maintained by e is as shown in Table 12 below. After updating the third binding table, each time the link state message is set, the gateway list needs to be updated. The process, assuming that the list of gateways maintained by e is as shown in Table 13 below.
  • e receives the link state message of the original sender MAC address sent from c as a_mac, and e calculates and updates the destination MAC address in the third binding table (Table 11) maintained by e based on the link state message.
  • the value of the link state of the a_mac and the candidate route with the MAC address being c_mac is avg18, and e finds the entry with the destination MAC address a_mac in the third binding table, and selects the table with the largest link state average among the above entries.
  • the fourth binding table maintained in e (Table 12)
  • the entry of the destination MAC address is a_mac
  • the next hop MAC address of the entry is updated to c_mac
  • the gateway flag is set by the link state message of the original sender MAC address a_mac received by the e.
  • e needs to update the e-maintained gateway list based on the entry with the highest link state value (the destination MAC address is a_mac and the candidate route MAC address is c_mac) selected in the third binding table (Table 13).
  • Network access means a_mac MAC address entry and link state of the entry is updated to the mean avg18.
  • e receives the IP data packet sent by client9 to the Internet, and e searches for the network access device MAC address of the entry with the largest link state value and the highest link state average value in the gateway list (Table 13) maintained by e.
  • the corresponding network access device is the optimal network access device selected by e. If avg17 is greater than avg18, e will use b as the optimal network access device, and e needs to pass the above IP data packet through multi-hop.
  • the value of the next hop MAC address of the entry in the fourth binding table is d_mac.
  • the e-address is the b_mac entry in the fourth binding table (Table 12) maintained by the e.
  • e selects d as the next hop, e sends the above IP data packet as a payload data frame, and the sender MAC address of the load data frame is d_mac, and the sender MAC address of the load data frame is e_mac, the load
  • the frame body of the data frame is a load data tag data_lable and a final receiving device MAC address and the above IP data packet, and the final receiving device MAC address in the frame body of the load data frame is b_mac; d after receiving the load data frame, extracting the above load
  • the final receiving device MAC address in the frame body of the data frame is b_mac, d selects b as the next hop according to the routing information maintained by d, and d constructs a new load data frame according to the above load data frame.
  • the sender MAC address of the load data frame of the above d structure is b_mac
  • the sender MAC address of the load data frame of the d structure is d_mac
  • the frame body of the load data frame of the d structure is the load data flag data_lable and the final receiving device.
  • the final receiving device MAC address in the frame body of the load data frame of the d structure is b_mac; b receives the load data transmitted from d After the frame, b extracts the final receiving device MAC address in the frame body of the load data frame as b_mac, and b extracts the IP data packet in the frame body of the load data frame and the IP data in the frame body of the load data frame.
  • the packet is sent to the Internet. In this way, the IP data packet sent by the intelligent terminal serviced by the network expansion device to the Internet is sent to the Internet through the multi-hop path.
  • the IP data packet of the intelligent terminal serving the network extension device is received by the network access device, and the IP data packet is finally transmitted to the wireless terminal for providing the smart terminal through the multi-hop path transmission starting from the network access device.
  • Service network expansion device, network expansion device Sending the foregoing IP data packet to the corresponding intelligent terminal, so that the intelligent terminal can realize mutual communication with the Internet in two directions (reception and transmission) by accessing the wireless network provided by the network expansion device, and the network connection is previously performed.
  • the incoming device directly transfers (does not forward) the IP data packet communicated between the intelligent terminal served by the network access device and the Internet, so that the intelligent terminal can realize the two directions with the Internet by accessing the wireless network provided by the network access device. In this way, the intelligent terminal can realize mutual communication with the Internet by accessing the wireless network provided by the network sharing system.
  • the network sharing system and the network sharing method described in the patent application can be applied to all industrial fields that require Internet communication, in particular, it is required to arrange a fixed center without strong fixedness, and the network communication range is not restricted by the network central node, and the network
  • the industrial field of wireless self-organizing network sharing system with strong communication capability has strong industrial applicability.

Landscapes

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

Abstract

本发明提出一种网络分享系统和网络分享方法,本发明中的网络分享系统包括网络接入装置和网络拓展装置,网络接入装置连接到互联网并提供无线网络服务,网络接入装置与网络拓展装置形成无线自组织网络,网络拓展装置通过无线自组织网络连接网络接入装置从而间接连接到互联网并提供无线网络服务,所述网络接入装置和网络拓展装置都维护有路由信息,所述路由信息记录有本网络装置能够访问的各个目的网络装置地址与本网络装置访问各目的网络装置时最优选择的下一跳网络装置的地址之间的对应关系。本发明所述网络分享技术降低了无线网络的部署成本,多个网络接入装置保证了智能终端访问互联网时有足够的带宽,具有广阔的推广应用前景。

Description

一种网络分享系统和网络分享方法
本专利申请要求本申请人“尚一民”于2016年05月31日提交中国国家知识产权局的、申请号为“CN201610376433.6”、发明名称为“一种网络分享系统和网络分享方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明属于通信技术领域,尤其涉及一种网络分享系统和网络分享方法。
背景技术
智能终端(如手机、平板电脑、笔记本电脑)的普及为人们提供了更加便捷的生活方式,人们经常使用智能终端接入无线路由器提供的无线局域网来访问互联网,单个无线路由器的无线网络覆盖范围是有限的,为了拓展无线网络覆盖范围,一般采用部署多个无线路由器或者部署WDS(Wireless Distribution System,无线分布式系统)的方式,如果部署多个无线路由器,每个无线路由器都连接互联网,这导致无线网络部署成本上升;如果部署WDS,整个WDS只有一个网络出口,导致智能终端访问互联网时带宽受限。
发明内容
有鉴于此,本发明提出一种网络分享系统和网络分享方法,本发明中的网络分享系统包括网络接入装置和网络拓展装置,网络接入装置连接到互联网并提供无线网络服务,网络接入装置与网络拓展装置形成无线自组织网络,网络拓展装置通过无线自组织网络连接网络接入装置从而间接连接到互联网并提供无线网络服务,本发明创新的在网络接入装置和网络拓展装置中维护有路由信息,所述路由信息记录有本网络装置能够访问的各个目的网络装置地址与本网络装置访问各目的网络装置时最优选择的下一跳网络装置的地址之间的对应关系,从而通过本发明的网络分享系统大大降低了无线网络的部署成本,保证了智能终端访问互联网时有足够的带宽,具有广阔的推广应用前景,属于一种全新的网络分享技术。
本发明解决上述技术问题所采取的技术方案如下:
一种网络分享系统,包括至少一个网络接入装置和至少一个网络拓展装置,所述网络接入装置连接互联网,所述网络接入装置和网络拓展装置形成无线自组织网络,所述网络拓展装置通过网络接入装置来访问互联网,所述网络接入装置和网络拓展装置为各自覆盖范围内的使用终端提供无线网络服务,每个网络接入装置中都维护有网络接入路由信息,所述网络接入路由信息记录有本网络接入装置能够访问的各个目的网络装置的地址与本网络接入装置访问各目的网络装置时最优选择的下一跳网络装置的地址之间的对应关系,每个网络拓展装置中都维护有网络拓展路由信息,所述网络拓展路由信息记录有本网络拓展装置能够访问的各个目的网络装置的地址与本网络拓展装置访问各目的网络装置时最优选择的下一跳网络装置的地址之间的对应关系,所述目的网络装置为网络接入装置或网络拓展装置,所述下一跳网络装置为网络接入装置或网络拓展装置,所述网络接入装置覆盖范围内的使用终端与互联网之间通过网络接入装置建立通信链路,所述网络拓展装置覆盖范围内的使用终端与互联网之间通过网络拓展路由信息和/或网络接入路由信息确定的网络装置建立通信链路。
进一步的根据本发明所述的网络分享系统,其中每个网络接入装置中都维护有网络接入路由信息和服务信息,所述服务信息中记录有网络拓展装置的地址和该网络拓展装置覆盖范围内的使用终端的地址之间的对应关系,所述网络接入路由信息中记录的目的网络装置的地址包括服务信息中记录的网络拓展装置的地址;每个网 络拓展装置中都维护有网络拓展路由信息和网关信息,所述网关信息中记录有网络接入装置的地址,所述网络拓展路由信息中记录的目的网络装置的地址包括网关信息中记录的网络接入装置的地址。
进一步的根据本发明所述的网络分享系统,其中每个网络接入装置包括网络接入组网单元、数据分析单元和网络接入无线服务单元,所述网络接入组网单元包括路由子单元、数据收发子单元和服务信息子单元,所述网络接入无线服务单元为本网络接入装置覆盖范围内的使用终端提供无线网络服务,并连接于所述数据分析单元,所述网络接入组网单元连接于所述数据分析单元,所述数据分析单元连接于互联网;通过所述网络接入无线服务单元和数据分析单元实现本网络接入装置覆盖范围内的使用终端与互联网间的数据通信;通过所述数据分析单元和网络接入组网单元实现网络拓展装置覆盖范围内的使用终端与互联网间的数据通信;所述路由子单元中维护有路由分配表,所述网络接入路由信息为所述路由分配表中包括的若干分配记录表项,每个分配记录表项中记录有目的地址和候选分配路由地址的对应关系,所述目的地址为本网络接入装置能够访问的目的网络装置的地址,所述候选分配路由地址为本网络接入装置访问目的地址对应的目的网络装置时最优选择的下一跳网络装置的地址,所述服务信息子单元中维护有服务信息表,所述服务信息为服务信息表中包括的若干服务记录表项,每个服务记录表项记录有使用终端的地址和为该使用终端提供无线网络服务的网络拓展装置的地址之间的对应关系。
进一步的根据本发明所述的网络分享系统,其中每个网络拓展装置包括网络拓展组网单元和网络拓展无线服务单元,所述网络拓展组网单元包括路由子单元和数据收发子单元,所述网络拓展无线服务单元为本网络拓展装置覆盖范围内的使用终端提供无线网络服务;本网络拓展装置覆盖范围内的使用终端通过网络拓展无线服务单元和网络拓展组网单元与其他网络拓展装置或网络接入装置进行数据通信;所述路由子单元中维护有路由分配表和网关列表,所述网络拓展路由信息为所述路由分配表中包括的若干分配记录表项,每个分配记录表项中记录有目的地址和候选分配路由地址的对应关系,所述目的地址为本网络拓展装置能够访问的目的网络装置的地址,所述候选分配路由地址为本网络拓展装置访问目的地址对应的目的网络装置时最优选择的下一跳网络装置的地址,所述网关信息为网关列表中记录的网络接入装置的地址。
进一步的根据本发明所述的网络分享系统,其中在每个网络接入装置中,所述数据分析单元包括数据单元和网关单元,所述数据单元将来自网络接入无线服务单元的数据包通过网关单元发往互联网,并判断网关单元接收的来自互联网的数据包是否发往本网络接入装置覆盖范围内的使用终端,若是则通过网络接入无线服务单元将来自互联网的数据包发往所述使用终端,若否则将来自互联网的数据包发往网络接入组网单元中的数据收发子单元,所述数据收发子单元将来自互联网的数据包封装成负载数据帧进行发送,所述负载数据帧的发送方地址为所述网络接入组网单元中数据收发子单元的地址,所述负载数据帧的接收方地址为网络接入组网单元中路由子单元维护的路由分配表中目的地址与数据包最终接收地址相同的分配记录表项中的候选分配路由地址,所述负载数据帧的帧体包括来自互联网的所述数据包,同时所述网络接入组网单元中的数据收发子单元接收或转发来自其他网络装置的负载数据帧;每个网络拓展装置覆盖范围内的使用终端发送的数据包通过网络拓展无线服务单元发送至网络拓展组网单元,网络拓展组网单元将使用终端发送的数据包封装成负载数据帧进行发送,所述负载数据帧的发送方地址为网络拓展组网单元中 数据收发子单元的地址,所述负载数据帧的接收方地址为网络拓展组网单元中路由子单元维护的路由分配表中目的地址与网关列表中某一网络接入装置地址相同的分配记录表项中的候选分配路由地址,所述负载数据帧的帧体包括使用终端发送的数据包,同时所述网络拓展组网单元中数据收发子单元接收或转发来自其他网络装置的负载数据帧。
进一步的根据本发明所述的网络分享系统,其中所述网络接入装置和网络拓展装置中的路由子单元均包括有路由信息维护模块和原始链路状态报文产生模块,所述原始链路状态报文产生模块按照一定的时间间隔周期性地构造原始链路状态报文并通过数据收发子单元封装为原始路由数据帧后发送;所述网络接入装置产生的原始路由数据帧包括接收方地址、发送方地址和路由帧体,所述路由帧体包括原始链路状态报文,所述原始链路状态报文包括原始发送方地址、链路状态值、网关标记和序列号,所述原始发送方地址为网络接入装置中数据收发子单元的地址,所述链路状态值取最大值,所述序列号按固定步长递增变化;所述网络拓展装置产生的原始路由数据帧包括接收方地址、发送方地址和路由帧体,所述路由帧体包括原始链路状态报文,所述原始链路状态报文包括原始发送方地址、链路状态值、终端信息和序列号,所述原始发送方地址为网络拓展装置中数据收发子单元的地址,所述链路状态值取最大值,所述终端信息为本网络拓展装置覆盖范围内的使用终端的地址,所述序列号按固定步长递增变化;所述网络接入装置的路由信息维护模块接收、转发其他网络装置产生的路由数据帧,并在转发路由数据帧时更新路由数据帧中链路状态报文的链路状态值,更新后的链路状态值用于反应链路状态报文的原始发送方地址对应的网络装置和本网络接入装置之间的通信链路状态,所述网络接入装置中的路由信息维护模块基于路由数据帧维护路由分配表,所述路由分配表的每个分配记录表项中记录的目的地址为路由数据帧链路状态报文的原始发送方地址,记录的候选分配路由地址为使本网络接入装置到目的地址对应的网络装置的通信链路中链路状态稳定值最大的本网络接入装置的下一跳网络装置的地址;所述网络拓展装置的路由信息维护模块接收、转发其他网络装置产生的路由数据帧,并在转发路由数据帧时更新路由数据帧中链路状态报文的链路状态值,更新后的链路状态值用于反应链路状态报文的原始发送方地址对应的网络装置和本网络拓展装置之间的通信链路状态,所述网络拓展装置中的路由信息维护模块基于路由数据帧维护路由分配表,所述路由分配表的每个分配记录表项中记录的目的地址为路由数据帧链路状态报文的原始发送方地址,记录的候选分配路由地址为使本网络拓展装置到目的地址对应的网络装置的通信链路中链路状态稳定值最大的本网络拓展装置的下一跳网络装置的地址。
进一步的根据本发明所述的网络分享系统,其中所述网络接入装置和网络拓展装置的路由信息维护模块均基于路由数据帧维护有叠加表、接收表、链路状态表和所述路由分配表;
所述叠加表包括有若干条叠加记录表项,每条叠加记录表项中记录有候选路由地址和叠加值的对应关系,且在每条叠加记录表项的对应关系中,所述候选路由地址为本网络装置的相邻一跳网络装置的地址,所述叠加值为本网络装置发送的路由数据帧被候选路由地址对应的本网络装置的相邻一跳网络装置接收并被其转发后再次被本网络装置接收的收发概率;
所述接收表包括有若干条接收记录表项,每条接收记录表项中记录有目的地址、候选路由地址和接收值的对应关系,且在每条接收记录表项的对应关系中,所述目 的地址为目的网络装置的地址,所述候选路由地址为本网络装置的相邻一跳网络装置的地址,所述接收值为目的地址对应的目的网络装置发送的路由数据帧经由候选路由地址对应的本网络装置的相邻一跳网络装置转发后被本网络装置接收的接收概率;
所述链路状态表包括有若干条链路状态记录表项,每条链路状态记录表项中记录有目的地址、候选路由地址和链路状态稳定值的对应关系,所述链路状态表基于所述叠加表和接收表构造,每条链路状态记录表项由具有相同候选路由地址的一条叠加记录表项和一条接收记录表项形成,所述链路状态记录表项中的目的地址为接收记录表项中的目的地址,所述链路状态记录表项中的候选路由地址为叠加记录表项和接收记录表项中含有的相同的候选路由地址,所述链路状态记录表项中的链路状态稳定值基于叠加记录表项中的叠加值和接收记录表项中的接收值计算得到;
所述路由分配表基于所述链路状态表来构造,在链路状态表中提取具有相同目的地址的链路状态记录表项集合,在所述链路状态记录表项集合中选取链路状态稳定值最大的链路状态记录表项,并将该链路状态稳定值最大的链路状态记录表项中的目的地址和候选路由地址分别作为路由分配表的分配记录表项中的目的地址和候选分配路由地址;
所述的网络装置为网络接入装置或网络拓展装置,网络装置的地址为网络接入装置或网络拓展装置中的数据收发子单元的地址。
进一步的根据本发明所述的网络分享系统,其中所述网络接入装置和网络拓展装置的路由信息维护模块均基于最新的路由数据帧更新所述叠加表和接收表,当路由数据帧的链路状态报文的原始发送方地址为本网络装置的地址时,所述路由信息维护模块更新所述叠加表,在叠加表中查询候选路由地址为路由数据帧的发送方地址的叠加记录表项,若能查询到所述叠加记录表项则更新所述叠加记录表项中的叠加值,若不能查询到所述叠加记录表项则在叠加表中新增一条叠加记录表项,新增的叠加记录表项中的候选路由地址为路由数据帧的发送方地址,新增的叠加记录表项中的叠加值的计算方法与叠加值的更新方法相同;当路由数据帧的链路状态报文的原始发送方地址不为本网络装置的地址时,所述路由信息维护模块更新所述接收表,在接收表中查询目的地址为路由数据帧的链路状态报文的原始发送方地址并且候选路由地址为路由数据帧的发送方地址的接收记录表项,若能查询到所述接收记录表项则更新所述接收记录表项中的接收值,若不能查询到所述接收记录表项则在接收表中新增一条接收记录表项,新增的接收记录表项中的目的地址为路由数据帧的链路状态报文的原始发送方地址,新增的接收记录表项中的候选路由地址为路由数据帧的发送方地址,新增的接收记录表项中的接收值的计算方法与所述接收值的更新方法相同。
进一步的根据本发明所述的网络分享系统,其中所述路由信息维护模块每次更新完所述接收表后,按照以下方式同时更新所述链路状态表:首先提取路由数据帧的链路状态报文的链路状态值,记为x;其次在叠加表中查询候选路由地址为路由数据帧的发送方地址的叠加记录表项,若不能在叠加表中查询到上述叠加记录表项,则结束所述链路状态表的更新,若能在叠加表中查询到上述叠加记录表项,则提取所述叠加记录表项中的叠加值,记为y;接着提取接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址并且候选路由地址为路由数据帧的发送方地址的接收记录表项中的接收值,记为z;当(y/z)<1时,将路由数据帧的链路状态报文的链路状态值更新为x*(y/z),当(y/z)≥1时,将路由数据帧的链路状态报文的链路状态 值更新为原值x;最后在链路状态表中查询目的地址为路由数据帧中的链路状态报文的原始发送方地址并且候选路由地址为路由数据帧的发送方地址的链路状态记录表项,若能查询到所述链路状态记录表项,则基于路由数据帧的链路状态报文的更新后的链路状态值更新该链路状态记录表项中的链路状态稳定值,若不能查询到所述链路状态记录表项则在链路状态表中新增一条链路状态记录表项,新增的链路状态记录表项的目的地址为路由数据帧中的链路状态报文的原始发送方地址,新增的链路状态记录表项的候选路由地址为路由数据帧的发送方地址,新增的链路状态记录表项的链路状态稳定值为路由数据帧中的链路状态报文的更新后的链路状态值。
进一步的根据本发明所述的网络分享系统,其中所述链路状态表中为每一条链路状态记录表项都维护有一个均值队列,且每条链路状态记录表项对应的均值队列的长度相同,所述均值队列中存储有路由数据帧的链路状态报文的更新后的链路状态值,且所述均值队列中链路状态值的移入移出遵循先入先出的原则,所述链路状态记录表项中的链路状态稳定值为均值队列中存储的所有链路状态值的平均值;所述路由信息维护模块每次更新完所述接收表后,按照以下方式同时更新所述链路状态表:首先提取路由数据帧的链路状态报文的链路状态值,记为x;其次在叠加表中查询候选路由地址为路由数据帧的发送方地址的叠加记录表项,若不能在叠加表中查询到上述叠加记录表项,则结束所述链路状态表的更新,若能在叠加表中查询到上述叠加记录表项,则提取所述叠加记录表项中的叠加值,记为y;接着提取接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址并且候选路由地址为路由数据帧的发送方地址的接收记录表项中的接收值,记为z;当(y/z)<1时,将路由数据帧的链路状态报文的链路状态值更新为x*(y/z),当(y/z)≥1时,将路由数据帧的链路状态报文的链路状态值更新为原值x;最后在链路状态表中查询目的地址为路由数据帧的链路状态报文的原始发送方地址并且候选路由地址为路由数据帧的发送方地址的链路状态记录表项,若能查询到该链路状态记录表项则向该链路状态记录表项对应的均值队列中移入路由数据帧的链路状态报文的更新后的链路状态值,并重新计算均值队列中所有链路状态值的平均值,将所述链路状态记录表项中的链路状态稳定值更新为所述平均值,若不能查询到该链路状态记录表项则在链路状态表中新增一条链路状态记录表项,新增的链路状态记录表项的目的地址为路由数据帧的链路状态报文的原始发送方地址,新增的链路状态记录表项的候选路由地址为路由数据帧的发送方地址,并向新增的链路状态记录表项对应的均值队列中移入路由数据帧的链路状态报文的更新后的链路状态值,新增的链路状态记录表项的链路状态稳定值为其对应的均值队列中链路状态值的平均值。
进一步的根据本发明所述的网络分享系统,其中所述路由信息维护模块每次更新完所述链路状态表后,按照以下方式同时更新所述路由分配表:首先在链路状态表中查询得到目的地址为路由数据帧的链路状态报文的原始发送方地址的链路状态记录表项集合;接着在所述链路状态记录表项集合中选取链路状态稳定值最大的链路状态记录表项,并将该链路状态稳定值最大的链路状态记录表项中的目的地址和候选路由地址分别作为路由更新信息中的目的地址和候选路由地址;然后在路由分配表中查询目的地址为路由更新信息中的目的地址的分配记录表项,若能查到所述分配记录表项则将所述分配记录表项中的候选分配路由地址更新为所述路由更新信息中的候选路由地址,若不能查到所述分配记录表项,则在路由分配表中新增一条分配记录表项,新增的分配记录表项的目的地址和候选分配路由地址分别为所述路由更新信息中的目的地址和候选路由地址。
进一步的根据本发明所述的网络分享系统,其中所述叠加表为每条叠加记录表项都维护有一个叠加队列,且各叠加记录表项对应的叠加队列长度相同,所述叠加队列中存储有路由数据帧的链路状态报文的序列号,且所述叠加队列中序列号的移入移出遵循先入先出的原则,每条叠加记录表项中的叠加值为其对应的叠加队列中存储的序列号的数量与叠加队列长度的比值,且所述叠加表中各叠加记录表项对应的叠加队列中序列号的移入移出过程保持同步,所述路由信息维护模块基于最新的路由数据帧更新所述叠加表时,按照以下方式更新叠加记录表项中的叠加值:将叠加表中候选路由地址为路由数据帧的发送方地址的叠加记录表项作为本叠加记录表项,向本叠加记录表项对应的叠加队列中移入路由数据帧的链路状态报文的序列号,同时向叠加表中除本叠加记录表项以外的其他叠加记录表项对应的叠加队列中移入一个空元素,然后将叠加表中的各叠加记录表项的叠加值更新为其对应的叠加队列中存储的序列号的数量与叠加队列长度的比值;所述接收表为每条接收记录表项都维护有一个接收队列,且各接收记录表项对应的接收队列长度相同,所述接收队列中存储有路由数据帧的链路状态报文的序列号,且所述接收队列中序列号的移入移出遵循先入先出的原则,每条接收记录表项中的接收值为其对应的接收队列中存储的序列号的数量与接收队列长度的比值,且所述接收表中目的地址相同的接收记录表项对应的接收队列中序列号的移入移出过程保持同步,所述路由信息维护模块基于最新的路由数据帧更新所述接收表时,按照以下方式更新接收记录表项中的接收值:将接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址并且候选路由地址为路由数据帧的发送方地址的接收记录表项作为本接收记录表项,向本接收记录表项对应的接收队列中移入路由数据帧的链路状态报文的序列号,同时向除本接收记录表项之外的接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址的其他接收记录表项对应的接收队列中移入一个空元素,然后将接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址的各接收记录表项的接收值更新为其对应的接收队列中存储的序列号的数量与接收队列长度的比值。
进一步的根据本发明所述的网络分享系统,其中所述叠加队列与所述接收队列的长度相同;新生成的链路状态报文的序列号在前一个具有相同原始发送方地址的链路状态报文的序列号的基础上按固定步长L递增;所述路由信息维护模块每次更新所述叠加表时,按照以下方式更新叠加表中叠加记录表项的叠加值:提取叠加表中各叠加记录表项对应的叠加队列中序列号的最大值,记为a,提取路由数据帧的链路状态报文的序列号,记为b,向叠加表中除本叠加记录表项以外的其他叠加记录表项对应的叠加队列中依次移入((b-a)/L)个空元素,向本叠加记录表项对应的叠加队列中依次移入(((b-a)/L)-1)个空元素和序列号b,然后将叠加表中的各叠加记录表项中的叠加值更新为其对应的叠加队列中存储的序列号的数量与叠加队列长度的比值;所述路由信息维护模块每次更新所述接收表时,按照以下方式更新接收表中相关接收记录表项的接收值:提取接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址的接收记录表项对应的接收队列中序列号的最大值,记为m,提取路由数据帧的链路状态报文的序列号,记为n,向接收表中除本接收记录表项以外的目的地址为路由数据帧的链路状态报文的原始发送方地址的接收记录表项对应的接收队列中依次移入((n-m)/L)个空元素,向本接收记录表项对应的接收队列中依次移入(((n-m)/L)-1)个空元素和序列号n,然后将接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址的各接收记录表项的接收值更新为其对应的接收队列中存储的序列号的数量与接收队列长度的比值。
进一步的根据本发明所述的网络分享系统,其中所述网络接入装置的网络接入组网单元还包括有预处理子单元,所述预处理子单元连接于网络接入组网单元中的所述路由子单元、数据收发子单元和服务信息子单元,所述预处理子单元中维护有预处理表,所述预处理表包括有若干预处理记录表项,每个预处理记录表项中记录有原始发送方地址和序列号的对应关系,所述预处理子单元基于数据收发子单元接收的路由数据帧维护所述预处理表并判定路由数据帧是否为最新的路由数据帧,首先在预处理表中查询原始发送方地址为路由数据帧的链路状态报文的原始发送方地址的预处理记录表项,若没有查询到对应的预处理记录表项,则判定数据收发子单元提供的路由数据帧为最新的路由数据帧并将其发往路由子单元的路由信息维护模块,同时在预处理表中新增一项预处理记录表项,新增的预处理记录表项的原始发送方地址和序列号分别为路由数据帧的链路状态报文的原始发送方地址和序列号;若在预处理表中查询到原始发送方地址为路由数据帧的链路状态报文的原始发送方地址的预处理记录表项,则比较所述预处理记录表项中的序列号与路由数据帧的链路状态报文的序列号的大小关系,若所述预处理记录表项中的序列号小于路由数据帧的链路状态报文的序列号,则判定数据收发子单元提供的路由数据帧为最新的路由数据帧并将其发往路由子单元的路由信息维护模块,同时将所述预处理记录表项中的序列号更新为路由数据帧的链路状态报文的序列号,若所述预处理记录表项中的序列号大于等于路由数据帧的链路状态报文的序列号,则判定数据收发子单元提供的路由数据帧不是最新的路由数据帧,将所述路由数据帧丢弃;同时所述预处理子单元判定数据收发子单元提供的路由数据帧为最新的路由数据帧时,进一步判断最新的路由数据帧的链路状态报文中是否设置有终端信息,若是则向所述服务信息子单元提供服务更新信息,所述服务更新信息包括路由数据帧的链路状态报文的原始发送方地址和链路状态报文中的终端信息。
进一步的根据本发明所述的网络分享系统,其中所述服务信息子单元接收到预处理子单元提供的服务更新信息后按照以下方式更新服务信息表:对于服务更新信息的终端信息中的每一个使用终端地址,在服务信息表中查找使用终端地址为该使用终端地址且网络拓展装置地址为服务更新信息中的原始发送方地址的服务记录表项,若不能查找到所述服务记录表项,则在服务信息表中新增一项服务记录表项,新增服务记录表项的使用终端地址为该使用终端地址,新增服务记录表项的网络拓展装置地址为服务更新信息中的原始发送方地址;同时对于服务信息表中每一个网络拓展装置地址为服务更新信息中原始发送方地址的服务记录表项,如果该服务记录表项中的使用终端地址没有包括在服务更新信息的终端信息包括的使用终端地址中,则在服务信息表中删除该服务记录表项。
进一步的根据本发明所述的网络分享系统,其中所述网络拓展装置的网络拓展组网单元还包括有预处理子单元,所述预处理子单元连接于网络拓展组网单元中的所述路由子单元和数据收发子单元,所述预处理子单元中维护有预处理表,所述预处理表包括有若干预处理记录表项,每个预处理记录表项中记录有原始发送方地址和序列号的对应关系,所述预处理子单元基于数据收发子单元接收的路由数据帧维护所述预处理表并判定路由数据帧是否为最新的路由数据帧,首先在预处理表中查询原始发送方地址为路由数据帧的链路状态报文的原始发送方地址的预处理记录表项,若没有查询到对应的预处理记录表项,则判定数据收发子单元提供的路由数据帧为最新的路由数据帧并将其发往路由子单元的路由信息维护模块,同时在预处理表中新增一项预处理记录表项,新增的预处理记录表项的原始发送方地址和序列号 分别为路由数据帧的链路状态报文的原始发送方地址和序列号;若在预处理表中查询到原始发送方地址为路由数据帧的链路状态报文的原始发送方地址的预处理记录表项,则比较所述预处理记录表项中的序列号与路由数据帧的链路状态报文的序列号的大小关系,若所述预处理记录表项中的序列号小于路由数据帧的链路状态报文的序列号,则判定数据收发子单元提供的路由数据帧为最新的路由数据帧并将其发往路由子单元的路由信息维护模块,同时将所述预处理记录表项中的序列号更新为路由数据帧的链路状态报文的序列号,若所述预处理记录表项中的序列号大于等于路由数据帧的链路状态报文的序列号,则判定数据收发子单元提供的路由数据帧不是最新的路由数据帧,将所述路由数据帧丢弃。
进一步的根据本发明所述的网络分享系统,其中所述路由信息维护模块每次更新完路由数据帧的链路状态报文的链路状态值时,将所述链路状态报文发送至数据收发子单元,数据收发子单元将所述链路状态报文封装为路由数据帧后转发,封装的路由数据帧的接收方地址为广播地址,发送方地址为数据收发子单元的地址,帧体为路由数据标记和所述链路状态报文。
进一步的根据本发明所述的网络分享系统,其中所述网络拓展装置的路由信息维护模块同时维护有所述路由分配表和网关列表,所述网关列表包括有若干网关记录表项,每个网关记录表项中记录有网络接入装置的地址和链路状态稳定值的对应关系,所述路由信息维护模块每次更新完所述链路状态表后,按照以下方式同时更新所述网关列表:首先判断路由数据帧的链路状态报文中是否设置有网关标记,若否则不进行网关列表更新,若是则在链路状态表中查询得到目的地址为路由数据帧的链路状态报文的原始发送方地址的链路状态记录表项集合,在所述链路状态记录表项集合中选取链路状态稳定值最大的链路状态记录表项,并将该链路状态稳定值最大的链路状态记录表项中的目的地址和链路状态稳定值分别作为网关更新信息中的目的地址和链路状态稳定值,然后在网关列表中查询网络接入装置地址为网关更新信息中的目的地址的网关记录表项,若能查到所述网关记录表项则将所述网关记录表项中的链路状态稳定值更新为所述网关更新信息中的链路状态稳定值,若不能查到所述网关记录表项,则在网关列表中新增一条网关记录表项,新增的网关记录表项的网络接入装置地址和链路状态稳定值分别为所述网关更新信息中的目的地址和链路状态稳定值;所述网络拓展装置的路由信息维护模块接收到发送自网络拓展装置的数据收发子单元的网关查询请求后,在网关列表中查找链路状态稳定值最大的网关记录表项,并将所查找到的网关记录表项中的网络接入装置地址作为网关查询响应发送给所述数据收发子单元。
进一步的根据本发明所述的网络分享系统,其中所述网络接入无线服务单元和网络拓展无线服务单元均包括有IP地址分配子单元和客户端接入子单元,所述客户端接入子单元为覆盖范围内的使用终端提供无线网络服务,所述IP地址分配子单元为接入客户端接入子单元提供的无线网络中的使用终端分配整个网络分享系统中唯一的IP地址。
进一步的根据本发明所述的网络分享系统,其中所述预处理表的每条预处理记录表项中还记录有路由数据帧的最新接收时间,所述接收表的每条接收记录表项中还记录有路由数据帧的最新接收时间,所述路由信息维护模块包括有定时更新子单元,所述定时更新子单元按照一定的时间间隔周期性地遍历所述预处理表,对于预处理表中的每一条预处理记录表项都判断其中的最新接收时间和当前时间的差值是否超出第一阈值,若超出则在预处理表中删除对应的预处理记录表项,并在接收表、 链路状态表和路由分配表中同时删除目的地址为该预处理记录表项中原始发送方地址的对应表项,在服务信息表中删除网络拓展装置地址为该预处理记录表项中原始发送方地址的表项,在网关列表中删除网络接入装置地址为该预处理记录表项中原始发送方地址的表项;所述定时更新子单元按照一定的时间间隔周期性地遍历所述接收表,对于接收表中的每一项接收记录表项都判断其中的最新接收时间和当前时间的差值是否超出第二阈值,若超出则在接收表中删除对应的接收记录表项,设被删除的接收记录表项中的目的地址为dest_mac、候选路由地址为cand_mac,删除所述接收记录表项后同时在链路状态表中删除目的地址为dest_mac并且候选路由地址为cand_mac的表项,然后在链路状态表中查询目的地址为dest_mac的表项记为动态更新表项集合,在动态更新表项集合中选取链路状态稳定值最大的表项作为路由更新信息,并基于所述路由更新信息更新路由分配表。
一种基于本发明所述的网络分享系统进行的网络分享方法,包括以下网络分享过程:
(1)、对于网络接入装置覆盖范围内的使用终端访问互联网时,来自所述使用终端的数据包通过本网络接入装置的网络接入无线服务单元发送至本网络接入装置的数据分析单元,再经数据分析单元发往互联网;
(2)、对于来自互联网的数据包,网络接入装置的数据分析单元接收所述数据包,并判定所述数据包是否发往本网络接入装置覆盖范围内的使用终端,若是则将所述数据包通过本网络接入装置的网络接入无线服务单元发送至所述使用终端;若否则所述数据分析单元将所述数据包发往本网络接入装置的数据收发子单元,所述数据收发子单元接收到所述数据包时,先向本网络接入装置的服务信息子单元发送服务查询请求,所述服务查询请求包括所述数据包的接收终端地址,所述服务信息子单元在其维护的服务信息表中查询使用终端地址与所述接收终端地址相同的服务记录表项,并将所查找到的服务记录表项中的网络拓展装置地址作为服务查询响应发给所述数据收发子单元,所述数据收发子单元收到所述服务查询响应后向本网络接入装置的路由子单元发送路由查询请求,所述路由查询请求包括服务查询响应中的网络拓展装置地址,所述路由子单元在其维护的路由分配表中查找目的地址与路由查询请求中的网络拓展装置地址相同的分配记录表项,并将所查找到的分配记录表项中的候选分配路由地址作为路由查询响应发给所述数据收发子单元,所述数据收发子单元根据服务查询响应和路由查询响应构造负载数据帧并发送,所构造的负载数据帧的接收方地址为路由查询响应中的候选分配路由地址,所构造的负载数据帧的发送方地址为所述数据收发子单元的地址,所构造的负载数据帧的帧体包括负载数据标记、最终接收装置地址和所述数据包,其中负载数据帧的帧体中的最终接收装置地址为所述服务查询响应中的网络拓展装置地址;
(3)、对于网络接入装置的数据收发子单元接收到其他网络装置发送的负载数据帧时,所述数据收发子单元提取所接收到的负载数据帧的帧体中的最终接收装置地址,并判断所述最终接收装置地址是否为本网络接入装置的地址,若是则提取所述负载数据帧的帧体中的数据包并发送至本网络接入装置的数据分析单元,经数据分析单元将所述数据包发往互联网,若所述最终接收装置地址不为本网络接入装置的地址,则所述数据收发子单元先向本网络接入装置的路由子单元发送路由查询请求,所述路由查询请求包括所述最终接收装置地址,所述路由子单元在其维护的路由分配表中查找目的地址与路由查询请求中的最终接收装置地址相同的分配记录表项,并将所查找到的分配记录表项中的候选分配路由地址作为路由查询响应发给所 述数据收发子单元,所述数据收发子单元根据路由查询响应构造负载数据帧并发送,所构造的负载数据帧的接收方地址为路由查询响应中的候选分配路由地址,所构造的负载数据帧的发送方地址为所述数据收发子单元的地址,所构造的负载数据帧的帧体包括负载数据标记、所述最终接收装置地址和所述数据包;
(4)、对于网络拓展装置覆盖范围内的使用终端访问互联网时,来自所述使用终端的数据包通过本网络拓展装置的网络拓展无线服务单元发送至本网络拓展装置的数据收发子单元,所述数据收发子单元接收到所述数据包时,先向本网络拓展装置的路由子单元发送网关查询请求,所述路由子单元收到网关查询请求后在其维护的网关列表中查找链路状态稳定值最大的网关记录表项,并将所查找到的网关记录表项中的网络接入装置地址作为网关查询响应发送给所述数据收发子单元,所述数据收发子单元接收到所述网关查询响应后向本网络拓展装置的路由子单元发送路由查询请求,所述路由查询请求包括所述网关查询响应中的网络接入装置地址,所述路由子单元在其维护的路由分配表中查找目的地址与路由查询请求中的网络接入装置地址相同的分配记录表项,并将所查找到的分配记录表项中的候选分配路由地址作为路由查询响应发给所述数据收发子单元,所述数据收发子单元根据网关查询响应和路由查询响应构造负载数据帧并发送,所构造的负载数据帧的接收方地址为路由查询响应中的候选分配路由地址,所构造的负载数据帧的发送方地址为所述数据收发子单元的地址,所构造的负载数据帧的帧体包括负载数据标记、最终接收装置地址和所述数据包,其中负载数据帧的帧体中的最终接收装置地址为所述网关查询响应中的网络接入装置地址;
(5)对于网络拓展装置的数据收发子单元接收到其他网络装置发送的负载数据帧时,所述数据收发子单元提取所接收到的负载数据帧的帧体中的最终接收装置地址,并判断所述最终接收装置地址是否为本网络拓展装置的地址,若是则提取所述负载数据帧的帧体中的数据包并发送至本网络拓展装置的网络拓展无线服务单元,经网络拓展无线服务单元将所述数据包发送至本网络拓展装置覆盖范围内的使用终端;若所述最终接收装置地址不为本网络拓展装置的地址,则所述数据收发子单元先向本网络拓展装置的路由子单元发送路由查询请求,所述路由查询请求包括所述最终接收装置地址,所述路由子单元在其维护的路由分配表中查找目的地址与路由查询请求中的最终接收装置地址相同的分配记录表项,并将所查找到的分配记录表项中的候选分配路由地址作为路由查询响应发给所述数据收发子单元,所述数据收发子单元根据路由查询响应构造负载数据帧并发送,所构造的负载数据帧的接收方地址为路由查询响应中的候选分配路由地址,所构造的负载数据帧的发送方地址为所述数据收发子单元的地址,所构造的负载数据帧的帧体包括负载数据标记、所述最终接收装置地址和所述数据包。
本发明的有益效果是:
1)、本发明提出的网络分享系统包括多个网络接入装置和网络拓展装置,网络接入装置和网络拓展装置都提供无线网络服务,拓展了无线网络的覆盖范围。
2)、本发明提出的网络分享系统中的网络接入装置需要连接到互联网,网络拓展装置不需要连接到互联网,降低了无线网络部署成本。
3)、本发明提出的网络分享系统包括多个网络接入装置,每个网络接入装置都作为网络出口连接到互联网,此外本发明中的网络拓展装置根据实际情况的变化自动选择最优的网络接入装置作为网关,保证了智能终端访问互联网时有足够的带宽。
4)、在本发明提出的网络分享系统中,当本网络分享系统具有足够数量的网络 接入装置和足够数据量的网络拓展装置时,如果有新的网络接入装置或者新的网络拓展装置加入或者退出本网络分享系统,本网络分享系统中的其他装置不受影响,本发明提出的网络分享系统健壮性强。
附图说明
图1为本发明所述网络分享系统中网络接入装置的总体结构框图;
图2为本发明所述网络分享系统中网络接入装置的无线服务单元的结构框图;
图3为本发明所述网络分享系统中网络接入装置的组网单元的结构框图;
图4为本发明所述网络分享系统中网络接入装置的组网单元的路由子单元的结构框图;
图5为本发明所述网络分享系统中网络接入装置的组网单元的路由子单元的路由信息维护模块的结构框图;
图6为本发明所述网络分享系统中网络拓展装置的总体结构框图;
图7为本发明所述网络分享系统中网络拓展装置的无线服务单元的结构框图;
图8为本发明所述网络分享系统中网络拓展装置的组网单元的结构框图;
图9为本发明所述网络分享系统中网络拓展装置的组网单元的路由子单元的结构框图;
图10为本发明所述网络分享系统中网络拓展装置的组网单元的路由子单元的路由信息维护模块的结构框图;
图11为本发明具体实施例中各网络装置相对位置示意图;
图12为本发明具体实施例中叠加队列维护过程示意图;
图13为本发明具体实施例中接收队列维护过程示意图;
图14本发明具体实施例中均值队列维护过程示意图。
具体实施方式
以下结合附图详细描述本发明的技术方案,以使本领域技术人员能够更加清楚的理解本发明,但并不以此为限。
在描述本发明实施方式之前,对本发明中的一些概念进行必要的阐述:
相邻一跳装置:称本装置(可以为本网络分享系统中的任一网络接入装置或任一网络拓展装置)一定距离范围内的其他装置(可以为本网络分享系统中的网络接入装置或网络拓展装置)为本装置的相邻一跳装置,上述一定距离范围需要满足的条件是本装置发送的数据不经过其他装置转发就可以被本装置的相邻一跳装置直接接收,同时,本装置的相邻一跳装置发送的数据不经过其他装置转发就可以被本装置直接接收;在上述一定距离范围内,可能存在多个本装置的相邻一跳装置。
链路状态报文:本发明中的各个装置(包括网络接入装置和网络拓展装置)用来维护路由信息的报文,包括原始发送方的MAC(Media Access Control,介质访问控制)地址、传输距离、链路状态值、序列号和网关标记/终端信息,其中,原始发送方的MAC地址表示产生此链路状态报文的装置(非转发此链路状态报文的装置)的组网单元的数据收发子单元的MAC地址,其他装置在转发本装置产生的链路状态报文时不改变链路状态报文的原始发送发的MAC地址;传输距离表示本链路状态报文被其他装置转发的次数;链路状态值表示发送此链路状态报文的装置与此链路状态报文的原始发送方MAC地址对应的装置之间的链路状态,链路状态值是进行路由选择时的重要依据;序列号在本发明的各个装置中有特别的定义,每个装置在产生链路状态报文时生成序列号,链路状态报文在被各个装置转发的过程中其序列号不再发生变化,每个装置每新产生一个链路状态报文其序列号都在原有序列号 (上一次产生的与该新产生的链路状态报文具有相同原始发送方MAC地址的链路状态报文的序列号)的基础上按照固定步长递增或者递减变化,优选的序列号增加1,以区分新旧链路状态报文,链路状态报文中的原始发送方MAC地址和链路状态报文中的序列号能够标识本网络分享系统中的唯一的链路状态报文;网关标记用来表示本装置是否可以直接连接到互联网,网络接入装置产生的链路状态报文设置网关标记,网络拓展装置产生的链路状态报文不设置网关标记;终端信息表示网络拓展装置服务的智能终端的地址信息,终端信息可以为网络拓展装置服务的各个智能终端的MAC地址也可以为网络拓展装置服务的各个智能终端的IP地址,优选的采用网络拓展装置服务的各个智能终端的MAC地址作为终端信息,以下阐述本发明原理的内容采用的是上述优选的方式,网络拓展装置产生的链路状态报文包括终端信息,网络接入装置产生的链路状态报文不包括终端信息。
802.11数据帧:802.11帧的一种,按照802.11标准,802.11数据帧用来传输负载数据,802.11数据帧的结构如下表1所示,其中Address 1字段表示接收方MAC地址,Address 2字段表示发送方MAC地址,Frame Body(帧体)字段用于传输负载数据,802.11数据帧中的其他字段的含义以及取值属于现有技术,且并非本发明重点,在此不再展开详细描述。
表1 802.11数据帧的结构
Figure PCTCN2016101290-appb-000001
路由数据帧、负载数据帧:本发明根据802.11数据帧的帧体(Frame Body)包括的内容进一步将802.11数据帧分为路由数据帧和负载数据帧,即路由数据帧和负载数据帧都是802.11数据帧,路由数据帧和负载数据帧的结构都与802.11数据帧的结构相同,路由数据帧与负载数据帧的差别在于帧体(Frame Body)包括的内容不同,路由数据帧的帧体(Frame Body)结构如下表2所示,路由数据帧的帧体(Frame Body)包括类型标记(TypeLable)和链路状态报文(LinkStatePacket),TypeLable字段表示类型标记,用来区分路由数据帧和负载数据帧,LinkStatePacket字段表示本路由数据帧传输的链路状态报文,所述链路状态报文如前所述的包括原始发送方的MAC地址、传输距离、链路状态值、序列号和网关标记/终端信息。负载数据帧的帧体(Frame Body)结构如下表3所示,负载数据帧的帧体(Frame Body)包括类型标记(TypeLable)、最终接收装置的MAC地址(EndMAC)和IP数据包(IPPackage),TypeLable字段表示类型标记,用来区分路由数据帧和负载数据帧,EndMAC字段表示最终接收本负载数据帧的帧体的IP数据包的装置的MAC地址,IPPackage字段表示本负载数据帧传输的IP数据包。
表2 路由数据帧的帧体(Frame Body)结构
Figure PCTCN2016101290-appb-000002
表3 负载数据帧的帧体(Frame Body)结构
Figure PCTCN2016101290-appb-000003
首先说明本发明的技术创新原理,本发明所述的网络分享系统包括若干个网络接入装置和若干个网络拓展装置,所述网络接入装置直接连接到互联网,每个网络接入装置能够为其覆盖范围内的智能终端提供无线网络服务,网络接入装置覆盖范 围内的智能终端发向互联网的IP数据包通过为其提供无线网络服务的网络接入装置直接发向互联网,来自互联网并以某网络接入装置服务的智能终端为目的的IP数据包通过该网络接入装置发送至对应的智能终端,也就是说每个网络接入装置自身覆盖范围内的智能终端是通过该网络接入装置直接与互联网进行通信的。所述网络拓展装置与网络接入装置形成无线自组织网络,网络拓展装置通过无线自组织网络连接到网络接入装置、再经网络接入装置间接连接到互联网,也就是说网络拓展装置不能直接和互联网进行通信,需要借助网络接入装置与互联网进行间接通信,同时每个网络拓展装置能够为其覆盖范围内的智能终端提供无线网络服务,不同的网络拓展装置之间以及不同的网络接入装置之间以及网络拓展装置和网络拓展装置之间可以进行通信。对于来自某一网络拓展装置覆盖范围内的智能终端发向互联网的IP数据包,所述网络拓展装置将选择一个网络接入装置作为最终的数据接收装置,并最终通过所选择的网络接入装置将IP数据包发向互联网,且所述网络拓展装置在向作为最终数据接收装置的所述网络接入装置发送IP数据包的过程中,根据网络传输中所选择的最优路径,可能直接向所述网络接入装置发送IP数据包,也可能经历一个或多个其他网络拓展装置或网络接入装置(多跳方式)后再将所述IP数据包发向所述网络接入装置;同理对于来自互联网并以某网络拓展装置覆盖范围内的智能终端为目的的IP数据包,所述IP数据包首先被网络接入装置接收,然后所述网络接入装置将为所述智能终端提供无线网络服务的网络拓展装置作为最终的数据接收装置,且在向作为最终数据接收装置的所述网络拓展装置发送IP数据包的过程中,根据网络传输中所选择的最优路径,所述网络接入装置可能直接向作为最终数据接收装置的所述网络拓展装置发送IP数据包,也可能经历一个或多个其他网络拓展装置或网络接入装置后再将所述IP数据包发向作为最终数据接收装置的所述网络接入装置,最后再由作为最终数据接收装置的所述网络拓展装置将所述IP数据包发向其覆盖范围内的智能终端。本发明的主要创新即在于为网络拓展装置服务的智能终端与互联网之间选择最优通信路径,包括在网络拓展装置和网络接入装置之间选择最佳的数据通信路径,如为网络拓展装置选择最优的网络接入装置,并将网络拓展装置服务的智能终端发向互联网的IP数据包通过最优选择路径发送至网络拓展装置所选择的最优网络接入装置,由所选择的最优网络接入装置再将上述IP数据包直接发向互联网;网络接入装置将来自互联网并且以上述网络拓展装置服务的智能终端为目的的IP数据包通过最优选择路径发送至上述网络拓展装置,网络拓展装置再将上述IP数据包发送至对应的智能终端,这样智能终端通过接入网络拓展装置提供的无线网络可以访问互联网。
本发明中某一网络拓展装置或网络接入装置选择其他网络拓展装置或其他网络接入装置传输数据的过程即为多跳数据传输过程,所选择的某一网络拓展装置或网络接入装置即为多跳中的其中一跳。本发明中多跳数据传输路径上的每个装置(可以为网络接入装置也可以为网络拓展装置)都在本装置的相邻一跳装置中以最终的数据接收装置(若传输的IP数据包为网络拓展装置服务的智能终端发向互联网的IP数据包,则上述最终的数据接收装置为网络接入装置,若传输的IP数据包为发送自互联网并且以网络拓展装置服务的智能终端为目的的IP数据包,则上述最终的数据接收装置为给所述智能终端提供无线网络服务的网络拓展装置)为目的装置选择一个最优的相邻一跳装置并将数据发送至所选择的最优的相邻一跳装置,上述本装置的最优相邻一跳装置在接收到所述IP数据包后,若其不为最终的数据接收装置,则本装置的最优相邻一跳装置以类似的方式选择其最优的相邻一跳装置,再将上述数 据发送至以最终的数据接收装置为目的装置所选择的本装置的最优相邻一跳装置的最优相邻一跳装置,这样通过多跳的方式将数据传输到最终的数据接收装置。
本发明中的每个网络接入装置和每个网络拓展装置都基于链路状态报文维护本装置选择其最优相邻一跳装置时所需要的信息,具体的,本发明所述网络分享系统中的每个网络接入装置和每个网络拓展装置都周期性地产生链路状态报文并以广播的方式发送出去,每个网络接入装置和每个网络拓展装置产生的链路状态报文的原始发送方MAC地址都为产生此链路状态报文的装置的组网单元的数据收发子单元的MAC地址,每个网络接入装置和每个网络拓展装置产生的链路状态报文的链路状态值都为最大值,其他装置收到本装置产生的链路状态报文后更新链路状态报文的链路状态值并将符合条件的链路状态报文以广播的形式转发出去。本装置通过本装置的相邻一跳装置接收到其他装置(非本装置)产生的链路状态报文,若本装置将上述链路状态报文的原始发送方MAC地址对应的装置作为目的装置,则从本装置的相邻一跳装置中选择最优的相邻一跳装置作为本装置以上述目的装置为最终数据接收装置传输数据时的下一跳装置,上述选择最优的相邻一跳装置时的依据即为链路状态值。以下结合附图具体描述本发明所述网络分享系统的结构原理和工作过程。
如图1所示,本发明所述网络分享系统的网络接入装置包括ARP单元11、网关单元12、数据单元13、组网单元14和无线服务单元15。
ARP单元11依据公知的ARP(Address Resolution Protocol,地址解析协议)维护IP地址与MAC地址的对应关系,ARP单元11借助无线服务单元15的客户端接入子单元21和组网单元14的数据收发子单元31发送和接收用来维护上述IP地址与MAC地址对应关系的ARP报文(图略),这属于本领域熟知的地址解析过程,在此不做详述;ARP单元11接收发送自组网单元14的查询信息,查询信息包括IP地址,ARP单元11向组网单元14发送查询响应信息,查询响应信息包括与上述查询信息中的IP地址对应的MAC地址。
网关单元12接收数据单元13发送的IP数据包,网关单元12依据公知的NAT(Network Address Translation,网络地址转换)技术对发送自数据单元13的IP数据包进行NAT处理后发送至互联网;网关单元12接收发送自互联的IP数据包,网关单元12依据公知的NAT技术对上述发送自互联网的IP数据包进行NAT处理后发送至数据单元13。
如附图2所示,无线服务单元15包括客户端接入子单元21和IP地址分配子单元22,客户端接入子单元21依据802.11标准在AP(Access Point,接入点)模式下工作并为智能终端提供无线网络服务,客户端接入子单元21将本客户端接入子单元21服务的智能终端发送的访问互联网的IP数据包发送至数据单元13,客户端接入子单元21接收本客户端接入子单元21服务的智能终端发送的IP数据包,客户端接入子单元21提取上述IP数据包的目的IP地址,当根据IP数据包的目的IP地址判断上述IP数据包为本网络接入装置的客户端接入子单元21服务的智能终端发向互联网的IP数据包时,则将上述IP数据包发送至数据单元13,数据单元13接收到上述发送自客户端接入子单元21的IP数据包后将上述IP数据包发送至网关单元12,通过网关单元将所述IP数据包发往互联网,当根据IP数据包的目的IP地址判断上述IP数据包为本网络接入装置的客户端接入子单元21服务的智能终端发向本网络分享系统内其他装置(网络拓展装置、网络接入装置及其所服务的智能终端)的IP数据包时,将上述IP数据包丢弃,杜绝这种通信,以保证网络分享系统内的 访问安全。同时客户端接入子单元21接收数据单元13发送的IP数据包,根据上述IP数据包的目的IP地址将上述IP数据包发送给对应的本客户端接入子单元21服务的智能终端。
为了避免接入本网络分享系统提供的无线网络(包括网络接入装置提供的无线网络和网络拓展装置提供的无线网络)中的智能终端的IP地址发生冲突,需要为每个接入本网络分享系统提供的无线网络(包括网络接入装置提供的无线网络和网络拓展装置提供的无线网络)的智能终端分配在本网络分享系统中唯一的IP地址,因此网络接入装置的无线服务单元15包括IP地址分配子单元22,IP地址分配子单元22为接入客户端接入子单元21提供的无线网络中的智能终端分配IP地址,网络拓展装置的无线服务单元62也包括IP地址分配子单元72,网络接入装置的IP地址分配子单元22和网络拓展装置的IP地址分配子单元72按照相同的规则为接入其对应服务网络内的智能终端分配IP地址。具体的,网络接入装置的IP地址分配子单元22和网络拓展装置的IP地址分配子单元72都基于智能终端的MAC地址为智能终端分配IP地址,不同的智能终端的MAC地址是不同的,基于性能优异的算法可以对不同的MAC地址计算出不同的IP地址,使得接入本网络分享系统提供的无线网络(包括网络接入装置提供的无线网络和网络拓展装置提供的无线网络)中的所有智能终端的IP地址均不相同,从而可以确保接入本网络分享系统中的智能终端不会因IP地址重复而出现冲突。
数据单元13接收发送自无线服务单元15的客户端接入子单元21的IP数据包,根据之前所述,上述IP数据包为本网络接入装置的客户端接入子单元21服务的智能终端发向互联网的IP数据包时,则数据单元13将上述IP数据包发送至网关单元12,通过网关单元12将所述IP数据包发往互联网。对于来自互联网的IP数据包,所述IP数据包经网关单元达到数据单元,数据单元13接收来自网关单元12的IP数据包后,提取IP数据包的目的IP地址,所述数据单元13中记录有本网络接入装置的客户端接入子单元21所服务的各个智能终端的IP地址,所述数据单元13判断发送自网关单元12的IP数据包的目的IP地址是否为本网络接入装置的无线服务单元15的客户端接入子单元21服务的任一智能终端的IP地址,若上述IP数据包的目的IP地址为本网络接入装置的无线服务单元15的客户端接入子单元21服务的任一智能终端的IP地址,说明此IP数据包为本网络接入装置的无线服务单元15的客户端接入子单元21服务的智能终端与互联网之间通信的数据包,则所述数据单元将上述IP数据包发送至无线服务单元15的客户端接入子单元21,由所述客户端接入子单元21将所述IP数据包发往其服务范围内对应的智能终端;若上述目的IP地址不为本网络接入装置的无线服务单元15的客户端接入子单元21服务的任一智能终端的IP地址,说明此IP数据包为本网络分享系统中的其他装置(非本网络接入装置)服务的智能终端与互联网之间通信的数据包,则所述数据单元将上述IP数据包发送至组网单元14,由组网单元将所述IP数据包打包成本发明所述的负载数据帧并在本网络分享系统中进行传输。所述数据单元13还接收发送自组网单元14的IP数据包并将其通过网关单元12发送至互联网。这样本发明所述网络分享系统最终通过网络接入装置与互联网进行通信,而网络接入装置最终通过其中的网关单元和数据单元来实现与互联网的数据通信(IP数据包)。
如附图3所示,所述组网单元包括数据收发子单元31、服务信息子单元34、路由子单元32和预处理子单元。组网单元14的数据收发子单元31按照802.11标准在Ad-Hoc模式下工作,组网单元14的数据收发子单元31接收发送自数据单元13 的IP数据包,上述IP数据包为其他装置(非本网络接入装置)服务的智能终端与互联网之间通信的数据包,组网单元14需要将上述IP数据包发送至上述IP数据包的目的IP地址对应的智能终端,组网单元14首先需要确定是哪一个网络拓展装置为上述IP数据包的目的IP地址对应的智能终端提供无线网络服务,因此组网单元14包括服务信息子单元34,服务信息子单元34维护网络拓展装置以及网络拓展装置服务的智能终端的对应关系,组网单元14在借助服务信息子单元34确定为上述IP数据包的目的IP地址对应的智能终端提供无线网络服务的网络拓展装置后,还需要以上述网络拓展装置为目的装置在本网络接入装置的相邻一跳装置中选择最优的相邻一跳装置作为下一跳,并将所述IP数据包封装成负载数据帧后发往所选择的最优下一跳装置。所述组网单元还接收本网络分享系统中其他网络接入装置或网络拓展装置发送的负载数据帧和路由数据帧,对于以本网络接入装置作为最终数据接收装置的负载数据帧,所述组网单元提取所述负载数据帧中的IP数据包并发送至数据单元13,由数据单元将IP数据包发往互联网,对于以本网络接入装置作为中间一跳的负载数据帧,所述组网单元为将所述负载数据帧重新封装后发往最优选择的下一跳装置(不经数据单元)。同时所述组网单元收发路由数据帧(不经数据单元),并基于路由数据帧维护作为本网络接入装置进行最优通信路径选择依据的路由信息,因此所述组网单元14包括所述路由子单元32,通过所述路由子单元32维护了本装置的最优下一跳信息,下面具体描述组网单元包括的各单元。
数据收发子单元31接收发送自数据单元13的IP数据包,所述IP数据包为其他装置(非本网络接入装置)服务的智能终端与互联网之间通信的数据包,数据收发子单元31提取上述IP数据包的目的IP地址,先向ARP单元11发送地址查询请求,地址查询请求包括上述IP数据包的目的IP地址,ARP单元11向数据收发子单元31发送地址查询响应,地址查询响应包括与上述地址查询请求中的目的IP地址对应的MAC地址。然后,数据收发子单元31根据上述地址查询响应(若查询不到则直接丢弃所述IP数据包)向服务信息子单元34发送服务查询请求,服务查询请求包括上述地址查询响应中的与目的IP地址对应的MAC地址(即上述IP数据包的目的IP地址对应的智能终端的MAC地址),服务信息子单元34根据服务查询请求向数据收发子单元31发送服务查询响应,服务查询响应包括为上述服务查询请求中的MAC地址对应的智能终端提供无线网络服务的网络拓展装置的MAC地址,之后数据收发子单元31向路由子单元32发送路由查询请求,路由查询请求包括目的MAC地址,上述路由查询请求中的目的MAC地址为服务查询响应中的网络拓展装置的MAC地址,路由子单元32根据路由查询请求中的目的MAC地址在本装置的相邻一跳装置中选择最优的下一跳装置并且向数据收发子单元31发送包括上述最优下一跳装置的MAC地址的路由查询响应,数据收发子单元31根据路由查询响应构造负载数据帧并发送,这样能够确保将上述IP数据包按照最优的通信路径传输至其目的IP地址对应的智能终端。更具体的所述数据收发子单元31构造的负载数据帧的接收方MAC地址为路由查询响应中的最优下一跳的MAC地址,所述数据收发子单元31构造的负载数据帧的发送方MAC地址为本装置中的数据收发子单元31的MAC地址,所述数据收发子单元31构造的负载数据帧的帧体为负载数据标记和上述IP数据包。上述数据收发子单元31构造的负载数据帧的帧体还可以优选的包括最终接收装置的MAC地址,所述最终接收装置的MAC地址为向上述负载数据帧的帧体的IP数据包的目的IP地址对应的智能终端提供无线网络服务的网络拓展装置的MAC地址(即服务查询响应中的网络拓展装置的MAC地址),若上述数据收 发子单元31构造的负载数据帧的帧体包括最终接收装置的MAC地址,则多跳路径上的其他装置接收到本负载数据帧后,通过提取本负载数据帧的帧体中的最终接收装置的MAC地址,可以直接确定最终接收本负载数据帧的帧体的IP数据包的网络拓展装置;若上述数据收发子单元31构造的负载数据帧的帧体不包括最终接收装置的MAC地址,则多跳路径上的其他装置也需要维护网络拓展装置与网络拓展装置服务的智能终端的对应关系,多跳路径上的其他装置接收到本负载数据帧后,通过提取本负载数据帧的帧体的IP数据包的目的IP地址再借助ARP协议可以确定接收本负载数据帧的帧体中的IP数据包的智能终端的MAC地址,再借助上述维护的网络拓展装置与网络拓展装置服务的智能终端的对应关系,确定最终接收本负载数据帧的帧体中的IP数据包的网络拓展装置的MAC地址(即最终接收装置的MAC地址)。优选的,上述数据收发子单元31构造的负载数据帧的帧体包括最终接收装置的MAC地址,并将上述最终接收装置的MAC地址设置为为上述负载数据帧的帧体的IP数据包的目的IP地址对应的智能终端提供无线网络服务的网络拓展装置的MAC地址(即服务查询响应中的网络拓展装置的MAC地址),以下阐述本发明原理采用上述优选的方式。
数据收发子单元31接收发送自本网络分享系统内网络拓展装置或其他网络接入装置的802.11数据帧,数据收发子单元31接收到发送自网络拓展装置或其他网络接入装置的802.11数据帧后,提取上述接收到的802.11数据帧的帧体的类型标记,若上述类型标记为路由数据标记,说明上述802.11数据帧为路由数据帧,则向预处理子单元33发送路由数据信息,路由数据信息包括上述接收到的路由数据帧的发送方MAC地址(即向本装置发送上述路由数据帧的本装置的相邻一跳装置的MAC地址)和上述接收到的路由数据帧的帧体的链路状态报文;若上述类型标记为负载数据标记,说明上述802.11数据帧为负载数据帧,则提取上述接收到的负载数据帧的帧体中的最终接收装置的MAC地址,若上述最终接收装置的MAC地址为本网络接入装置的MAC地址,说明上述接收到的负载数据帧的帧体中的IP数据包为网络拓展装置服务的智能终端发向互联网的IP数据包,本网络接入装置作为该智能终端向互联网发送数据时的最终装置,所述数据收发子单元31提取所述接收到的负载数据帧的帧体中的IP数据包,并将所述IP数据包发送至数据单元13,由数据单元13经网关单元将所述IP数据包发往互联网;若上述接收到的负载数据帧的帧体中的最终接收装置的MAC地址不为本网络接入装置的MAC地址,则说明本网络接入装置只是作为帧体中IP数据包多跳传输路径中的其中一跳(亦即所述负载数据帧的发送装置所选择的最优下一跳装置),此时本装置需要将上述负载数据帧的帧体中的IP数据包按照本装置确定的最优通信路径进行转发,具体的数据收发子单元31向路由子单元32发送路由查询请求,路由查询请求包括目的MAC地址,上述路由查询请求中的目的MAC地址为上述接收到的负载数据帧的帧体中的最终接收装置的MAC地址,路由子单元32根据路由查询请求中的目的MAC地址在本装置的相邻一跳装置中选择选择最优的下一跳装置并且向数据收发子单元31发送包括上述最优下一跳装置的MAC地址的路由查询响应(查询不到丢弃IP数据包),数据收发子单元31根据路由查询响应构造负载数据帧并发送,上述数据收发子单元31构造的负载数据帧的接收方MAC地址为路由查询响应中的最优下一跳的MAC地址,上述数据收发子单元31构造的负载数据帧的发送方MAC地址为数据收发子单元31的MAC地址,上述数据收发子单元31构造的负载数据帧的帧体为负载数据标记、最终接收装置的MAC地址和IP数据包,上述数据收发子单元31构造的负载数据帧的帧体 的最终接收装置的MAC地址为上述接收到的负载数据帧的帧体中的最终接收装置的MAC地址,上述数据收发子单元31构造的负载数据帧的帧体的IP数据包为上述接收到的负载数据帧的帧体中的IP数据包。最后数据收发子单元31将构造的负载数据帧按照其接收方MAC地址发往最优选择的下一跳装置。
这样对于每个网络接入装置,其自身服务的智能终端与互联网之间通过无线服务单元15、数据单元13和网关单元12进行通信。对于其他装置服务的智能终端与互联网之间的通信,所述网络接入装置通过网关单元和数据单元接收发送自互联网的IP数据包,并通过组网单元将所述IP数据包构造封装成负载数据帧并发往IP数据包目的地址对应的智能终端所在的网络拓展装置,所述网络接入装置接收其他装置发来的负载数据帧,并将负载数据帧中的IP数据包通过数据单元13和网关单元12发往互联网。所述网络接入装置产生负载数据帧是为了将发送自互联网并且以网络拓展装置服务的智能终端为目的的IP数据包发送至为所述智能终端提供无线网络服务的网络拓展装置,从而网络接入装置将产生的负载数据帧的帧体中的最终接收装置的MAC地址设置为为IP数据包的目的IP地址对应的智能终端提供无线网络服务的网络拓展装置的MAC地址,网络拓展装置或其他网络接入装置在转发上述负载数据帧时不改变上述负载数据帧的帧体中的最终接收装置的MAC地址。同时网络接入装置的组网单元与其他网络接入装置以及网络拓展装置之间通过收发路由数据帧来维护进行最优通信路径选择的路由信息,下面详细描述组网单元维护路由信息的过程。
如附图4,路由子单元32的原始链路状态报文产生模块42按照一定的时间间隔周期性地构造原始链路状态报文并发送至本装置的数据收发子单元31,数据收发子单元31将上述原始链路状态报文封装为路由数据帧后发送,称原始链路状态报文产生模块42构造的链路状态报文(未经过其他装置转发的链路状态报文)为原始链路状态报文,上述原始链路状态报文的原始发送方MAC地址为本装置的数据收发子单元31的MAC地址;上述原始链路状态报文的链路状态值为最大值,表明本装置与目的装置(此链路状态报文的原始发送方MAC地址对应的装置,也就是本装置)之间的链路状态是最好的;上述原始链路状态报文的序列号优选按照递增方式设置,即原始链路状态报文产生模块42每次新产生的链路状态报文中的序列号在原有基础上(上一次原始链路状态报文产生模块42产生的链路状态报文的序列号上)按照固定步长递增的方式变化,更优选的每次增加1(但并不以此为限,可以增加其他步长),链路状态报文中的序列号在转发过程不再发生变化;本装置为网络接入装置,因此原始链路状态报文产生模块42设置上述原始链路状态报文中的网关标记;本装置为网络接入装置,因此上述链路状态报文不包括终端信息。当本装置的相邻一跳装置接收到本装置发出的原始链路状态报文后,本装置的相邻一跳装置计算出其与本装置之间的链路状态,然后本装置的相邻一跳装置将本装置发出的原始链路状态报文中的链路状态值更新后再将符合条件的更新后的链路状态报文以广播的方式转发出去,然后,本装置的相邻两跳装置会接收、更新并转发上述本装置的相邻一跳装置转发的链路状态报文,本装置的相邻两跳装置再计算本装置的相邻两跳装置与本装置之间的链路状态,这样,通过多跳转发的方式,本装置产生的原始链路状态报文会被其他装置接收,其他装置可以计算出与本装置之间的链路状态,上述其他装置计算出的与本装置之间的链路状态作为其他装置以本装置为目的装置时选择最优下一跳的依据,本装置周期性地发送原始链路状态报文可以保证其他装置计算出的与本装置之间的链路状态的实时性。数据收发子单元31接收发送自路由 子单元32的原始链路状态报文产生模块42的原始链路状态报文并将上述原始链路状态报文封装为路由数据帧后发送,上述路由数据帧的接收方MAC地址为广播地址FF:FF:FF:FF:FF:FF,上述路由数据帧的发送方MAC地址为数据收发子单元31的MAC地址,上述路由数据帧的帧体为路由数据标记和上述原始链路状态报文。同时数据收发子单元31接收发送自本网络分享系统内其他网络拓展装置或其他网络接入装置的路由数据帧,并从路由数据帧中提取路由数据信息,所述路由数据信息包括路由数据帧的帧体中的链路状态报文和路由数据帧的发送方MAC地址(即向本装置发送上述路由数据帧的本装置的相邻一跳装置的MAC地址)。
所述网络接入装置周期性地产生并发送链路状态报文的情况如上所述,网络拓展装置也在周期性地产生并发送链路状态报文,本发明所述网络分享系统中的每个网络接入装置和每个网络拓展装置都在周期性地产生并发送链路状态报文,链路状态报文可能通过不同的多跳路径传输从而被本装置接收,本装置需要保证进一步处理的链路状态报文是最新的,因此组网单元14包括预处理子单元33,预处理子单元33通过维护预处理记录表判断发送自数据收发子单元31的路由数据信息是否是最新的,预处理记录表的表项包括原始发送方MAC地址、序列号和最新接收时间,所述预处理子单元33接收发送自数据收发子单元31的路由数据信息,路由数据信息包括链路状态报文和向本装置发送上述链路状态报文的本装置的相邻一跳装置的MAC地址,提取路由数据信息中的链路状态报文中的原始发送方MAC地址和路由数据信息的链路状态报文中的序列号,判断预处理记录表中是否存在原始发送方MAC地址为上述路由数据信息中的链路状态报文的原始发送方MAC地址的表项,若预处理记录表中不存在上述表项,说明上述链路状态报文是最新的,则在预处理记录表中新增一项记录,上述新增记录的原始发送方MAC地址为上述路由数据信息中的链路状态报文的原始发送方MAC,上述新增记录的序列号为上述路由数据信息中的链路状态报文的序列号,上述新增记录的最新接收时间为当前系统时间;若预处理记录表中存在上述表项,则进一步比较上述表项的序列号与上述路由数据信息中的链路状态报文的序列号的大小关系,若上述表项的序列号大于或者等于上述路由数据信息中的链路状态报文的序列号,说明上述链路状态报文不是最新的,则将上述路由数据信息丢弃,预处理过程结束,若上述表项的序列号小于上述路由数据信息中的链路状态报文的序列号,说明上述链路状态报文是最新的,因为如之前所述的每次新产生原始链路状态报文时其中的序列号增加1,则将上述表项的序列号更新为上述路由数据信息中的链路状态报文的序列号并将上述表项的最新接收时间更新为当前系统时间,预处理子单元33根据路由数据信息维护预处理记录表的过程如上所述,预处理子单元33只要确定上述路由数据信息中的链路状态报文是最新的(即对预处理记录表进行新增表项或者表项更新操作),则还需要进一步判断上述路由数据信息中的链路状态报文是否设置了网关标记,若上述路由数据信息中的链路状态报文设置了网关标记,说明上述路由数据信息中的链路状态报文为网络接入装置原始产生,则直接将上述路由数据信息发送至路由子单元32的路由信息维护模块41;若上述路由数据信息中的链路状态报文没有设置网关标记,说明上述路由数据信息中的链路状态报文为网络拓展装置原始产生,则向服务信息子单元34发送服务更新信息后再将上述路由数据信息发送至路由子单元32的路由信息维护模块41,网络拓展装置产生的链路状态报文包括终端信息,优选的终端信息为网络拓展装置服务的各个智能终端的MAC地址,上述预处理子单元33向服务信息子单元34发送的服务更新信息为上述路由数据信息中的链路状态报文的原始发送方MAC地址 和上述路由数据信息中的链路状态报文中的终端信息。这样,本装置接收到的其他装置发送来的所有最新的链路状态报文中的原始发送方MAC地址、链路状态报文中的序列号和最新接收时间都由预处理子单元33记录在预处理记录表中,同时预处理子单元33将这些包括最新的链路状态报文的路由数据信息发送至路由子单元32的路由信息维护模块41,并根据这些最新的链路状态报文向服务信息子单元34发送最新的服务更新信息。
服务信息子单元34通过维护服务信息表记录网络拓展装置以及网络拓展装置服务的智能终端的对应关系,服务信息表的表项包括网络拓展装置的MAC地址以及其所服务的智能终端的MAC地址,一个网络拓展装置MAC地址与一个智能终端MAC地址构成服务信息表的一个表项,一个网络拓展装置服务的智能终端可能不止一个,因此在服务信息表中同一个网络拓展装置的MAC地址可能对应多个表项。服务信息子单元34接收到发送自预处理子单元33的服务更新信息后,对于服务更新信息中的终端信息中的每一个智能终端MAC地址,都在服务信息表中查找网络拓展装置MAC地址为服务更新信息中的原始发送方MAC地址并且智能终端MAC地址为上述服务更新信息中的终端信息中的智能终端MAC地址的表项,若不能在服务信息表中查找到上述表项,则在服务信息表中新增一项记录,上述新增记录的网络拓展装置MAC地址为服务更新信息中的原始发送方MAC地址,上述新增记录的智能终端MAC地址为上述服务更新信息中的终端信息中的智能终端MAC地址;对于服务信息表中每一个网络拓展装置MAC地址为服务更新信息中的原始发送方MAC地址的表项,如果该表项中的智能终端MAC地址没有包括在服务更新信息中的终端信息包括的智能终端MAC地址中,则在服务信息表中删除该表项,这样服务信息表可以实现动态地记录网络拓展装置及其服务的智能终端间的对应关系。服务信息子单元34接收发送自数据收发子单元31的服务查询请求,服务查询请求包括智能终端的MAC地址,服务信息子单元34在服务信息表中查找智能终端的MAC地址为上述服务查询请求中的智能终端的MAC地址的表项,若不能查找到上述表项,则放弃此次通信过程,若可以查找到上述表项,则向数据收发子单元31发送服务查询响应,服务查询响应包括上述查找的表项中的网络拓展装置的MAC地址(即为上述服务查询请求中的MAC地址对应的智能终端提供无线网络服务的网络拓展装置的MAC地址)。
如附图4和5,路由信息维护模块41接收并处理发送自预处理子单元33的路由数据信息,路由数据信息包括链路状态报文和向本装置发送上述链路状态报文的本装置的相邻一跳装置的MAC地址,路由信息维护模块41提取上述路由数据信息中的链路状态报文,路由信息维护模块41判断上述链路状态报文是否需要转发,若需要转发则基于上述链路状态报文构造转发的链路状态报文并发送至数据收发子单元31;路由信息维护模块41接收发送自数据收发子单元31的路由查询请求,路由信息维护模块41根据路由查询请求向数据收发子单元31发送路由查询响应。作为本发明重要发明之处的路由信息维护模块41,主要用于处理发送自其他装置的链路状态报文(包括其他装置产生的链路状态报文和其他装置转发的链路状态报文),路由信息维护模块41通过处理上述链路状态报文计算本装置与其他装置之间的链路状态。具体的如图5所示,路由信息维护模块41包括链路状态计算子模块51、路由表子模块52和转发子模块53,下面详细描述本发明创新的各个子模块的工作过程。
链路状态计算子模块51根据发送自预处理子单元33的路由数据信息中的链路 状态报文计算链路状态值,本装置的相邻一跳装置与目的装置之间的链路状态用上述链路状态报文中的链路状态值表示,因此,本装置需要计算本装置与本装置的相邻一跳装置之间的链路状态,相对于本装置而言,本装置与本装置的相邻一跳装置之间的链路可以分为发送链路和接收链路,在本发明中,本装置与本装置的相邻一跳装置之间的链路状态指的是上述发送链路的链路状态;本发明采用本装置发送的数据被本装置的相邻一跳装置成功接收(直接或间接)并且被本装置的相邻一跳装置转发并且又被本装置成功接收的概率来表示本装置与本装置的相邻一跳装置之间的发送链路状态与接收链路状态的叠加值。具体的可以采用本装置发送的本装置产生的原始链路状态报文被本装置的相邻一跳装置成功接收并且被本装置的相邻一跳装置转发并且又被本装置成功接收的概率来表示本装置与本装置的相邻一跳装置之间的发送链路状态与接收链路状态的叠加值,也可以采用本装置发送的其他装置产生的链路状态报文被本装置的相邻一跳装置成功接收并且被本装置的相邻一跳装置转发并且又被本装置成功接收的概率来表示本装置与本装置的相邻一跳装置之间的发送链路状态与接收链路状态的叠加值。优选的,采用本装置发送的本装置产生的原始链路状态报文被本装置的相邻一跳装置成功接收并且被本装置的相邻一跳装置转发并且又被本装置成功接收的概率来表示本装置与本装置的相邻一跳装置之间的发送链路状态与接收链路状态的叠加值,以下阐述本发明原理的内容采用的是上述优选的方法。本发明采用本装置的相邻一跳装置发送的数据被本装置成功接收的概率来表示本装置与本装置的相邻一跳装置之间的接收链路状态的接收值,具体的可以采用本装置的相邻一跳装置发送的链路状态报文(包括本装置的相邻一跳装置原始产生的链路状态报文和本装置的相邻一跳装置转发的其他装置原始产生的链路状态报文)被本装置成功接收的概率来表示本装置与本装置的相邻一跳装置之间的接收链路状态的接收值,优选的采用本装置的相邻一跳装置发送的非本装置原始产生的链路状态报文被本装置成功接收的概率来表示本装置与本装置的相邻一跳装置之间的接收链路状态的接收值。因无法直接计算本装置与本装置的相邻一跳装置之间的发送链路状态,因此本发明采用间接计算的方法,首先本发明计算本装置发送的数据(优选本装置原始产生的原始链路状态报文)被本装置的相邻一跳装置成功接收并且被本装置的相邻一跳装置转发并且又被本装置成功接收的叠加概率,用以表示本装置与本装置的相邻一跳装置之间的发送链路状态与接收链路状态的叠加值,这种叠加概率可以表示为y=P1*P2,其中P1表示本装置发送的数据被本装置的相邻一跳装置成功接收的本装置的成功发送概率,P2表示本装置的相邻一跳装置发送的数据被本装置成功接收的本装置的成功接收概率,因此上述叠加概率可以反映本装置与本装置的相邻一跳装置之间的发送链路状态与接收链路状态。进一步的计算本装置的相邻一跳装置发送的数据(不一定为转发本装置发送的数据)被本装置成功接收的本装置的成功接收概率P2′,用以表示本装置与本装置的相邻一跳装置之间的接收链路状态的接收值。最后基于上述叠加概率和成功接收概率计算得到本装置发送的数据被本装置的相邻一跳装置成功接收的本装置的成功发送概率(P1*P2)/P2′,其中本发明中“*”表示乘积,“/”表示相除,这种成功发送概率可以反应本装置与本装置的相邻一跳装置之间的发送链路状态,成功发送概率高的相邻一跳装置将作为本装置发送数据时优选的下一跳装置,下面具体描述这一原理过程的创新实现方案,但本发明并不局限于这种收发概率计算方式。
链路状态计算子模块51维护第一绑定表,第一绑定表用来记录上述叠加值的对应关系,第一绑定表的表项包括候选路由MAC地址和叠加值,对于表中的每一项 记录都维护一个叠加队列,第一绑定表中的每项记录对应的叠加队列长度相同,叠加队列中存储链路状态报文的序列号,优选的,将叠加队列中序列号的数量与叠加队列长度的比值作为本装置发送的数据被本装置的相邻一跳装置成功接收并且被本装置的相邻一跳装置转发并且又被本装置成功接收的叠加概率,叠加队列中序列号的数量与叠加队列长度的比值即为对应表项的叠加值,第一绑定表中的各个表项对应的叠加队列的序列号移入、移出过程保持同步,叠加队列中的元素移入、移出叠加队列按照先入先出的原则。
链路状态计算子模块51维护第二绑定表,第二绑定表用来记录上述接收值的对应关系,第二绑定表的表项包括目的MAC地址、候选路由MAC地址、接收值和最新接收时间,对于表中的每项记录都维护一个接收队列,第二绑定表中的每项记录对应的接收队列的长度相同,且优选的所述接收队列与上述叠加队列的长度相同,接收队列中存储链路状态报文的序列号,优选的将接收队列中序列号的数量与接收队列长度的比值作为本装置的相邻一跳装置发送的数据被本装置成功接收的概率,接收队列中序列号的数量与接收队列长度的比值即为对应表项的接收值,第二绑定表中的目的MAC地址相同的表项对应的接收队列的序列号移入、移出过程保持同步,接收队列中的元素移入、移出叠加队列按照先入先出的原则。
链路状态计算子模块51接收发送自预处理子单元33的路由数据信息,路由数据信息包括链路状态报文和向本装置发送上述链路状态报文的本装置的相邻一跳装置的MAC地址,链路状态计算子模块51提取上述路由数据信息中的链路状态报文,若上述链路状态报文的原始发送方MAC地址为本装置的数据收发子单元31的MAC地址,表明此链路状态报文为本装置产生并且此链路状态报文被本装置的相邻一跳装置成功接收(直接或间接)后被该相邻一跳装置转发并且又被本装置成功接收,则更新第一绑定表。具体的,链路状态计算子模块51在第一绑定表中查找候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址的表项,若不能在第一绑定表中查找到上述表项,则在第一绑定表中新增一项记录,上述新增记录的候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址,新增记录后进行如下表项叠加值更新过程;若能在第一绑定表中查找到上述表项,则直接进行如下表项叠加值更新过程:设在第一绑定表中各个表项对应的叠加队列中的序列号的最大值为a,设链路状态计算子模块51接收到的路由数据信息中的链路状态报文的序列号为b,(b必然大于a,因为链路状态计算子模块51接收到的路由数据信息中的路由数据帧必然为最新产生的,其中链路状态报文中的序列号会在原来基础上(包括0)递增1,若b小于或者等于a,预处理子单元33会将上述路由数据信息丢弃,路由数据信息不会到达链路状态计算子模块51),称在第一绑定表中候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址的表项为本叠加表项,则第一绑定表中除本叠加表项以外的其他表项的叠加队列中依次存入(b-a)个空元素,向本叠加表项的叠加队列中依次存入(b-a-1)个空元素和序列号b,计算第一绑定表中各个表项的叠加值,叠加值为对应叠加队列中序列号的数量与叠加队列长度的比值,这样,通过向第一绑定表中的表项对应的叠加队列中存入序列号或者空元素,基于叠加队列的先入先出的特性,叠加值可以动态地表示出本装置与本装置的各个相邻一跳装置的发送链路状态与接收链路状态的叠加概率。在此对该技术原理进行详细的解释,如上所述第一绑定表中每一个表项记录有候选路由MAC地址和叠加值的对应关系,而且第一绑定表的更新仅限于本装置接收的路由数据信息中的路由数据帧的链路状态报文的原始发送方MAC地址为 本装置的数据收发子单元31的MAC地址,也就是说第一绑定表实际上记录了本装置产生的原始链路状态报文被本装置的相邻一跳装置接收并转发给本装置的发送链路和接收链路的通信情况,而且因为本装置每次新产生一个原始链路状态报文其中的序列号都会在原有基础上增加1,这样对应于本装置每个新产生的原始链路状态报文被本装置的相邻一跳装置转发回来的情况都会被链路状态计算子模块51自动更新在上述第一绑定表中,因为本装置发出的原始链路状态报文可能会被多个本装置的相邻一跳装置接收并转发回本装置,从而第一绑定表中可能有多个候选路由MAC地址,为了在这多个候选路由MAC地址中选择最优的候选路由MAC地址,本发明在上述更新中,每次向本叠加表项对应的叠加队列补入序列号,同时向其他表项对应的叠加队列补空(避免了叠加队列一直保持之前的序列号数量不变,保证了与所述本叠加表项处于同等的动态更新过程),在预定时间段内补入序列号最多的那个叠加队列所对应表项中的候选路由MAC所对应的装置应当是该段时间内接收本装置发出的原始链路状态报文并向本装置转发所述原始链路状态报文次数最多的装置,也就是说所述候选路由MAC地址(补入序列号最多的叠加队列所对应表项中的候选路由MAC地址)对应的本装置的相邻一跳装置在该段时间内与本装置的来回通信较为频繁,其相互之间的通信链路状态较佳,可作为本装置优先考虑的下一跳装置。所以上述叠加值能够反应本装置与本装置的相邻一跳装置之间成功发送通信和成功接收通信的叠加概率。为了计算这种叠加概率本发明引入上述叠加队列的概念,如上所述预定时间段内链路状态计算子模块51接收到的用于更新第一绑定表的路由数据信息越多,说明路由数据信息中的本装置的相邻一跳装置的MAC地址对应的本装置的相邻一跳装置与本装置间的收发通信越频繁,又因为每个新的路由数据信息都包括有一个新的序列号,因此预定时间段内更新的序列号的数量即可代表上述通信频繁程度,为进一步将这种序列号的更新数量转换为一种概率,引入所述叠加队列,利用补入叠加队列中的序列号的数量与叠加队列长度的比值来作为概率,即所述的叠加值,其能够有效地反映本装置与本装置的各个相邻一跳装置间的发送链路状态与接收链路状态的叠加概率,但本发明并不局限于这种概率计算方法,亦可采用其他成功通信概率计算方法,或者将所述叠加队列选择为其他概率归一参数等等,下面的接收队列以及接收值基于同样的原理考虑。
链路状态计算子模块51接收发送自预处理子单元33的路由数据信息,路由数据信息包括链路状态报文和向本装置发送上述链路状态报文的本装置的相邻一跳装置的MAC地址,链路状态计算子模块51提取上述路由数据信息中的链路状态报文,若上述链路状态报文的原始发送方MAC地址不为本网络接入装置中的数据收发子单元31的MAC地址,表明上述链路状态报文为其他装置(除本装置之外的装置,包括本装置的相邻一跳装置,这些其他装置可以作为本装置的目的装置)产生并且经过本装置的相邻一跳装置转发并且被本装置成功接收,则更新第二绑定表。具体的,链路状态计算子模块51在第二绑定表中查找目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址并且候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址的表项,若不能在第二绑定表中查找到上述表项,则在第二绑定表中新增一项记录,上述新增记录的目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址,上述新增记录的候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址,新增记录后进行如下表项接收值更新过程;若能在第二绑定表中查找到上述表项,则直接进行如下表项接收值更新过程:设在第二绑定表中目的MAC地址为路由数据信息中的链路状 态报文的原始发送方MAC地址的表项对应的接收队列的序列号的最大值为m,设链路状态计算子模块51接收到的路由数据信息中的链路状态报文的序列号为n(n必然大于m,若n小于或者等于m,预处理子单元34会将上述路由数据信息丢弃,链路状态计算子模块51不会收到上述路由数据信息),称在第二绑定表中目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址并且候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址的表项为本接收表项,向第二绑定表中目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址的表项中除本接收表项以外的其他表项的接收队列中依次存入(n-m)个空元素,向本接收表项的接收队列中依次存入(n-m-1)个空元素和序列号n,计算并更新第二绑定表中目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址表项的接收值,所述接收值为接收队列中序列号的数量与接收队列长度的比值,更新第二绑定表中的本接收表项的最新接收时间为当前系统时间。这样,通过向第二绑定表中的表项对应的接收队列中存入序列号或者空元素,基于接收队列的先入先出的特性,接收值可以动态地表示出本装置与本装置的各个相邻一跳装置的接收链路状态。第二绑定表中,每一个表项记录有目的MAC地址、候选路由MAC地址、接收值和最新接收时间的对应关系,其中目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址,也就是以路由数据信息中的链路状态报文的原始发送方MAC地址对应的装置作为本装置的目的装置,候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址,也就是将向本装置发送链路状态报文(目的装置原始产生的链路状态报文)的装置作为本装置向目的装置发送数据的、候选的下一跳装置。因此第二绑定表实际上记录了本装置接收本装置的相邻一跳装置发送的通信数据的接收链路的通信情况。同理本发明所述网络分享系统中的所有网络接入装置和所有网络拓展装置都周期性地产生原始链路状态报文并以广播的方式发送出去,本发明所述网络分享系统中的每个网络接入装置和每个网络拓展装置每次新产生一个原始链路状态报文其序列号都会在原有基础上增加1,这样其他装置每个新产生的原始链路状态报文被本装置的相邻一跳装置发送给本装置的情况都会被链路状态计算子模块51自动更新在上述第二绑定表中。同时所述第二绑定表中同样的目的MAC地址可能对应有多个候选路由MAC地址,为了在这多个候选路由MAC地址中选择最优的候选路由MAC地址,本发明在上述更新中,每次向本接收表项对应的接收队列补入序列号,同时向其他表项对应的接收队列补空(避免了接收队列一直保持之前的序列号数量不变,保证了与所述本接收表项处于同等的动态更新过程),在预定时间段内补入序列号最多的那个接收队列所对应表项中的候选路由MAC地址所对应的本装置的相邻一跳装置应当是该段时间内向本装置发送链路状态报文次数最多的装置,也就是说本装置在该段时间内接收所述候选路由MAC地址(补入序列号最多的接收队列所对应表项中的候选路由MAC)所对应的本装置的相邻一跳装置的发送的链路状态报文较为频繁,所以上述接收值能够反映所述候选路由MAC地址对应的本装置的相邻一跳装置发送的链路状态报文被本装置成功接收的接收概率,为了计算这种接收概率本发明引入上述接收队列的概念,如上所述预定时间段内链路状态计算子模块51接收到的用于更新第二绑定表的路由数据信息越多,说明路由数据信息中的本装置的相邻一跳装置的MAC地址对应的本装置的相邻一跳装置与本装置之间的通信越频繁,又因为每个新的路由数据信息都包括有一个新的序列号,因此预定时间段内更新的序列号的数量即可代表上述通信频繁程度,为进一步将这种序列号的更新数量转换为一种概率,引入所 述接收队列,利用补入接收队列中的序列号的数量与接收队列长度的比值来作为概率,即所述的接收值,其能够有效地反映本装置与本装置的各个相邻一跳装置间的接收链路状态的成功接收概率。为便于后面运算,在计算所述叠加概率和接收概率时,由于序列号的补入数量是客观的,优选的将作为其概率归一化基础的叠加队列的长度与接收队列的长度选择为一致。
链路状态计算子模块51接收发送自预处理子单元33的路由数据信息,路由数据信息包括链路状态报文和向本装置发送上述链路状态报文的本装置的相邻一跳装置的MAC地址,链路状态计算子模块51提取上述路由数据信息中的链路状态报文,若上述链路状态报文的原始发送方MAC地址不为本装置的数据收发子单元31的MAC地址,表明上述链路状态报文为其他装置(除本装置之外的装置,包括本装置的相邻一跳装置,这些其他装置可以作为本装置的目的装置)产生并且经过本装置的相邻一跳装置转发并且被本装置成功接收,则按照上述过程更新第二绑定表,同时在更新第二绑定表后,链路状态计算子模块51还需要更新上述路由数据信息中的链路状态报文(由其他装置产生)的链路状态值并将更新后的链路状态报文发送至转发子模块53,也就是说链路状态计算子模块51基于接收到的路由数据信息每次更新第二绑定表时,同时需要更新所述路由数据信息中的链路状态报文的链路状态值,具体的设更新前路由数据信息中的链路状态报文(其中链路状态报文的原始发送方MAC地址不为本装置的数据收发子单元31的MAC地址)的链路状态值为x,链路状态计算子模块51读取该链路状态值为x,并在第一绑定表中查找候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址的表项,若不能在第一绑定表中查找到上述表项,则将路由数据信息直接丢弃,链路状态报文更新过程结束;若能在第一绑定表中查找到上述表项(表明第一绑定表和第二绑定表中本装置在发送和接收数据时对应有相同的候选MAC地址),设上述在第一绑定表中查找到的表项的叠加值为y,设在第二绑定表中的本接收表项(目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址并且候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址的表项)的更新后的接收值为z,y表示本装置发送的数据被路由数据信息中的本装置的相邻一跳装置的MAC地址对应的本装置的相邻一跳装置成功接收并且被该装置转发并且又被本装置成功接收的叠加概率,z表示路由数据信息中的本装置的相邻一跳装置的MAC地址对应的本装置的相邻一跳装置发送的数据被本装置成功接收的概率,则本装置发送的数据被路由数据信息中的本装置的相邻一跳装置的MAC地址对应的本装置的相邻一跳装置成功接收的概率为y/z,因为如前所述的叠加概率y可以表示为:y=(P1*P2),其中P1表示本装置发送的数据被本装置的相邻一跳装置成功接收的成功发送概率,P2表示本装置的相邻一跳装置发送的数据被本装置成功接收的成功接收概率,z与所述P2等同,因此通过y/z即可得到P1,也就是本装置向路由数据信息中的本装置的相邻一跳装置的MAC地址对应的本装置的相邻一跳装置成功发送数据的概率,并且优选的在对值y和z的归一化处理中选用同一分母也就是叠加队列和接收队列的长度相同,这样当y/z<1时,将更新后的路由数据信息的链路状态报文的链路状态值设置为x*(y/z),因为本装置与上述链路状态报文的原始发送方MAC地址对应的装置之间的链路状态比本装置的相邻一跳装置(发送此链路状态报文的装置)与上述链路状态报文的原始发送方MAC地址对应的装置之间的链路状态更差,链路状态值应当减小,将更新后的链路状态报文发送至转发子模块53;当y/z≥1时,将路由数据信息的链路状态报文的链路状态值保持原值不变,因为本装置与上述链路状态报文 的原始发送方MAC地址对应的装置之间的链路状态不会比本装置的相邻一跳装置(发送此链路状态报文的装置)与上述链路状态报文的原始发送方MAC地址对应的装置之间的链路状态更优,并直接将上述路由数据信息的链路状态报文发送至转发子模块53,也将这种情况下的链路状态报文称为更新后的链路状态报文。
无线信道的链路状态存在抖动,因此本装置通过计算本装置与目的装置的最近几次链路状态的平均值来确定本装置与目的装置之间的链路状态,链路状态计算子模块51维护第三绑定表,第三绑定表用来记录上述链路状态平均值的对应关系,第三绑定表的表项包括目的MAC地址、候选路由MAC地址和链路状态均值,链路状态均值用来表示最近几次链路状态的平均值,对于表中的每项记录都维护一个均值队列,第三绑定表中的每项记录对应的均值队列的长度相同,均值队列中存储链路状态值,链路状态均值为均值队列中的链路状态值的平均值。链路状态计算子模块51每次向转发子模块53发送更新后的链路状态报文后(亦即每次更新链路状态报文的链路状态值时),同时需要根据所述路由数据信息和更新后的链路状态报文来更新第三绑定表,具体的,在第三绑定表中查找目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址并且候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址的表项,并向查找到的表项的均值队列中存入更新后的该链路状态报文的链路状态值,计算上述表项的链路状态均值,链路状态均值为均值队列中的链路状态值的平均值,若不能在第三绑定表中查找到上述表项,则在第三绑定表中新增一项记录,上述新增记录的目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址,上述新增记录的候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址,在第三绑定表中新增上述记录后,向该表项的均值队列中存入更新后的链路状态报文的链路状态值,计算该表项的链路状态均值,链路状态均值为均值队列中的链路状态值的平均值。在第三绑定表每次更新完成后,链路状态计算子模块51在第三绑定表中查找目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址的所有表项,在这些表项中选取链路状态均值最大的表项,向路由表子模块52发送路由更新信息,路由更新信息包括上述选取的表项的目的MAC地址和上述选取的表项的候选路由MAC地址。路由更新信息表明当本装置向路由更新信息中的目的MAC地址对应的装置(目的装置)发送数据时,如果以路由更新信息中的候选路由MAC地址对应的装置为下一跳,则可以实现本装置与路由更新信息中的目的MAC地址对应的装置(目的装置)之间的链路状态最优通信。
路由表子模块52维护第四绑定表,第四绑定表记录目的MAC地址和下一跳MAC地址的对应关系,第四绑定表的表项包括目的MAC地址和下一跳MAC地址,路由表子模块52接收发送自链路状态计算子模块51的路由更新信息,路由更新信息包括目的MAC地址和候选路由MAC地址,路由表子模块52在第四绑定表中查找目的MAC地址为路由更新信息中的目的MAC地址的表项,若可以在第四绑定表中查找到上述表项,则将上述表项的下一跳MAC地址更新为路由更新信息中的候选路由MAC地址;若在第四绑定表中查找不到上述表项,则在第四绑定表中新增一项记录,上述新增记录的目的MAC地址为路由更新信息中的目的MAC地址,上述新增记录的下一跳MAC地址为路由更新信息中的候选路由MAC地址。路由表子模块52接收发送自数据收发子单元31的路由查询请求,路由查询请求包括目的MAC地址,路由表子模块52在第四绑定表中查找目的MAC地址为路由查询请求中的目的MAC地址的表项,若不能在第四绑定表中查找到上述表项,则放弃此次 通信过程,若可以在第四绑定表中查找到上述表项,则向数据收发子单元31发送路由查询响应,路由查询响应包括上述在第四绑定表中查找到的表项中的下一跳MAC地址。这样本发明中每个装置通过其原始链路状态报文产生子模块按照预定的时间周期间隔发送原始链路状态报文,每个装置通过其自身发送的原始链路状态报文被相邻的装置转发并被自己接收的通信过程维护自身的第一绑定表,同时每个装置通过接收其他装置发送的链路状态报文维护自身的第二绑定表和第三绑定表,最后基于这些绑定表的相关信息维护自身的第四绑定表,从而在每个装置的第四绑定表中记录了通信链路状态处于最佳(链路状态均值最大)的各组目的MAC地址和下一跳MAC地址的对应关系,使得每个装置要向第四绑定表中记录的目的MAC地址对应的装置发送通信数据时,通过选择所述目的MAC地址所在表项中的下一跳MAC地址对应的装置作为下一跳装置,能够确保处于最佳的通信路径。本网络分享系统中的每个网络接入装置和每个网络拓展装置都以此方式选择下一跳装置,能够确保本网络分享系统中的各个网络接入装置和各个网络拓展装置之间处于最佳的通信状态。
转发子模块53接收发送自链路状态计算子模块51的更新后的链路状态报文,进行如下处理:
(1)判断上述链路状态报文中的传输距离是否小于或者等于1,若是,则将此链路状态报文丢弃,不转发此链路状态报文,若不是,进入步骤(2);
(2)将上述链路状态报文中的传输距离减1并发送至数据收发子单元31,称上述转发子模块53向数据收发子单元31发送的上述处理后的链路状态报文为转发的链路状态报文。数据收发子单元31接收上述发送自转发子模块53的转发的链路状态报文并将上述转发的链路状态报文封装为路由数据帧后发送,上述路由数据帧的接收方MAC地址为广播地址FF:FF:FF:FF:FF:FF,上述路由数据帧的发送方MAC地址为数据收发子单元31的MAC地址,上述路由数据帧的帧体为路由数据标记和上述转发的链路状态报文。
在本网络分享系统中,存在网络接入装置或者网络拓展装置退出无线自组织网络的情况,需要保证本网络分享系统中的每个网络接入装置和每个网络拓展装置维护的关于目的装置的路由信息是最新的,因此组网单元14包括定时更新子单元35对上述情况进行处理。具体的,定时更新子单元35按照一定的时间间隔周期性地遍历预处理子单元33维护的预处理记录表,对于预处理记录表中的每一项记录都判断最新接收时间和当前时间的差值,若差值超过一定的阈值,表明本装置维护的关于此表项的原始发送方MAC地址对应的目的装置的路由信息已经不是最新的,需要删除以此装置为目的装置的路由信息,则在预处理记录表中删除此项记录,设此项记录的原始发送方MAC地址为time_out_mac,并且,在服务信息子单元34维护的服务信息表中删除网络拓展装置MAC地址为time_out_mac的表项,在链路状态计算子模块51维护的第二绑定表中删除目的MAC地址为time_out_mac的表项,在链路状态计算子模块51维护的第三绑定表中删除目的MAC地址为time_out_mac的表项,在路由表子模块52维护的第四绑定表中删除目的MAC地址为time_out_mac的表项。定时更新子单元35按照一定的时间间隔周期性地遍历链路状态计算子模块51维护的第二绑定表,对于第二绑定表中的每一项记录都判断最新接收时间和当前时间的差值,若差值超过一定的阈值,表明本装置维护的关于此表项的候选路由MAC地址对应的本装置的相邻一跳装置的路由信息已经不是最新的,则在第二绑定表中删除此项记录,设此项记录的目的MAC地址为dest_mac,候选路由MAC地址 为cand_mac,在第三绑定表中删除目的MAC地址为dest_mac并且候选路由MAC地址为cand_mac的表项,链路状态计算子模块51在第三绑定表中查找目的MAC地址为dest_mac的表项,从上述在第三绑定表中查找到的表项中选取链路状态均值最大的表项,向路由表子模块52发送路由更新信息,路由更新信息包括上述选取的表项的目的MAC地址和上述选取的表项的候选路由MAC地址。
本发明所述网络分享系统中的网络拓展装置包括组网单元61和无线服务单元62,无线服务单元62包括客户端接入子单元71和IP地址分配子单元72,客户端接入子单元71依据802.11标准在AP(Access Point,接入点)模式下工作并为智能终端提供无线网络服务,客户端接入子单元71接收本客户端接入子单元71服务的智能终端发送的IP数据包,客户端接入子单元71提取上述IP数据包的目的IP地址,当根据IP数据包的目的IP地址判断上述IP数据包为本网络拓展装置的客户端接入子单元71服务的智能终端发向互联网的IP数据包时,则将上述IP数据包发送至组网单元61;当根据IP数据包的目的IP地址判断上述IP数据包为本网络拓展装置的客户端接入子单元71服务的智能终端发向本网络分享系统内其他装置(网络拓展装置、网络接入装置及其所服务的智能终端)的IP数据包时,将上述IP数据包丢弃,杜绝这种通信,以保证网络分享系统内的访问安全。客户端接入子单元71接收组网单元61的数据收发子单元81发送的IP数据包,根据上述IP数据包的目的IP地址将上述IP数据包发送给本客户端接入子单元71服务的对应智能终端,如附图6-7所示。
为了避免接入本网络分享系统提供的无线网络(包括网络接入装置提供的无线网络和网络拓展装置提供的无线网络)的智能终端的IP地址发生冲突,需要为每个接入本网络分享系统提供的无线网络(包括网络接入装置提供的无线网络和网络拓展装置提供的无线网络)的智能终端分配在本网络分享系统中唯一的IP地址,因此网络拓展装置的无线服务单元62包括IP地址分配子单元72,IP地址分配子单元72为接入客户端接入子单元71提供的无线网络的智能终端分配唯一的IP地址,网络拓展装置的IP地址分配子单元72和网络接入装置的IP地址分配子单元22都基于智能终端的MAC地址为智能终端分配IP地址,网络拓展装置的IP地址分配子单元72和网络接入装置的IP地址分配子单元22基于智能终端的MAC地址为智能终端分配IP地址的规则相同,不同的智能终端的MAC地址是不同的,基于性能优异的算法可以对不同的MAC地址计算出不同的IP地址,使得接入本网络分享系统提供的无线网络(包括网络接入装置提供的无线网络和网络拓展装置提供的无线网络)中的所有智能终端的IP地址均不相同,从而可以确保接入本网络分享系统中的智能终端不会因IP地址重复而出现冲突。
如附图8-10所示,组网单元61包括数据收发子单元81、路由子单元82、预处理子单元83和定时更新子单元84。所述数据收发子单元81按照802.11标准在Ad-Hoc模式下工作,本网络拓展装置服务的智能终端访问互联网时,所述智能终端向为其提供无线网络的本网络拓展装置的无线服务单元的客户端接入子单元71发送IP数据包,所述客户端接入子单元71将所述IP数据包发送至所述数据收发子单元81,所述数据收发子单元81接收到来自客户端接入子单元71的IP数据包时,先向路由子单元82发送网关查询请求,路由子单元82向数据收发子单元81发送网关查询响应,网关查询响应包括本网络拓展装置选择的最优的网络接入装置的MAC地址,之后数据收发子单元81向路由子单元82发送路由查询请求,路由查询请求包括目的MAC地址,上述路由查询请求中的目的MAC地址为上述网关查询响应中 的本网络拓展装置选择的最优的网络接入装置的MAC地址,路由子单元82根据路由查询请求中的目的MAC地址在本装置的相邻一跳装置中选择选择最优的下一跳装置并且向数据收发子单元81发送包括上述最优下一跳装置的MAC地址的路由查询响应,这样组网单元61确定了最优的网络接入装置并且以上述最优的网络接入装置为目的装置在本装置的相邻一跳装置中选择了最优的下一跳装置,数据收发子单元81根据网关查询响应和路由查询响应构造负载数据帧并发送,具体的数据收发子单元81构造的负载数据帧的接收方MAC地址为上述路由查询响应中的最优下一跳的MAC地址,上述数据收发子单元81构造的负载数据帧的发送方MAC地址为数据收发子单元81的MAC地址,优选的,上述数据收发子单元81构造的负载数据帧的帧体结构与网络接入装置的数据收发子单元31构造的负载数据帧的帧体的结构一致,即上述数据收发子单元81构造的负载数据帧的帧体为负载数据标记、最终接收装置的MAC地址和上述IP数据包,上述数据收发子单元81构造的负载数据帧的帧体中的最终接收装置的MAC地址为上述网关查询响应中的本网络拓展装置选择的最优的网络接入装置的MAC地址,上述数据收发子单元81构造的负载数据帧的帧体中的IP数据包为数据收发子单元81接收的发送自客户端接入子单元71的所述IP数据包。这样能够确保将智能终端发往互联网的上述IP数据包按照最优的通信路径传输至上述选择的最优的网络接入装置,当多跳路径上的其他装置接收到本负载数据帧后,通过提取本负载数据帧的帧体中的最终接收装置的MAC地址可以直接确定最终接收本负载数据帧的网络接入装置的MAC地址,并以类似的方式选择最优下一跳,最终将所述IP数据包发往作为最终接收装置的网络接入装置,经由网络接入装置将IP数据包发往互联网,实现对互联网的访问。
对于本网络拓展装置转发其他装置发送的802.11数据帧时,数据收发子单元81接收发送自其他网络拓展装置或网络接入装置的802.11数据帧,提取上述接收到的802.11数据帧的帧体的类型标记,若上述类型标记为路由数据标记,说明上述802.11数据帧为路由数据帧,则向预处理子单元83发送路由数据信息,路由数据信息包括上述接收到的路由数据帧的发送方MAC地址(即向本装置发送上述路由数据帧的本装置的相邻一跳装置的MAC地址)和上述接收到的路由数据帧的帧体的链路状态报文;若上述类型标记为负载数据标记,说明上述802.11数据帧为负载数据帧,则提取上述接收到的负载数据帧的帧体中的最终接收装置的MAC地址,若上述最终接收装置的MAC地址为本网络拓展装置的数据收发子单元81的MAC地址,说明上述接收到的负载数据帧的帧体中的IP数据包为本网络拓展装置服务的智能终端与互联网之间通信的数据包,则数据收发子单元81提取上述接收到的负载数据帧的帧体中的IP数据包并发送至无线服务单元62的客户端接入子单元71,客户端接入子单元71再根据上述IP数据包的目的IP地址将上述IP数据包交付给客户端服务子单元71服务的智能终端;若上述最终接收装置的MAC地址不为本网络拓展装置的数据收发子单元81的MAC地址,说明本网络拓展装置为多跳路径中的一跳,本网络拓展装置需要将上述接收到的负载数据帧的帧体中的IP数据包转发,上述接收到的负载数据帧的帧体中的最终接收装置的MAC地址可能为网络接入装置的MAC地址,也可能为其他网络拓展装置的MAC地址,本网络拓展装置需要以上述负载数据帧的帧体中的最终接收装置的MAC地址对应的网络接入装置或网络拓展装置为目的装置在本网络拓展装置的相邻一跳装置中选择最优的下一跳装置,具体的,数据收发子单元81向路由子单元82发送路由查询请求,路由查询请求包括目的MAC地址,上述路由查询请求中的目的MAC地址为上述接收到的负载数据帧的帧 体中的最终接收装置的MAC地址,路由子单元82根据路由查询请求中的目的MAC地址在本装置的相邻一跳装置中选择选择最优的下一跳装置并且向数据收发子单元81发送包括上述最优下一跳装置的MAC地址的路由查询响应,数据收发子单元81根据路由查询响应构造负载数据帧并发送,具体的,上述数据收发子单元81构造的负载数据帧的接收方MAC地址为上述路由查询响应中的最优下一跳的MAC地址,上述数据收发子单元81构造的负载数据帧的发送方MAC地址为数据收发子单元81的MAC地址,上述数据收发子单元81构造的负载数据帧的帧体包括负载数据标记、上述接收到的负载数据帧的帧体中的最终接收装置的MAC地址和上述接收到的负载数据帧的帧体中的IP数据包,这样,能够确保将上述接收到的负载数据帧的帧体中的IP数据包按照最优的通信路径传输至上述接收到的负载数据帧的帧体中的最终接收装置MAC对应的网络接入装置或网络拓展装置。
关于网络拓展装置构造的负载数据帧帧体中的最终接收装置的MAC地址,在网络拓展装置接收本网络拓展装置服务的智能终端发向互联网的IP数据包后需要根据所述IP数据包产生负载数据帧,在此情况下,网络拓展装置产生负载数据帧是为了将网络拓展装置服务的智能终端发向互联网的IP数据包发送至网络拓展装置选择的最优的网络接入装置,因此网络拓展装置将产生的负载数据帧的帧体中的最终接收装置的MAC地址设置为网络拓展装置选择的最优的网络接入装置的MAC地址,其他网络拓展装置或网络接入装置在转发上述负载数据帧时不改变上述负载数据帧的帧体中的最终接收装置的MAC地址。
路由子单元82的原始链路状态报文产生模块92按照一定的时间间隔周期性地构造原始链路状态报文并发送至本装置的数据收发子单元81,数据收发子单元81将上述原始链路状态报文封装为路由数据帧后发送,也称原始链路状态报文产生模块92构造的链路状态报文(未经过其他装置转发的链路状态报文)为原始链路状态报文,上述原始链路状态报文的原始发送方MAC地址为本装置的数据收发子单元81的MAC地址;上述原始链路状态报文的链路状态值为最大值,表明本装置与目的装置(此链路状态报文的原始发送方MAC地址对应的装置,也就是本装置)之间的链路状态是最好的;上述原始链路状态报文的序列号设置规则与网络接入装置的组网单元14的路由子单元32的原始链路状态报文产生模块42产生的原始链路状态报文的序列号设置规则相同,即上述原始链路状态报文的序列号优选按照递增方式设置,即原始链路状态报文产生模块92每次新产生的链路状态报文中的序列号在原有基础上(上一次原始链路状态报文产生模块92产生的链路状态报文的序列号上)按照固定步长递增的方式变化,更优选的每次增加1(但并不以此为限,可以增加其他步长),链路状态报文中的序列号在转发过程不再发生变化;本装置为网络拓展装置,因此原始链路状态报文产生模块92不设置上述原始链路状态报文中的网关标记;本装置为网络拓展装置,因此上述链路状态报文包括终端信息,终端信息表示网络拓展装置服务的智能终端的地址信息,优选的,上述原始链路状态报文产生模块92产生的原始链路状态报文中的终端信息为本网络拓展装置服务的各个智能终端的MAC地址,当本网络分享系统中的网络接入装置接收到网络拓展装置产生的链路状态报文后通过处理链路状态报文中的终端信息可以实现动态地记录网络拓展装置与其服务的智能终端的对应关系。当本网络拓展装置的相邻一跳装置接收到本装置发出的原始链路状态报文后,本装置的相邻一跳装置计算出其与本装置之间的链路状态,然后本装置的相邻一跳装置将本装置发出的原始链路状态报文中的链路状态值更新再将符合条件的更新后的链路状态报文以广播的方式转发出去,然 后,本装置的相邻两跳装置会接收、更新并转发上述本装置的相邻一跳装置转发的链路状态报文,本装置的相邻两跳装置再计算本装置的相邻两跳装置与本装置之间的链路状态,这样,通过多跳转发的方式,本装置产生的原始链路状态报文会被其他装置接收,其他装置可以计算出与本装置之间的链路状态,上述其他装置计算出的与本装置之间的链路状态作为其他装置以本装置为目的装置时选择最优下一跳的依据,本装置周期性地发送原始链路状态报文可以保证其他装置计算出的与本装置之间的链路状态的实时性。数据收发子单元81接收发送自路由子单元82的原始链路状态报文产生模块92的原始链路状态报文并将上述原始链路状态报文封装为路由数据帧后发送,上述路由数据帧的接收方MAC地址为广播地址FF:FF:FF:FF:FF:FF,上述路由数据帧的发送方MAC地址为数据收发子单元81的MAC地址,上述路由数据帧的帧体为路由数据标记和上述原始链路状态报文;同时数据收发子单元81接收发送自本网络分享系统内其他网络拓展装置或其他网络接入装置的路由数据帧,并从路由数据帧中提取路由数据信息,所述路由数据信息包括路由数据帧的帧体中的链路状态报文和路由数据帧的发送方MAC地址(即向本装置发送上述路由数据帧的本装置的相邻一跳装置的MAC地址)。
本发明所述网络分享系统中的每个网络接入装置和每个网络拓展装置都在周期性地产生并发送链路状态报文,链路状态报文可能通过不同的多跳路径传输从而被本装置接收,本装置需要保证进一步处理的链路状态报文是最新的,因此组网单元61包括预处理子单元83,预处理子单元83通过维护预处理记录表判断发送自数据收发子单元81的路由数据信息是否是最新的,本网络拓展装置的预处理子单元83维护的预处理记录表的结构与网络接入装置维护的预处理记录表的结构相同,即本网络拓展装置的预处理子单元83维护的预处理记录表的表项包括原始发送方MAC地址、序列号和最新接收时间,预处理子单元83接收发送自数据收发子单元81的路由数据信息,路由数据信息包括链路状态报文和向本装置发送上述链路状态报文的本装置的相邻一跳装置的MAC地址,预处理子单元83提取上述路由数据信息中的链路状态报文的原始发送方MAC地址和上述路由数据信息中的链路状态报文的序列号,判断预处理记录表中是否存在原始发送方MAC地址为上述路由数据信息中的链路状态报文的原始发送方MAC地址的表项,若预处理记录表中不存在上述表项,说明上述链路状态报文是最新的,则在预处理记录表中新增一项记录并将上述路由数据信息发送至路由子单元82,上述新增记录的原始发送方MAC地址为上述路由数据信息中的链路状态报文的原始发送方MAC,上述新增记录的序列号为上述路由数据信息中的链路状态报文的序列号,上述新增记录的最新接收时间为当前系统时间;若预处理记录表中存在上述表项,则进一步比较上述表项的序列号与上述路由数据信息中的链路状态报文的序列号的大小关系,若上述表项的序列号大于或者等于上述路由数据信息中的链路状态报文的序列号,说明上述链路状态报文不是最新的,则将上述路由数据信息丢弃,预处理过程结束,若上述表项的序列号小于上述路由数据信息中的链路状态报文的序列号,说明上述链路状态报文是最新的,因为如之前所述的每次新产生原始链路状态报文时其中的序列号增加1,则将上述表项的序列号更新为上述路由数据信息中的链路状态报文的序列号并将上述表项的最新接收时间更新为当前系统时间并将上述路由数据信息发送至路由子单元82,这样本装置接收到的其他装置发送来的所有最新的链路状态报文中的原始发送方MAC地址、链路状态报文中的序列号和最新接收时间都由预处理子单元83记录在预处理记录表中,同时这些最新的路由数据信息经预处理子单元83发送至路由子单 元82。
路由信息维护模块91接收并处理发送自预处理子单元83的路由数据信息,路由数据信息包括链路状态报文和向本装置发送上述链路状态报文的本装置的相邻一跳装置的MAC地址,路由信息维护模块91提取上述路由数据信息中的链路状态报文,路由信息维护模块91判断上述链路状态报文是否需要转发,若需要转发则基于上述链路状态报文构造转发的链路状态报文并发送至数据收发子单元81;路由信息维护模块91接收发送自数据收发子单元81的路由查询请求,路由信息维护模块91根据路由查询请求向数据收发子单元81发送路由查询响应;路由信息维护模块91接收发送自数据收发子单元81的网关查询请求,路由信息维护模块91根据网关查询请求向数据收发子单元81发送网关查询响应。作为本发明重要发明之处的路由信息维护模块91,主要用于处理发送自其他装置的链路状态报文(包括其他装置产生的链路状态报文和其他装置转发的链路状态报文),路由信息维护模块91通过处理上述链路状态报文计算本装置与其他装置之间的链路状态。具体的如图10所示,路由信息维护模块91包括链路状态计算子模块101、路由表子模块102、网关选择子模块103和转发子模块104,下面详细描述路由信息维护模块91的各个子模块的工作过程。
链路状态计算子模块101根据发送自预处理子单元83的路由数据信息中的的链路状态报文计算链路状态值,本装置的相邻一跳装置与目的装置之间的链路状态用上述链路状态报文中的链路状态值表示,因此,本装置需要计算本装置与本装置的相邻一跳装置之间的链路状态,相对于本装置而言,本装置与本装置的相邻一跳装置之间的链路可以分为发送链路和接收链路,在本发明中,本装置与本装置的相邻一跳装置之间的链路状态指的是上述发送链路的链路状态;本发明采用本装置发送的数据被本装置的相邻一跳装置成功接收(直接或间接)并且被本装置的相邻一跳装置转发并且又被本装置成功接收的概率来表示本装置与本装置的相邻一跳装置之间的发送链路状态与接收链路状态的叠加值。具体的,与网络接入装置一致,优选采用本装置发送的本装置产生的原始链路状态报文被本装置的相邻一跳装置成功接收并且被本装置的相邻一跳装置转发并且又被本装置成功接收的概率来表示本装置与本装置的相邻一跳装置之间的发送链路状态与接收链路状态的叠加值。本发明采用本装置的相邻一跳装置发送的数据被本装置成功接收的概率来表示本装置与本装置的相邻一跳装置之间的接收链路状态的接收值,具体的,与网络接入装置一致,优选采用本装置的相邻一跳装置发送的非本装置原始产生的链路状态报文被本装置成功接收的概率来表示本装置与本装置的相邻一跳装置之间的接收链路状态的接收值。因无法直接计算本装置与本装置的相邻一跳装置之间的发送链路状态,因此本发明采用间接计算的方法,首先本发明计算本装置发送的数据(优选本装置原始产生的原始链路状态报文)被本装置的相邻一跳装置成功接收并且被本装置的相邻一跳装置转发并且又被本装置成功接收的叠加概率,用以表示本装置与本装置的相邻一跳装置之间的发送链路状态与接收链路状态的叠加值,这种叠加概率可以表示为b=n1*n2,其中n1表示本装置发送的数据被本装置的相邻一跳装置成功接收的本装置的成功发送概率,n2表示本装置的相邻一跳装置发送的数据被本装置成功接收的本装置的成功接收概率,因此上述叠加概率可以反映本装置与本装置的相邻一跳装置之间的发送链路状态与接收链路状态。进一步的计算本装置的相邻一跳装置发送的数据(不一定为转发本装置发送的数据)被本装置成功接收的本装置的成功接收概率n2′,用以表示本装置与本装置的相邻一跳装置之间的接收链路状态的接收 值。最后基于上述叠加概率和成功接收概率计算得到本装置发送的数据被本装置的相邻一跳装置成功接收的本装置的成功发送概率(n1*n2)/n2′,这种成功发送概率可以反应本装置与本装置的相邻一跳装置之间的发送链路状态,成功发送概率高的相邻一跳装置将作为本装置发送数据时优选的下一跳装置,下面具体描述这一原理过程的优选方案,但并不因此为限,本领域技术人员可以在本方案的技术构思下采用其他(如非队列归一下的概率统计)通信概率计算方法。
链路状态计算子模块101维护第一绑定表,链路状态计算子模块101维护的第一绑定表用来记录上述叠加值的对应关系,链路状态计算子模块101维护的第一绑定表与链路状态计算子模块51维护的第一绑定表的表项相同,即链路状态计算子模块101维护的第一绑定表的表项包括候选路由MAC地址和叠加值,对于链路状态计算子模块101维护的第一绑定表中的每一项记录都维护一个叠加队列,链路状态计算子模块101维护的第一绑定表中的每项记录对应的叠加队列长度与链路状态计算子模块51维护的第一绑定表中的每项记录对应的叠加队列的长度相同,叠加队列中存储链路状态报文的序列号,将叠加队列中序列号的数量与叠加队列长度的比值作为本装置发送的数据被本装置的相邻一跳装置成功接收并且被本装置的相邻一跳装置转发并且又被本装置成功接收的叠加概率,叠加队列中序列号的数量与叠加队列长度的比值即为对应表项的叠加值,链路状态计算子模块101维护的第一绑定表中的各个表项对应的叠加队列的序列号移入、移出过程保持同步,叠加队列中的元素移入、移出叠加队列按照先入先出的原则。
链路状态计算子模块101维护第二绑定表,链路状态计算子模块101维护的第二绑定表用来记录上述接收值的对应关系,链路状态计算子模块101维护的第二绑定表与链路状态计算子模块51维护的第二绑定表的表项相同,即链路状态计算子模块101维护的第二绑定表的表项包括目的MAC地址、候选路由MAC地址、接收值和最新接收时间,对于链路状态计算子模块101维护的第二绑定表中的每项记录都维护一个接收队列,第二绑定表中的每项记录对应的接收队列的长度相同,且优选的所述接收队列与链路状态计算子模块101维护的第一绑定表中的每项记录对应的叠加队列长度相同,接收队列中存储链路状态报文的序列号,将接收队列中序列号的数量与接收队列长度的比值作为本装置的相邻一跳装置发送的数据被本装置成功接收的概率,接收队列中序列号的数量与接收队列长度的比值即为对应表项的接收值,链路状态计算子模块101维护的第二绑定表中的目的MAC地址相同的表项对应的接收队列的序列号移入、移出过程保持同步,接收队列中的元素移入、移出接收队列按照先入先出的原则。
链路状态计算子模块101接收并处理发送自预处理子单元83的路由数据信息,路由数据信息包括链路状态报文和向本装置发送上述链路状态报文的本装置的相邻一跳装置的MAC地址,链路状态计算子模块101提取上述路由数据信息中的链路状态报文,若上述链路状态报文的原始发送方MAC地址为本网络拓展装置的数据收发子单元81的MAC地址,表明此链路状态报文为本装置产生并且此链路状态报文被本装置的相邻一跳装置成功接收(直接或间接)后被该相邻一跳装置转发并且又被本装置成功接收,则更新链路状态计算子模块101维护的第一绑定表。链路状态计算子模块101更新链路状态计算子模块101维护的第一绑定表的过程与前述链路状态计算子模块51更新链路状态计算子模块51维护的第一绑定表的过程相同,在此不做重复描述。
链路状态计算子模块101接收发送自预处理子单元83的路由数据信息,路由数 据信息包括链路状态报文和向本装置发送上述链路状态报文的本装置的相邻一跳装置的MAC地址,链路状态计算子模块101提取上述路由数据信息中的链路状态报文,若上述链路状态报文的原始发送方MAC地址不为本网络拓展装置的数据收发子单元31的MAC地址,表明上述链路状态报文为其他装置(除本网络拓展装置之外的装置,包括本装置的相邻一跳装置,这些其他装置可以作为本装置的目的装置)产生并且经过本装置的相邻一跳装置转发并且被本装置成功接收,则更新链路状态计算子模块101维护的第二绑定表。链路状态计算子模块101更新链路状态计算子模块101维护的第二绑定表的过程与前述链路状态计算子模块51更新链路状态计算子模块51维护的第二绑定表的过程相同,在此不做重复描述。同时在更新第二绑定表后,链路状态计算子模块101还需要更新上述路由数据信息中的链路状态报文(上述由其他装置产生的链路状态报文)的链路状态值并将更新后的链路状态报文发送至转发子模块104,也就是说链路状态计算子模块101基于接收到的路由数据信息每次更新第二绑定表时,同时要更新所述路由数据信息中的链路状态报文的链路状态值,具体的设更新前路由数据信息中的链路状态报文(其中链路状态报文的原始发送方MAC地址不为本装置的数据收发子单元81的MAC地址)的链路状态值为a,链路状态计算子模块101读取该链路状态值为a,并在第一绑定表中查找候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址的表项,若不能在第一绑定表中查找到上述表项,则将路由数据信息直接丢弃,链路状态报文更新过程结束;若能在第一绑定表中查找到上述表项(表明第一绑定表和第二绑定表中本装置在发送和接收数据时对应有相同的候选MAC地址),设上述在第一绑定表中查找到的表项的叠加值为b,设在第二绑定表中的目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址并且候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址的表项的更新后的接收值为c,b表示本装置发送的数据被路由数据信息中的本装置的相邻一跳装置的MAC地址对应的本装置的相邻一跳装置成功接收并且被该装置(路由数据信息中的本装置的相邻一跳装置的MAC地址对应的本装置的相邻一跳装置)转发并且又被本装置成功接收的叠加概率,c表示路由数据信息中的本装置的相邻一跳装置的MAC地址对应的本装置的相邻一跳装置发送的数据被本装置成功接收的概率,则本装置发送的数据被路由数据信息中的本装置的相邻一跳装置的MAC地址对应的本装置的相邻一跳装置成功接收的概率为b/c,如前所述的叠加概率b可以表示为:b=n1*n2,其中n1表示本装置发送的数据被路由数据信息中的本装置的相邻一跳装置的MAC地址对应的本装置的相邻一跳装置成功接收的成功发送概率,n2表示本装置的相邻一跳装置发送的数据被本装置成功接收的成功接收概率,c与n2等同,因此通过b/c即可得到n1,也就是本装置向本装置的相邻一跳装置成功发送数据的概率,并且优选的在对值b和c的归一化处理中选用同一分母也就是叠加队列和接收队列的长度相同,这样当b/c<1时,将更新后的路由数据信息的链路状态报文的链路状态值设置为a*(b/c),因为本装置与上述链路状态报文的原始发送方MAC地址对应的装置之间的链路状态比本装置的相邻一跳装置(发送此链路状态报文的装置)与上述链路状态报文的原始发送方MAC地址对应的装置之间的链路状态更差,链路状态值应当减小,将更新后的链路状态报文发送至转发子模块104;当b/c≥1时,将路由数据信息的链路状态报文的链路状态值保持原值不变,因为本装置与上述链路状态报文的原始发送方MAC地址对应的装置之间的链路状态不会比本装置的相邻一跳装置(发送此链路状态报文的装置)与上述链路状态报文的原始发送方MAC地址对应的装置之 间的链路状态更优,并直接将上述路由数据信息的链路状态报文发送至转发子模块104,也将这种情况下的链路状态报文称为更新后的链路状态报文。这种链路状态计算子模块101更新链路状态报文的过程与链路状态计算子模块51更新链路状态报文的过程完全相同,且两者中叠加队列和接收队列长度均相同。
无线信道的链路状态存在抖动,因此本网络拓展装置通过计算本网络拓展装置与目的装置的最近几次链路状态的平均值来确定本网络拓展装置与目的装置之间的链路状态,链路状态计算子模块101维护第三绑定表,第三绑定表用来记录上述链路状态平均值的对应关系,链路状态计算子模块101维护的第三绑定表及其维护过程与链路状态计算子模块51维护的第三绑定表及其维护过程相同,即链路状态计算子模块101维护的第三绑定表的表项包括目的MAC地址、候选路由MAC地址和链路状态均值,链路状态均值用来表示最近几次链路状态的平均值,对于链路状态计算子模块101维护的第三绑定表中的每项记录对应的均值队列的长度相同,链路状态计算子模块101维护的第三绑定表中的每项记录对应的均值队列的长度与链路状态计算子模块51维护的第三绑定表中的每项记录对应的均值队列的长度相同,均值队列中存储链路状态值,链路状态均值为均值队列中的链路状态值的平均值。链路状态计算子模块101每次向转发子模块104发送更新后的链路状态报文后,同时需要根据路由数据信息和更新后的链路状态报文来更新第三绑定表,链路状态计算子模块101更新链路状态计算子模块101维护的第三绑定表的过程与链路状态计算子模块51更新链路状态计算子模块51维护的第三绑定表的过程相同,即具体的,在第三绑定表中查找目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址并且候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址的表项,并向查找到的上述表项的均值队列中存入更新后的该链路状态报文的链路状态值,计算上述表项的链路状态均值,链路状态均值为均值队列中的链路状态值的平均值,并用计算的链路状态均值更新所述表项中的链路状态均值。若不能在第三绑定表中查找到上述表项,则在第三绑定表中新增一项记录,上述新增记录的目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址,上述新增记录的候选路由MAC地址为路由数据信息中的本装置的相邻一跳装置的MAC地址,在第三绑定表中新增上述记录后,向新增表项的均值队列中存入更新后的链路状态报文的链路状态值,计算该表项的链路状态均值,链路状态均值为均值队列中的链路状态值的平均值,并将计算的链路状态均值作为该新增表项中的链路状态均值。
链路状态计算子模块101每次更新第三绑定表后,链路状态计算子模块101在第三绑定表中查找目的MAC地址为路由数据信息中的链路状态报文的原始发送方MAC地址的所有表项,在这些表项中选取链路状态均值最大的表项,向路由表子模块102发送路由更新信息,路由更新信息包括上述选取的表项的目的MAC地址和上述选取的表项的候选路由MAC地址,路由更新信息表明当本装置向路由更新信息中的目的MAC地址对应的装置(目的装置)发送数据时,如果以路由更新信息中的候选路由MAC地址对应的装置为下一跳,则可以实现本装置与路由更新信息中的目的MAC地址对应的装置(目的装置)之间的链路状态最优通信。链路状态计算子模块101在向路由表子模块102发送路由更新信息时,同时要判断所述路由数据信息中的链路状态报文是否设置有网关标记,若是则说明上述路由数据信息中的链路状态报文为网络接入装置原始产生,上述路由数据信息中的链路状态报文的原始发送方MAC地址即为产生所述链路状态报文的网络接入装置的MAC地址,此 时所述链路状态计算子模块101还需要向网关选择子模块103发送网关更新信息,所述网关更新信息包括上述在第三绑定表中选取的链路状态均值最大的表项中的目的MAC地址和链路状态均值,网关更新信息表明本装置与网关更新信息中的目的MAC地址对应的装置(也就是路由更新信息中的目的MAC地址对应的装置,也是路由数据信息中的链路状态报文的原始发送方MAC地址对应的网络接入装置)之间可以达到的最优的链路状态,并且路由表子模块102借助路由更新信息记录了本装置与原始产生上述链路状态报文的网络接入装置(网关更新信息中的目的MAC地址对应的装置,也是路由更新信息中的目的MAC地址对应的装置)之间达到上述最优的链路状态时本装置选择的下一跳装置。
路由表子模块102维护第四绑定表,第四绑定表记录目的MAC地址和下一跳MAC地址的对应关系,路由表子模块102维护的第四绑定表的表项与路由表子模块52维护的第四绑定表的表项相同,即路由表子模块102维护的第四绑定表的表项包括目的MAC地址和下一跳MAC地址,路由表子模块102接收发送自链路状态计算子模块101的路由更新信息,路由更新信息包括目的MAC地址和候选路由MAC地址,路由表子模块102在第四绑定表中查找目的MAC地址为路由更新信息中的目的MAC地址的表项,若可以在第四绑定表中查找到上述表项,则将上述表项的下一跳MAC地址更新为路由更新信息中的候选路由MAC地址;若在第四绑定表中查找不到上述表项,则在第四绑定表中新增一项记录,上述新增记录的目的MAC地址为路由更新信息中的目的MAC地址,上述新增记录的下一跳MAC地址为路由更新信息中的候选路由MAC地址。路由表子模块102接收发送自数据收发子单元81的路由查询请求,路由查询请求包括目的MAC地址,路由表子模块102在第四绑定表中查找目的MAC地址为路由查询请求中的目的MAC地址的表项,若不能在第四绑定表中查找到上述表项,则放弃此次通信过程,若可以在第四绑定表中查找到上述表项,则向数据收发子单元81发送路由查询响应,路由查询响应包括上述在第四绑定表中查找到的表项的下一跳MAC地址。这样本发明中每个装置通过其原始链路状态报文产生子模块按照预定的时间周期间隔发送原始链路状态报文,每个装置通过其自身发送的原始链路状态报文被相邻的装置转发并被自己接收的通信过程维护自身的第一绑定表,同时每个装置通过接收其他装置发送的链路状态报文维护自身的第二绑定表和第三绑定表,最后基于这些绑定表的相关信息维护自身的第四绑定表,从而在每个装置的第四绑定表中记录了通信链路状态处于最佳(链路状态均值最大)的各组目的MAC地址和下一跳MAC地址的对应关系,使得每个装置要向第四绑定表中记录的目的MAC地址对应的装置发送通信数据时,通过选择所述目的MAC地址所在表项中的下一跳MAC地址对应的装置作为下一跳装置,能够确保处于最佳的通信路径。本网络分享系统中的每个网络接入装置和每个网络拓展装置都以此方式选择下一跳装置,能够确保本网络分享系统中的各个网络接入装置和各个网络拓展装置之间处于最佳的通信状态。
网关选择子模块103维护网关列表,网关列表的表项包括网络接入装置的MAC地址和链路状态均值,网关选择子模块103接收发送自链路状态计算子模块101的网关更新信息,网关更新信息包括目的MAC地址和链路状态均值,网关选择子模块103根据接收到的网关更新信息更新网关列表,具体的网关选择子模块103在网关列表中查找网络接入装置MAC地址为网关更新信息中的目的MAC地址的表项,若可以在网关列表中查找到上述表项,则将上述表项的链路状态均值更新为网关更新信息中的链路状态均值,若在网关列表中查找不到上述表项,则在网关列表中新 增一项纪录,上述新增记录的网络接入装置MAC地址为网关更新信息中的目的MAC地址,上述新增记录的链路状态均值为网关更新信息中的链路状态均值。网关选择子模块103接收发送自数据收发子单元81的网关查询请求,并在网关列表中查找链路状态均值最大的表项,若在网关列表中查找不到上述表项(网关列表为空),则放弃此次通信过程;若可以在网关列表中查找到上述表项(网关列表不为空),则向数据收发子单元81发送网关查询响应,所述网关查询响应包括网关列表中查找到的表项中的网络接入装置的MAC地址。这样本发明中的每个网络拓展装置通过维护网关列表记录了关于各个网络接入装置分别可以达到的最优的链路状态(链路状态均值最大)的对应关系,在上述各个网络接入装置中选择链路状态均值最大的网络接入装置作为最终接收本网络拓展装置数据的网络接入装置(即本网络拓展装置的最终接收装置),能够确保本网络拓展装置与上述作为最终接收装置的网络接入装置之间处于最佳的通信状态。数据收发子单元81根据网关查询响应向路由表子模块102发送路由查询请求,路由查询请求包括目的MAC地址,上述路由查询请求中的目的MAC地址为上述网关查询响应中的网络接入装置的MAC地址,路由表子模块102在第四绑定表中查询目的MAC地址为路由查询请求中目的MAC地址的表项,若无法查找到则放弃本次通信,若查找到则向数据收发子单元81发送路由查询响应,所述路由查询响应包括在第四绑定表中查找到的所述表项中的下一跳MAC地址。这样,组网单元61确定了最优的网络接入装置并且以上述最优的网络接入装置为目的装置在本装置的相邻一跳装置中选择了最优的下一跳装置,数据收发子单元81根据网关查询响应和路由查询响应构造负载数据帧并发送,具体的数据收发子单元81构造的负载数据帧的接收方MAC地址为上述路由查询响应中的下一跳MAC地址,上述数据收发子单元81构造的负载数据帧的发送方MAC地址为数据收发子单元81的MAC地址,上述数据收发子单元81构造的负载数据帧的帧体为负载数据标记、最终接收装置的MAC地址和上述IP数据包,上述数据收发子单元81构造的负载数据帧的帧体中的最终接收装置的MAC地址为上述网关查询响应中的网络接入装置的MAC地址。这样能够确保将IP数据包按照最优的通信路径传输至上述选择的最优的网络接入装置,当多跳路径上的其他装置接收到本负载数据帧后,通过提取本负载数据帧的帧体中的最终接收装置的MAC地址可以直接确定最终接收本负载数据帧的网络接入装置的MAC地址。
转发子模块104接收发送自链路状态计算子模块101的更新后的链路状态报文,进行如下处理:
(1)判断上述链路状态报文的传输距离是否小于或者等于1,若是,则将此链路状态报文丢弃,不转发此链路状态报文,若不是,进入步骤(2);
(2)将上述链路状态报文的传输距离减1并发送至数据收发子单元81,称上述转发子模块104向数据收发子单元81发送的上述处理后的链路状态报文为转发的链路状态报文。数据收发子单元38接收上述发送自转发子模块104的转发的链路状态报文并将上述转发的链路状态报文封装为路由数据帧后发送,上述路由数据帧的接收方MAC地址为广播地址FF:FF:FF:FF:FF:FF,上述路由数据帧的发送方MAC地址为数据收发子单元81的MAC地址,上述路由数据帧的帧体为路由数据标记和上述转发的链路状态报文。
在本网络分享系统中,存在网络接入装置或者网络拓展装置退出无线自组织网络的情况,需要保证本网络分享系统中的每个网络接入装置和每个网络拓展装置维护的关于目的装置的路由信息是最新的,因此组网单元61包括定时更新子单元84 对上述情况进行处理。具体的,定时更新子单元84按照一定的时间间隔周期性地遍历预处理子单元83维护的预处理记录表,对于预处理记录表中的每一项记录都判断最新接收时间和当前时间的差值,若差值超过一定的阈值,表明本装置维护的关于此表项的原始发送方MAC地址对应的目的装置的路由信息已经不是最新的,需要删除以此装置为目的装置的路由信息,则在预处理记录表中删除此项记录,设此项记录的原始发送方MAC地址为delay_mac,并且,在链路状态计算子模块101维护的第二绑定表中删除目的MAC地址为delay_mac的表项,在链路状态计算子模块101维护的第三绑定表中删除目的MAC地址为delay_mac的表项,在路由表子模块102维护的第四绑定表中删除目的MAC地址为delay_mac的表项,在网关选择子模块103维护的网关列表中删除网络接入装置MAC地址为delay_mac的表项。定时更新子单元84按照一定的时间间隔周期性地遍历链路状态计算子模块101维护的第二绑定表,对于第二绑定表中的每一项记录都判断最新接收时间和当前时间的差值,若差值超过一定的阈值,表明本装置维护的关于此表项的候选路由MAC地址对应的本装置的相邻一跳装置的路由信息已经不是最新的,则在第二绑定表中删除此项记录,设此项记录的目的MAC地址为goal_mac,候选路由MAC地址为select_mac,在第三绑定表中删除目的MAC地址为goal_mac并且候选路由MAC地址为select_mac的表项,链路状态计算子模块51在第三绑定表中查找目的MAC地址为goal_mac的表项,从上述在第三绑定表中查找到的表项中选取链路状态均值最大的表项,向路由表子模块52发送路由更新信息,路由更新信息包括上述选取的表项的目的MAC地址和上述选取的表项的候选路由MAC地址。
最后在前述内容的基础上给出本发明创新设计的所述网络分享系统的运行原理和通信过程。如前所述的,本发明所述的网络分享系统包括若干个网络接入装置和若干个网络拓展装置,网络接入装置直接连接到互联网并为网络接入装置覆盖范围内的智能终端提供无线网络服务,智能终端通过接入网络接入装置提供的无线网络可以访问互联网;网络接入装置与网络拓展装置形成无线自组织网络,网络拓展装置通过无线自组织网络连接到网络接入装置从而间接连接到互联网,并且网络拓展装置为其覆盖范围内的智能终端提供无线网络服务,智能终端通过接入网络拓展装置提供的无线网络可以访问互联网,网络接入装置的通信对象包括自身服务的智能终端、其他网络接入装置和网络拓展装置。网络拓展装置的通信对象包括自身服务的智能终端、网络接入装置和其他网络拓展装置。
本发明所述的网络分享系统中的每个网络接入装置和每个网络拓展装置都在周期性的产生并发送链路状态报文,本发明所述的网络分享系统中的每个装置接收到链路状态报文后经过处理会将链路状态报文发送出去,本发明所述的网络分享系统中的每个装置接收到非本装置原始产生的链路状态报文后会将原始产生上述链路状态报文的装置作为目的装置,将向本装置发送上述非本装置原始产生的链路状态报文的本装置的相邻一跳装置作为本装置向上述目的装置发送数据时的候选下一跳装置,本装置在上述本装置的候选下一跳装置中选择最优的下一跳装置作为向上述目的装置发送数据时的最优下一跳装置,通过这样的过程,本发明所述网络分享系统中的每个装置(包括网络接入装置和网络拓展装置)都维护了以其他装置为目的装置的路由信息。网络接入装置产生的链路状态报文包括网关标记,网络拓展装置通过网关标记识别网络拓展装置接收到的链路状态报文是否为网络接入装置原始产生,网络拓展装置基于网路接入装置原始产生地链路状态报文维护网关信息,网络拓展装置接收到网络接入装置原始产生地链路状态报文后,将上述原始产生此链路 状态报文的网络接入装置作为候选的网络接入装置,网络拓展装置在本网络拓展装置的候选网络接入装置中选择最优的一个作为本网络拓展装置向互联网发送数据时选择的网络接入装置。网络拓展装置原始产生的链路状态报文包括终端信息,网络接入装置接收到网络拓展装置原始产生的链路状态报文后,通过处理上述网络拓展装置原始产生的链路状态报文可以确定终端信息(网络拓展装置与网络拓展装置服务的智能终端的对应关系)。本发明所述的网络分享系统中的每个网络接入装置都维护路由信息和终端信息,本发明所述的网络分享系统中的每个网络拓展装置都维护路由信息和网关信息,路由信息、终端信息和网关信息是本发明所述网络分享系统正常运行的基础。下面给出具体的通信过程。
对于某个网络接入装置服务的智能终端访问互联网的情况,智能终端会将其发向互联网的IP数据包发送至为该其提供无线网络服务的网络接入装置的客户端接入子单元21,客户端接入子单元21接收到上述IP数据包后提取IP数据包的目的IP地址,当根据目的IP地址判断该IP数据包要发往互联网时,客户端接入子单元21将该IP数据包发送至数据单元13,数据单元13再将该IP数据包发送至网关单元12,由网关单元12将该IP数据包进行NAT处理后发向互联网。
对于网络接入装置接收来自互联网的IP数据包的情况,网关单元12对上述发送自互联网的IP数据包进行NAT处理后发送至数据单元13,数据单元13接收到该IP数据包后提取IP数据包的目的IP地址,若其目的IP地址为本网络接入装置的无线服务单元15的客户端接入子单元21服务的某一智能终端的IP地址,则数据单元13将所述IP数据包发送至无线服务单元15的客户端接入子单元21,客户端接入子单元21再根据所述IP数据包的目的IP地址将所述IP数据包发送给本客户端接入子单元21服务的对应智能终端;若数据单元13判定所述IP数据包的目的IP地址不为本网络接入装置的无线服务单元15的客户端接入子单元21服务的某一智能终端的IP地址,则数据单元13将该IP数据包发送至组网单元14的数据收发子单元31,数据收发子单元31接收到该IP数据包后提取IP数据包的目的IP地址,并基于该目的IP地址先向ARP单元11发送地址查询请求,地址查询请求包括所述IP数据包的目的IP地址,ARP单元11向数据收发子单元31发送地址查询响应,所述地址查询响应包括与地址查询请求中的目的IP地址对应的MAC地址,然后数据收发子单元31根据上述地址查询响应向服务信息子单元34发送服务查询请求,服务查询请求包括上述地址查询响应中的MAC地址(即所述IP数据包的目的IP地址对应的智能终端的MAC地址),服务信息子单元34根据服务查询请求向数据收发子单元31发送服务查询响应,所述服务查询响应包括为上述服务查询请求中的MAC地址对应的智能终端提供无线网络服务的网络拓展装置的MAC地址,之后数据收发子单元31向路由子单元32发送路由查询请求,路由查询请求包括目的MAC地址,上述路由查询请求中的目的MAC地址为服务查询响应中的网络拓展装置的MAC地址,路由子单元32根据路由查询请求中的目的MAC地址在其维护的第四绑定表中查找目的MAC地址与所述路由查询请求中的目的MAC地址相同的表项,并将所查找到的表项中的下一跳MAC地址作为路由查询响应发给数据收发子单元31,数据收发子单元31根据路由查询响应构造负载数据帧并发送,上述数据收发子单元31构造的负载数据帧的接收方MAC地址为路由查询响应中的下一跳MAC地址,上述数据收发子单元31构造的负载数据帧的发送方MAC地址为本装置中的数据收发子单元31的MAC地址,上述数据收发子单元31构造的负载数据帧的帧体为负载数据标记、最终接收装置的MAC地址和上述发送自数据单元13的IP数据 包,上述数据收发子单元31构造的负载数据帧的帧体的最终接收装置的MAC地址为服务查询响应中的网络拓展装置的MAC地址。
对于网络接入装置的组网单元接收发送自网络拓展装置或其他网络接入装置的负载数据帧的情况,数据收发子单元31接收到发送自网络拓展装置或其他网络接入装置的负载数据帧后,数据收发子单元31提取上述接收到的负载数据帧的帧体中的最终接收装置的MAC地址,若上述最终接收装置的MAC地址为本网络接入装置的MAC地址,则数据收发子单元31提取上述接收到的负载数据帧的帧体中的IP数据包并发送至数据单元13,数据单元13接收到所述IP数据包后将所述IP数据包发送至网关单元12,网关单元12接收到所述IP数据包后将所述IP数据包进行NAT处理后发向互联网;若上述最终接收装置的MAC地址不为本网络接入装置的MAC地址,则数据收发子单元31先向路由子单元32发送路由查询请求,路由查询请求包括目的MAC地址,上述路由查询请求中的目的MAC地址为上述最终接收装置的MAC地址,路由子单元32根据路由查询请求中的目的MAC地址在其维护的第四绑定表中查找目的MAC地址与所述路由查询请求中的目的MAC地址相同的表项,并将所查找到的表项中的下一跳MAC地址作为路由查询响应发给数据收发子单元31,数据收发子单元31根据路由查询响应构造负载数据帧并发送,上述数据收发子单元31构造的负载数据帧的接收方MAC地址为路由查询响应中的下一跳MAC地址,上述数据收发子单元31构造的负载数据帧的发送方MAC地址为数据收发子单元31的MAC地址,上述数据收发子单元31构造的负载数据帧的帧体为负载数据标记、最终接收装置的MAC地址和IP数据包,上述数据收发子单元31构造的负载数据帧的帧体的最终接收装置的MAC地址为上述数据收发子单元31接收到的负载数据帧的帧体中的最终接收装置的MAC地址,上述数据收发子单元31构造的负载数据帧的帧体的IP数据包为上述数据收发子单元31接收到的负载数据帧的帧体中的IP数据包。
对于某个网络拓展装置服务的智能终端访问互联网的情况,智能终端会将其发向互联网的IP数据包发送至为该智能终端提供无线网络服务的网络拓展装置的客户端接入子单元71,客户端接入子单元71接收到所述IP数据包后提取所述IP数据包的目的IP地址,当根据目的IP地址判断该IP数据包要发往互联网时,客户端接入子单元71将所述IP数据包发送至数据收发子单元81,数据收发子单元81接收到所述IP数据包后,先向路由子单元82发送网关查询请求,路由子单元82向数据收发子单元81发送网关查询响应,网关查询响应包括某网络接入装置的MAC地址,该网络接入装置作为本网络拓展装置向互联网发送数据的最优数据接收装置,之后数据收发子单元81向路由子单元82发送路由查询请求,路由查询请求包括目的MAC地址,上述路由查询请求中的目的MAC地址为上述网关查询响应中的网络接入装置的MAC地址,路由子单元82根据路由查询请求中的目的MAC地址在其维护的第四绑定表中查找目的MAC地址与所述路由查询请求中的目的MAC地址相同的表项,并将所查找到的表项中的下一跳MAC地址作为路由查询响应发给数据收发子单元81,然后数据收发子单元81根据网关查询响应和路由查询响应构造负载数据帧并发送,上述数据收发子单元81构造的负载数据帧的接收方MAC地址为上述路由查询响应中的下一跳MAC地址,上述数据收发子单元81构造的负载数据帧的发送方MAC地址为数据收发子单元81的MAC地址,上述数据收发子单元81构造的负载数据帧的帧体为负载数据标记、最终接收装置的MAC地址和IP数据包,上述数据收发子单元81构造的负载数据帧的帧体中的最终接收装置的MAC地址为上述 网关查询响应中的网络接入装置的MAC地址,上述数据收发子单元81构造的负载数据帧的帧体中的IP数据包为数据收发子单元81接收的发送自客户端接入子单元71的IP数据包。
对于网络拓展装置的组网单元接收发送自网络接入装置或其他网络拓展装置的负载数据帧的情况,数据收发子单元81接收到发送自网络接入装置或其他网络拓展装置的负载数据帧后,数据收发子单元81提取上述接收到的负载数据帧的帧体中的最终接收装置的MAC地址,若上述最终接收装置的MAC地址为本网络拓展装置的MAC地址,则数据收发子单元81提取上述接收到的负载数据帧的帧体中的IP数据包并发送至无线服务单元62的客户端接入子单元71,客户端接入子单元71接收到所述IP数据包后,根据所述IP数据包的目的IP地址将所述IP数据包发送给客户端接入子单元71服务的对应智能终端;若上述最终接收装置的MAC地址不为本网络拓展装置的MAC地址,则数据收发子单元81先向路由子单元82发送路由查询请求,路由查询请求包括目的MAC地址,上述路由查询请求中的目的MAC地址为上述最终接收装置的MAC地址,路由子单元82根据路由查询请求中的目的MAC地址在其维护的第四绑定表中查找目的MAC地址与所述路由查询请求中的目的MAC地址相同的表项,并将所查找到的表项中的下一跳MAC地址作为路由查询响应发给数据收发子单元81,数据收发子单元81根据路由查询响应构造负载数据帧并发送,上述数据收发子单元81构造的负载数据帧的接收方MAC地址为路由查询响应中的最优下一跳的MAC地址,上述数据收发子单元81构造的负载数据帧的发送方MAC地址为数据收发子单元81的MAC地址,上述数据收发子单元81构造的负载数据帧的帧体为负载数据标记、最终接收装置的MAC地址和IP数据包,上述数据收发子单元81构造的负载数据帧的帧体的最终接收装置的MAC地址为上述数据收发子单元81接收到的负载数据帧的帧体中的最终接收装置的MAC地址,上述数据收发子单元81构造的负载数据帧的帧体的IP数据包为上述数据收发子单元81接收到的负载数据帧的帧体中的IP数据包。
这样本发明所述的网络分享系统创新设置了若干网络接入装置和网络拓展装置,且所述网络接入装置和网络拓展装置都提供无线网络服务,大大拓展了无线网络的覆盖范围,具有广阔的推广应用前景,以下给出本发明的一个实施例。
实施例1
以下结合附图11-14给出基于本发明所述创新原理的具体实施例,通过本实施例阐述本发明中的网络接入装置和网络拓展装置分别在本装置的相邻一跳装置中选择最优的装置作为下一跳的过程以及网络拓展装置选择最优的网络接入装置的过程以及借助上述选择的最优的下一跳装置和上述最优的网络接入装置以多跳的方式传输智能终端与互联网之间交互的数据包的过程,假设初始情况下,本发明所述网络分享系统中有网络接入装置a、网络接入装置b、网络拓展装置c、网络拓展装置d、网络拓展装置e和网络拓展装置f,上述六个装置的相对位置以及上述六个装置服务的智能终端的对应关系如图11所示,a的一跳范围内只有b、c、d,b的一跳范围内只有a、c、d,c的一跳范围内只有a、b、d、e、f,d的一跳范围内只有a、b、c、e、f,e的一跳范围内只有c、d、f,f的一跳范围内只有c、d、e,a为智能终端client1和智能终端client2提供无线网络服务,b为智能终端client3和智能终端client4提供无线网络服务,c为智能终端client5和智能终端client6提供无线网络服务,d为智能终端client7和智能终端client8提供无线网络服务,e为智能终端client9和智能终端client10提供无线网络服务,f为智能终端client11和智能终端client12提供无线 网络服务。
以下为叙述简便,不同的参数使用特定的符号来代替,所涉及的参数与符号的对照如下表4所示:
表4 参数与符号对照表
Figure PCTCN2016101290-appb-000004
Figure PCTCN2016101290-appb-000005
举例说明IP地址的分配过程,IP地址使用二进制表示为32位,IP使用十六进制表示为8位,MAC地址使用二进制表示为48位,MAC地址使用十六进制表示为12位,设a、b、c、d、e为智能终端分配的IP地址的前两位(IP地址使用8位十六进制表示时的前两位,也就是IP地址使用32位二进制表示时的前8位)相同并且都为0A(十六进制表示),设client1_mac为0A0B0C0D0E0F(为简洁表示MAC地址,此处MAC地址使用十六进制表示,并且此MAC地址一般表示为0A:0B:0C:0D:0E:0F,此处为说明计算过程省略了“:”,下同),a使用MD5算法对0A0B0C0D0E0F进行计算得128位二进制数,为简洁起见将上述计算得到的128位二进制数转换为十六进制为348C7D6F98BEC35CEAF394504B7F173F,在上述计算结果中截取后6位为7F173F,则a为client1分配的IP地址使用十六进制表示为0A7F173F,将上述十六进制表示的IP地址转换为点分十进制为10.127.23.63,即a为client1分配的IP地址为10.127.23.63;设client2_mac为0B0C0D0E0F0A,a使用MD5算法对0B0C0D0E0F0A进行计算得到128位二进制数,为简洁起见将上述计算得到的128位二进制数转换为十六进制为856F0A9AE912B0274190EE0876A89E75,在上述计算结果中截取后6位为A89E75,则a为client2分配的IP地址使用十六进制表示为0AA89E75,将上述十六进制表示的IP地址转换为点分十进制为10.168.158.117,即a为client2分配的IP地址为10.168.158.117;设client5_mac为0C0D0E0F0A0B,c使用MD5算法对0C0D0E0F0A0B进行计算得到128位二进制数,为简洁起见将上述计算得到的128位二进制数转换为十六进制为05BFF7A28F867C9254C8E7EDC5311D4C,在上述计算结果中截取后6位为311D4C,则c为client5分配的IP地址使用十六进制表示为0A311D4C,将上述十六进制表示的IP地址转换为点分十进制为10.49.29.76,即c为client5分配的IP地址为10.49.29.76;a、b、c、d、e都按照上述方式为接入本网络分享系统的智能终端分配IP地址,这样可以避免接入本网络分享系统的智能终端的IP地址发生冲突。
a、b、c、d、e按照一定的时间间隔周期性地构造原始链路状态报文并发送出去,以a为例说明网络接入装置产生原始链路状态报文并发送的情况,a产生的原始链路状态报文的原始发送方MAC地址为a_mac,a产生的原始链路状态报文的传输距离为a_distance,a产生的原始链路状态报文的链路状态值为a_max,a产生的原始链路状态报文的序列号为a_num,a为网络接入装置,因此a产生的原始链路状态报文设置网关标记,a为网络接入装置,因此a产生的原始链路状态报文不包括终端信息,a将上述原始链路状态报文封装为路由数据帧后按照802.11标准以广播的方式发送出去,上述a封装的路由数据帧的接收方MAC地址为广播地址FF:FF:FF:FF:FF:FF,上述a封装的路由数据帧的发送方MAC地址为a_mac,上述a封装的路由数据帧的帧体为路由数据标记和上述原始链路状态报文;以e为例说明网络拓展装置产生原始链路状态报文并发送的情况,e产生的原始链路状态报文的原始发送方MAC地址为e_mac,e产生的原始链路状态报文的传输距离为e_distance,e产生的原始链路状态报文的链路状态值为e_max,e产生的原始链路状态报文的序列号为e_num,e为网络拓展装置,因此e产生的原始链路状态报文不设置网关标记,e为网络拓展装置,因此e产生的原始链路状态报文包括终端信息,e产生的原始链路状 态报文的终端信息为e服务的智能终端client9的MAC地址client9_mac和e服务的智能终端client10发的MAC地址client10_mac,e将上述原始链路状态报文封装为路由数据帧后按照802.11标准以广播的方式发送出去,上述e封装的路由数据帧的接收方MAC地址为广播地址FF:FF:FF:FF:FF:FF,上述e封装的路由数据帧的发送方MAC地址为e_mac,上述e封装的路由数据帧的帧体为路由数据标记和上述原始链路状态报文。
a、b、c、d、e都维护以其他装置为目的装置的路由信息,a、b、c、d、e通过处理接收到的路由数据帧的帧体的链路状态报文来维护上述路由信息,对于网络接入装置而言,网络接入装置还需要维护网络拓展装置与网络拓展装置服务的智能终端的对应关系的信息(即终端信息),以a为例说明网络接入装置维护路由信息和终端信息的过程;对于网络拓展装置而言,网络拓展装置除需要维护上述路由信息外还需要维护网络拓展装置选择的最优的网络接入装置的信息(即网关信息),以e为例说明网络拓展装置维护路由信息和网关信息的过程。
先以a为例说明网络接入装置维护路由信息和终端信息的过程,a通过维护预处理记录表来确定是否需要对接收到的链路状态报文做进一步处理,举例说明上述预处理记录表的维护过程,设a维护的预处理记录表如下表5所示:
表5 网络接入装置a维护的预处理记录表示例
Figure PCTCN2016101290-appb-000006
a在t7时刻接收到发送自b的链路状态报文,上述链路状态报文的原始发送方MAC地址为b_mac,上述链路状态报文的序列号为27,则在预处理记录表中查找原始发送方MAC地址为b_mac的表项,可以在预处理记录表中查找到上述表项并且上述表项的序列号为26,上述查找到的表项的序列号小于上述链路状态报文的序列号,则认为还需要对上述链路状态报文做进一步处理,同时将上述表项的序列号更新为27并将上述表项的最新接收时间更新为t7;a在t8时刻接收到发送自b的链路状态报文,上述链路状态报文的原始发送方MAC地址为d_mac,上述链路状态报文的序列号为30,则在预处理记录表中查找原始发送方MAC地址为d_mac的表项,可以在预处理记录表中查找到上述表项并且上述表项的序列号为31,上述查找到的表项的序列号大于上述链路状态报文的序列号,则认为上述链路状态报文不是最新的并将上述链路状态报文丢弃,不对上述链路状态报文做进一步处理;a在t9时刻接收到发送自c的链路状态报文,上述链路状态报文的原始发送方MAC地址为e_mac,上述链路状态报文的序列号为30,则在预处理记录表中查找原始发送方MAC地址为e_mac的表项,可以在预处理记录表中查找到上述表项并且上述表项的序列号为28,上述查找到的表项的序列号小于上述链路状态报文的序列号,则认为还需要对上述链路状态报文做进一步处理,同时将上述表项的序列号更新为30并将 上述表项的最新接收时间更新为t9;以下a用于维护路由信息和终端信息的链路状态报文都是经过上述预处理记录表的维护过程认为需要进一步处理的链路状态报文。
a通过维护服务信息表来记录网络拓展装置与网络拓展装置服务的智能终端的对应关系的信息(即终端信息),举例说明上述服务信息表的维护过程,设a维护的服务信息表如下表6所示:
表6 网络接入装置a维护的服务信息表示例
Figure PCTCN2016101290-appb-000007
a接收到发送自d的原始发送方MAC地址为d_mac的链路状态报文,上述链路状态报文包括终端信息,上述终端信息包括MAC地址为d_mac的网络拓展装置所服务的所有智能终端的地址即智能终端MAC地址client7_mac和智能终端MAC地址client8_mac,服务信息表中网络拓展装置MAC地址为d_mac的表项的智能终端MAC地址只有client7_mac,则在服务信息表中新增一项纪录,上述新增记录的网络拓展装置MAC地址为d_mac并且智能终端MAC地址为client8_mac;a接收到发送自c的原始发送方MAC地址为e_mac的链路状态报文,上述链路状态报文包括终端信息,上述终端信息包括智能终端MAC地址client9_mac和智能终端MAC地址client10_mac,服务信息表中网络拓展装置MAC地址为e_mac的表项的智能终端MAC地址有client9_mac、client10_mac和client13_mac,上述链路状态报文中的终端信息不包括智能终端MAC地址client13_mac,则在服务信息表中删除网络拓展装置MAC地址为e_mac并且智能终端MAC地址为client13_mac的表项,a通过这种方式维护终端信息。
a通过维护第一绑定表计算a发送的数据被a的相邻一跳装置(包括b、c、d)成功接收并且被a的相邻一跳装置(包括b、c、d)转发并且又被a成功接收的概率,举例说明第一绑定表的维护过程,假设a维护的第一绑定表如下表7所示:
表7 网络接入装置a维护的第一绑定表示例
Figure PCTCN2016101290-appb-000008
称在表7中候选路由MAC地址为b_mac的表项对应的叠加队列为叠加队列1, 称在表7中候选路由MAC地址为c_mac的表项对应的叠加队列为叠加队列2,称在表7中候选路由MAC地址为d_mac的表项对应的叠加队列为叠加队列3,叠加队列1、叠加队列2和叠加队列3的元素的存入、移出过程保持同步,如图12(a)所示,叠加队列1、叠加队列2和叠加队列3中序列号的数量与叠加队列长度的比值分别表示表7中对应表项的叠加值,即
Figure PCTCN2016101290-appb-000009
在此基础上,如图12(b)所示,a接收到发送自b的原始发送方MAC地址为a_mac的链路状态报文并且此链路状态报文的序列号为37,则向叠加队列1中存入序列号37,叠加队列1对应的表项的叠加值为
Figure PCTCN2016101290-appb-000010
向叠加队列2中存入一个空元素,叠加队列2对应的表项的叠加值为
Figure PCTCN2016101290-appb-000011
向叠加队列3中存入一个空元素,叠加队列3对应的表项的叠加值为
Figure PCTCN2016101290-appb-000012
在a维护的第一绑定表中更新叠加队列1、叠加队列2和叠加队列3对应的表项的叠加值,在此基础上,如图12(c)所示,a接收到发送自d的原始发送方MAC地址为a_mac的链路状态报文并且此链路状态报文的序列号为38,则向叠加队列1中存入一个空元素,叠加队列1对应的表项的叠加值为
Figure PCTCN2016101290-appb-000013
向叠加队列2中存入一个空元素,叠加队列2对应的表项的叠加值为
Figure PCTCN2016101290-appb-000014
向叠加队列3中存入序列号38,叠加队列3对应的表项的叠加值为
Figure PCTCN2016101290-appb-000015
在a维护的第一绑定表中更新叠加队列1、叠加队列2和叠加队列3对应的表项的叠加值,在此基础上,如图12(d)所示,a接收到发送自c的原始发送方MAC地址为a_mac的链路状态报文并且此链路状态报文的序列号为40,则向叠加队列1中依次存入两个空元素,叠加队列1对应的表项的叠加值为
Figure PCTCN2016101290-appb-000016
向叠加队列2中依次存入一个空元素和序列号40,叠加队列2对应的表项的叠加值为向叠加队列3中依次存入两个空元素,叠加队列3对应的表项的叠加值为
Figure PCTCN2016101290-appb-000018
在a维护的第一绑定表中更新叠加队列1、叠加队列2和叠加队列3对应的表项的叠加值。
a通过维护第二绑定表计算a的相邻一跳装置装置(包括b、c、d),发送的数据被a成功接收的概率,举例说明上述第二绑定表的维护过程,假设a维护的第二绑定表如下表8所示(本发明需要解决的问题侧重于在多跳数据传输的过程中从本装置的多个相邻一跳装置中选择一个最优的相邻一跳装置作为下一跳来传输数据,当本装置以本装置的相邻一跳装置为目的装置时,不牵涉多跳数据传输的问题,因此,为使得本示例更有代表性,在a的相邻一跳装置中只选取b作为示例在表8中列出):
表8 网络接入装置a维护的第二绑定表示例
Figure PCTCN2016101290-appb-000019
Figure PCTCN2016101290-appb-000020
称在表8中目的MAC地址为e_mac并且候选路由MAC地址为c_mac的表项对应的接收队列为接收队列1,称在表8中目的MAC地址为e_mac并且候选路由MAC地址为d_mac的表项对应的接收队列为接收队列2,称在表8中目的MAC地址为e_mac并且候选路由MAC地址为b_mac的表项对应的接收队列为接收队列3,接收队列1、接收队列2和接收队列3对应的表项的目的MAC地址相同,接收队列1、接收队列2和接收队列3元素的存入、移出过程保持同步,如图13(a)所示,接收队列1、接收队列2和接收队列3中序列号的数量与接收队列长度的比值分别表示表8中对应表项的叠加值,即
Figure PCTCN2016101290-appb-000021
在此基础上,如图13(b)所示,a接收到发送自d的原始发送方MAC地址为e_mac的链路状态报文并且此链路状态报文的序列号为47,则向接收队列2中存入序列号47,接收队列2对应的表项的接收值为
Figure PCTCN2016101290-appb-000022
向接收队列1中存入一个空元素,接收队列1对应的表项的接收值为
Figure PCTCN2016101290-appb-000023
向接收队列3中存入一个空元素,接收队列3对应的表项的接收值为
Figure PCTCN2016101290-appb-000024
在a维护的第二绑定表中更新接收队列1、接收队列2和接收队列3对应的表项的接收值,在此基础上如图13(c)所示,a接收到发送自b的原始发送方MAC地址为e_mac的链路状态报文并且此链路状态报文的序列号为49,则向接收队列3中依次存入一个空元素和序列号49,接收队列3对应的表项的接收值为
Figure PCTCN2016101290-appb-000025
向接收队列1中存入两个空元素,接收队列1对应的表项的接收值为
Figure PCTCN2016101290-appb-000026
向接收队列2中存入两个空元素,接收队列2对应的表项的接收值为
Figure PCTCN2016101290-appb-000027
在a维护的第二绑定表中更新接收队列1、接收队列2和接收队列3对应的表项的接收值,在此基础上,如图13(d)所示,a接收到发送自c的原始发送方MAC地址为e_mac的链路状态报文并且此链路状态报文的序列号为50,则向接收队列1中存入序列号50,接收队列1对应的表项的接收值为
Figure PCTCN2016101290-appb-000028
向接收队列2中存入一个空元素,接收队列2对应的表项的接收值为
Figure PCTCN2016101290-appb-000029
向接收队列3中存入一个空元素,接收队列3对应的表项的接收值为
Figure PCTCN2016101290-appb-000030
在a维护的第二绑定表中更新接收队列1、接收队列2和接收队列3对应的表项的接收值,通过这种方式,a根据在预定时间段内a与b、c、d的通信情况更新a维护的第二绑定表中接收队列1、接收队列2和接收队列3对应的表项的接收值。
链路状态值是a在多跳数据传输的过程中从a的多个相邻一跳装置(包括b、c、d)中选择一个最优的相邻一跳装置作为下一跳来传输数据的重要依据,举例说明链路状态值的计算过程,a接收到发送自c的原始发送方MAC地址为e_mac的链路状态报文并且此链路状态报文的链路状态值为link_state,则a在a维护的第一绑定表(表7)中查找候选路由MAC地址为c_mac的表项,上述表项的叠加值为multi2,a在a维护的第二绑定表(表8)中查找目的MAC地址为e_mac并且候选路由MAC地址为c_mac的表项,上述表项的接收值为recv2,则计算后的链路状态值为
Figure PCTCN2016101290-appb-000031
计算后的链路状态值表示a以e为目的装置以c为下一跳装置发送数据时的链路状态;a判断上述链路状态报文的传输距离,若上述链路状态报文的传输距离小于或者等于1,则将上述链路状态报文丢弃,a不转发上述链路状态报文;若上述链路状态报文的传输距离大于1,a需要将上述链路状态报文更新后再转发出去,具体的,将上述链路状态报文的链路状态值更新为计算后的链路状态值并将上述链路状态报文的传输距离减1,经过上述更新过程后,a将更新后的链路状态 报文封装为路由数据帧后发送出去,上述构造的路由数据帧的接收方MAC地址为广播地址FF:FF:FF:FF:FF:FF,上述构造的路由数据帧的发送方MAC地址为a_mac,上述构造的路由数据帧的帧体为路由数据标记route_lable和上述更新后的链路状态报文。
a通过计算a与目的装置(包括b、c、d、e、f)的最近几次链路状态的平均值来确定a与目的装置(包括b、c、d、e、f)之间的链路状态,a通过维护第三绑定表记录上述链路状态平均值的对应关系,举例说明上述第三绑定表的维护过程,假设a维护的第三绑定表如下表9所示(本发明需要解决的问题侧重于在多跳数据传输的过程中从本装置的多个相邻一跳装置中选择一个最优的相邻一跳装置作为下一跳来传输数据,当本装置以本装置的相邻一跳装置为目的装置时,不牵涉多跳数据传输的问题,因此,为使得本示例更有代表性,在a的相邻一跳装置中只选取b作为示例在表9中列出)。
表9 网络接入装置a维护的第三绑定表示例
Figure PCTCN2016101290-appb-000032
称在表9中目的MAC地址为e_mac并且候选路由MAC地址为c_mac的表项对应的均值队列为均值队列1,如图14(a)所示,均值队列1中链路状态值的平均值即为对应表项的链路状态均值,即avg3=(a1+a2+a3)/3,在此基础上,如图14(b)所示,a接收到发送自c的原始发送方MAC地址为e_mac的链路状态报文并且计算后的链路状态值为a4,则在均值队列1中存入链路状态值a4,更新均值队列1对应的表项的链路状态均值为(a2+a3+a4)/3,在此基础上,如图14(c)所示,a接收到发送自c的原始发送方MAC地址为e_mac的链路状态报文并且计算后的链路状态值为a5,则在均值队列1中存入链路状态值a5,更新均值队列1对应的表项的链路状态均值为(a3+a4+a5)/3,在此基础上,如图14(d)所示,a接收到发送自c的原始发送方MAC地址为e_mac的链路状态报文并且计算后的链路状态值为a6,则在均值队列1中存入链路状态值a6,更新均值队列1对应的表项的链路状态均值为(a4+a5+a6)/3。
a每次更新a维护的第三绑定表的表项后,都需要根据a维护的第三绑定表更新a维护的第四绑定表,举例说明上述第四绑定表的维护过程,假设a维护的第四绑定表如下表10所示(本发明需要解决的问题侧重于在多跳数据传输的过程中从本装置的多个相邻一跳装置中选择一个最优的相邻一跳装置作为下一跳来传输数据,当本装置以本装置的相邻一跳装置为目的装置时,不牵涉多跳数据传输的问题,因此,为使得本示例更有代表性,在a的相邻一跳装置中只选取b作为示例在表10中列出)。
表10 网络接入装置a维护的第四绑定表示例
Figure PCTCN2016101290-appb-000033
Figure PCTCN2016101290-appb-000034
a接收到发送自d的原始发送方MAC地址为f_mac的链路状态报文,a基于上述链路状态报文计算出并更新a维护的第三绑定表表(表9)中目的MAC地址为f_mac并且候选路由MAC地址为d_mac的表项的链路状态均值为avg8,a在第三绑定表中查找目的MAC地址为f_mac的表项,在上述表项中选取链路状态均值最大的表项,假设上述选取的链路状态均值最大的表项即为之前更新的目的MAC地址为f_mac并且候选路由MAC地址为d_mac的表项,则在a维护的第四绑定表(表10)中查找目的MAC地址为f_mac的表项并将上述表项的下一跳MAC地址更新为d_mac。
网络接入装置a通过上述方式维护终端信息和路由信息,a接收发送自client1的IP数据包,假设上述发送自client1的IP数据包的目的IP地址为180.149.132.47,此IP地址的前8位(IP地址用32位二进制表示时的前8位)用十进制表示为180,如前所述,a为client1分配的IP地址为10.127.23.63,client1的IP地址的前8位(IP地址使用32位二进制表示时的前8位)用十进制表示为10,不是180,a判定此发送自client1的IP数据包为client1发向互联网的IP数据包,a将此client1发向互联网的IP数据包直接(不转发)发向互联网,同理,a将a服务的智能终端client2发向互联网的IP数据包直接(不转发)发向互联网,a将互联网发向a服务的智能终端的IP数据包直接(不转发)发送给对应的智能终端;a接收发送自互联网的IP数据包并对上述IP数据包进行NAT处理,如果进行NAT处理后的IP数据包的目的IP地址为client9_ip,则a根据ARP获得与client9_ip对应的MAC地址client9_mac,a在a维护的服务信息表(表6)中查找智能终端MAC地址为client9_mac的表项,上述在服务信息表中查找到的表项的网络拓展装置MAC地址为e_mac,说明上述IP数据包为e_mac对应的网络拓展装置e服务的智能终端与互联网之间通信的数据包,a在a维护的第四绑定表(表10)中查找目的MAC地址为e_mac的表项,上述在第四绑定表中查找到的表项的下一跳MAC地址为c_mac,则a选取c作为下一跳,a将上述IP数据包封装为负载数据帧后发送,上述负载数据帧的接收方MAC地址为c_mac,上述负载数据帧的发送方MAC地址为a_mac,上述负载数据帧的帧体为负载数据标记data_lable、最终接收装置MAC地址和上述IP数据包,上述负载数据帧的帧体中的最终接收装置MAC地址为e_mac。c接收到上述负载数据帧后,提取上述负载数据帧的帧体中的最终接收装置MAC地址为e_mac,c根据c维护的路由信息以e_mac为目的MAC地址选取e作为下一跳,c根据上述负载数据帧构造新的负载数据帧再发送出去,上述c构造的负载数据帧的接收方MAC地址为e_mac,上述c构造的负载数据帧的发送方MAC地址为c_mac,上述c构造的负载数据帧的帧体为负载数据标记data_lable和最终接收装置MAC地址和上述a发送至c的负载数据帧的帧体中的IP数据包,上述c构造的负载数据帧的帧体中的最终接收装置MAC地址为e_mac;e接收到发送自c的负载数据帧后,e提取上述负载数据帧的帧体中的最终接收装置MAC地址为e_mac,则e提取上述负载数据帧的帧体中的IP数据包的目的IP地址为client9_ip,e直接将上述负载数据帧的帧体中的IP数据包发送至client9。
以上部分以a为例阐述了网络接入装置维护路由信息和终端信息的过程,网络接入装置直接传递网络接入装置服务的智能终端与互联网之间通信的IP数据包,对 于互联网发向网络拓展装置服务的智能终端的IP数据包,网络接入装置通过维护终端信息确定最终接收上述IP数据包的网络拓展装置,网络接入装置通过维护路由信息确定以上述网络拓展装置为目的装置的本装置的最优下一跳装置,如果多跳路径上的其他装置不是上述最终接收IP数据包的装置,则会以上述最终接收IP数据包的装置为目的装置转发IP数据包。
下面以e为例阐述网络拓展装置维护路由信息和网关信息的过程。网络拓展装置e通过维护预处理记录表来判断是否需要对接收到的链路状态报文做进一步处理,e维护的预处理记录表与a维护的预处理记录表的表项相同,e维护预处理记录表的过程与a维护预处理记录表的过程相同,以下e用来维护路由信息和网关信息的链路状态报文都是经过e的预处理记录表的维护过程并认为需要进一步处理的链路状态报文。
e通过维护第一绑定表计算e发送的数据被e的相邻一跳装置(包括c、d、f)成功接收并且被e的相邻一跳装置(包括c、d、f)转发并且又被e成功接收的概率,e维护的第一绑定表与a维护的第一绑定表的表项相同,e更新第一绑定表的过程与a更新第一绑定表的过程相同。
e通过维护第二绑定表计算e的相邻一跳装置装置(包括c、d、f),发送的数据被e成功接收的概率,e维护的第二绑定表与a维护的第二绑定表的表项相同,e更新第二绑定表的过程与a更新第二绑定表的过程相同。
e计算链路状态值的方式与a计算链路状态值的方式相同,e通过计算e与目的装置(包括a、b、c、d、f)的最近几次链路状态的平均值来确定e与目的装置(包括a、b、c、d、f)之间的链路状态,e通过维护第三绑定表记录上述链路状态平均值的对应关系,e维护的第三绑定表与a维护的第三绑定表的表项相同,e更新第三绑定表的过程与a更新第三绑定表的过程相同,假设e维护的第三绑定表如下表11所示(本发明需要解决的问题侧重于在多跳数据传输的过程中从本装置的多个相邻一跳装置中选择一个最优的相邻一跳装置作为下一跳来传输数据,当本装置以本装置的相邻一跳装置为目的装置时,不牵涉多跳数据传输的问题,因此,为使得本示例更有代表性,在e的相邻一跳装置中只选取c作为示例在表11和表12中列出);e维护第四绑定表,e维护的第四绑定表与a维护的第四绑定表的表项相同,e维护第四绑定表的过程与a维护第四绑定表的过程相同,e每次更新第三绑定表后都需要根据第三绑定表更新第四绑定表,假设e维护的第四绑定表如下表12所示,e每次更新第三绑定表后如果链路状态报文设置了网关标记还需要更新网关列表,举例说明e维护网关列表的过程,假设e维护的网关列表如下表13所示。
表11 网络拓展装置e维护的第三绑定表示例
Figure PCTCN2016101290-appb-000035
表12 网络拓展装置e维护的第四绑定表示例
Figure PCTCN2016101290-appb-000036
Figure PCTCN2016101290-appb-000037
表13 网络拓展装置e维护的网关列表示例
Figure PCTCN2016101290-appb-000038
e接收到发送自c的原始发送方MAC地址为a_mac的链路状态报文,e基于上述链路状态报文计算出并更新e维护的第三绑定表(表11)中目的MAC地址为a_mac并且候选路由MAC地址为c_mac的表项的链路状态均值为avg18,e在第三绑定表中查找目的MAC地址为a_mac的表项,在上述表项中选取链路状态均值最大的表项,假设上述选取的链路状态均值最大的表项即为之前更新的目的MAC地址为a_mac并且候选路由MAC地址为c_mac的表项,则在e维护的第四绑定表(表12)中查找目的MAC地址为a_mac的表项并将上述表项的下一跳MAC地址更新为c_mac,同时,由于上述e接收到的原始发送方MAC地址为a_mac的链路状态报文设置了网关标记,e还需要基于上述在第三绑定表中选取的链路状态均值最大的表项(目的MAC地址为a_mac并且候选路由MAC地址为c_mac的表项)来更新e维护的网关列表(表13),则e在网关列表中查找网络接入装置MAC地址为a_mac的表项并将上述表项的链路状态均值更新为avg18。
e接收client9发向互联网的IP数据包,e在e维护的网关列表(表13)中查找链路状态均值最大的表项并将上述链路状态均值最大的表项的网络接入装置MAC地址对应的网络接入装置作为e选取的最优的网络接入装置,假设avg17大于avg18,则e将b作为最优的网络接入装置,e需要将上述IP数据包通过多跳的方式最终传递至b,则e在e维护的第四绑定表(表12)中查找目的MAC地址为b_mac的表项,上述在第四绑定表中查找到的表项的下一跳MAC地址为d_mac,则e选取d作为下一跳,e将上述IP数据包封装为负载数据帧后发送,上述负载数据帧的接收方MAC地址为d_mac,上述负载数据帧的发送方MAC地址为e_mac,上述负载数据帧的帧体为负载数据标记data_lable和最终接收装置MAC地址和上述IP数据包,上述负载数据帧的帧体中的最终接收装置MAC地址为b_mac;d接收到上述负载数据帧后,提取上述负载数据帧的帧体中的最终接收装置MAC地址为b_mac,d根据d维护的路由信息以b_mac为目的MAC地址选取b作为下一跳,d根据上述负载数据帧构造新的负载数据帧再发送出去,上述d构造的负载数据帧的接收方MAC地址为b_mac,上述d构造的负载数据帧的发送方MAC地址为d_mac,上述d构造的负载数据帧的帧体为负载数据标记data_lable和最终接收装置MAC地址和上述e发送至d的负载数据帧的帧体中的IP数据包,上述d构造的负载数据帧的帧体中的最终接收装置MAC地址为b_mac;b接收到发送自d的负载数据帧后,b提取上述负载数据帧的帧体中的最终接收装置MAC地址为b_mac,则b提取上述负载数据帧的帧体中的IP数据包并将上述负载数据帧的帧体中的IP数据包发向互联网,借助这种方式,网络拓展装置服务的智能终端发向互联网的IP数据包通过多跳路径被发送至互联网,之前所述互联网发向网络拓展装置服务的智能终端的IP数据包被网络接入装置接收,上述IP数据包通过以上述网络接入装置为起始装置的多跳路径传输最终被发送至为上述智能终端提供无线网络服务的网络拓展装置,网络拓展装置再 将上述IP数据包发送给对应的智能终端,这样,智能终端通过接入网络拓展装置提供的无线网络可以实现与互联网之间两个方向(接收和发送)的相互通信,又之前所述网络接入装置直接传递(不转发)网络接入装置服务的智能终端与互联网之间通信的IP数据包,这样,智能终端通过接入网络接入装置提供的无线网络可以实现与互联网之间两个方向(接收和发送)的相互通信,通过这种方式,智能终端通过接入本网络分享系统提供的无线网络可以实现与互联网之间的相互通信。
以上仅是对本发明的优选实施方式进行了描述,并不将本发明的技术方案限制于此,本领域技术人员在本发明的主要技术构思的基础上所作的任何公知变形都属于本发明所要保护的技术范畴,本发明具体的保护范围以权利要求书的记载为准。
工业实用性
本发明专利所述一种网络分享系统和网络分享方法能够适用于所有需要互联网通信的工业领域,尤其是需要布置无固定中心的、健壮性强、网络通信范围不受网络中心节点的限制、网络通信能力强的无线自组织网络分享系统的工业领域,具有很强的工业实用性。

Claims (21)

  1. 一种网络分享系统,其特征在于,包括至少一个网络接入装置和至少一个网络拓展装置,所述网络接入装置连接互联网,所述网络接入装置和网络拓展装置形成无线自组织网络,所述网络拓展装置通过网络接入装置来访问互联网,所述网络接入装置和网络拓展装置为各自覆盖范围内的使用终端提供无线网络服务,每个网络接入装置中都维护有网络接入路由信息,所述网络接入路由信息记录有本网络接入装置能够访问的各个目的网络装置的地址与本网络接入装置访问各目的网络装置时最优选择的下一跳网络装置的地址之间的对应关系,每个网络拓展装置中都维护有网络拓展路由信息,所述网络拓展路由信息记录有本网络拓展装置能够访问的各个目的网络装置的地址与本网络拓展装置访问各目的网络装置时最优选择的下一跳网络装置的地址之间的对应关系,所述目的网络装置为网络接入装置或网络拓展装置,所述下一跳网络装置为网络接入装置或网络拓展装置,所述网络接入装置覆盖范围内的使用终端与互联网之间通过网络接入装置建立通信链路,所述网络拓展装置覆盖范围内的使用终端与互联网之间通过网络拓展路由信息和/或网络接入路由信息确定的网络装置建立通信链路。
  2. 根据权利要求1所述的网络分享系统,其特征在于,每个网络接入装置中都维护有网络接入路由信息和服务信息,所述服务信息中记录有网络拓展装置的地址和该网络拓展装置覆盖范围内的使用终端的地址之间的对应关系,所述网络接入路由信息中记录的目的网络装置的地址包括服务信息中记录的网络拓展装置的地址;每个网络拓展装置中都维护有网络拓展路由信息和网关信息,所述网关信息中记录有网络接入装置的地址,所述网络拓展路由信息中记录的目的网络装置的地址包括网关信息中记录的网络接入装置的地址。
  3. 根据权利要求2所述的网络分享系统,其特征在于,每个网络接入装置包括网络接入组网单元、数据分析单元和网络接入无线服务单元,所述网络接入组网单元包括路由子单元、数据收发子单元和服务信息子单元,所述网络接入无线服务单元为本网络接入装置覆盖范围内的使用终端提供无线网络服务,并连接于所述数据分析单元,所述网络接入组网单元连接于所述数据分析单元,所述数据分析单元连接于互联网;通过所述网络接入无线服务单元和数据分析单元实现本网络接入装置覆盖范围内的使用终端与互联网间的数据通信;通过所述数据分析单元和网络接入组网单元实现网络拓展装置覆盖范围内的使用终端与互联网间的数据通信;所述路由子单元中维护有路由分配表,所述网络接入路由信息为所述路由分配表中包括的若干分配记录表项,每个分配记录表项中记录有目的地址和候选分配路由地址的对应关系,所述目的地址为本网络接入装置能够访问的目的网络装置的地址,所述候选分配路由地址为本网络接入装置访问目的地址对应的目的网络装置时最优选择的下一跳网络装置的地址,所述服务信息子单元中维护有服务信息表,所述服务信息为服务信息表中包括的若干服务记录表项,每个服务记录表项记录有使用终端的地址和为该使用终端提供无线网络服务的网络拓展装置的地址之间的对应关系。
  4. 根据权利要求3所述的网络分享系统,其特征在于,每个网络拓展装置包括网络拓展组网单元和网络拓展无线服务单元,所述网络拓展组网单元包括路由子单元和数据收发子单元,所述网络拓展无线服务单元为本网络拓展装置覆盖范围内的使用终端提供无线网络服务;本网络拓展装置覆盖范围内的使用终端通过网络拓展无线服务单元和网络拓展组网单元与其他网络拓展装置或网络接入装置进行数据通信;所述路由子单元中维护有路由分配表和网关列表,所述网络拓展路由信息为所述路由分配表中包括的若干分配记录表项,每个分配记录表项中记录有目的地址 和候选分配路由地址的对应关系,所述目的地址为本网络拓展装置能够访问的目的网络装置的地址,所述候选分配路由地址为本网络拓展装置访问目的地址对应的目的网络装置时最优选择的下一跳网络装置的地址,所述网关信息为网关列表中记录的网络接入装置的地址。
  5. 根据权利要求4所述的网络分享系统,其特征在于,在每个网络接入装置中,所述数据分析单元包括数据单元和网关单元,所述数据单元将来自网络接入无线服务单元的数据包通过网关单元发往互联网,并判断网关单元接收的来自互联网的数据包是否发往本网络接入装置覆盖范围内的使用终端,若是则通过网络接入无线服务单元将来自互联网的数据包发往所述使用终端,若否则将来自互联网的数据包发往网络接入组网单元中的数据收发子单元,所述数据收发子单元将来自互联网的数据包封装成负载数据帧进行发送,所述负载数据帧的发送方地址为所述网络接入组网单元中数据收发子单元的地址,所述负载数据帧的接收方地址为网络接入组网单元中路由子单元维护的路由分配表中目的地址与数据包最终接收地址相同的分配记录表项中的候选分配路由地址,所述负载数据帧的帧体包括来自互联网的所述数据包,同时所述网络接入组网单元中的数据收发子单元接收或转发来自其他网络装置的负载数据帧;每个网络拓展装置覆盖范围内的使用终端发送的数据包通过网络拓展无线服务单元发送至网络拓展组网单元,网络拓展组网单元将使用终端发送的数据包封装成负载数据帧进行发送,所述负载数据帧的发送方地址为网络拓展组网单元中数据收发子单元的地址,所述负载数据帧的接收方地址为网络拓展组网单元中路由子单元维护的路由分配表中目的地址与网关列表中某一网络接入装置地址相同的分配记录表项中的候选分配路由地址,所述负载数据帧的帧体包括使用终端发送的数据包,同时所述网络拓展组网单元中数据收发子单元接收或转发来自其他网络装置的负载数据帧。
  6. 根据权利要求4或5所述的网络分享系统,其特征在于,所述网络接入装置和网络拓展装置中的路由子单元均包括有路由信息维护模块和原始链路状态报文产生模块,所述原始链路状态报文产生模块按照一定的时间间隔周期性地构造原始链路状态报文并通过数据收发子单元封装为原始路由数据帧后发送;所述网络接入装置产生的原始路由数据帧包括接收方地址、发送方地址和路由帧体,所述路由帧体包括原始链路状态报文,所述原始链路状态报文包括原始发送方地址、链路状态值、网关标记和序列号,所述原始发送方地址为网络接入装置中数据收发子单元的地址,所述链路状态值取最大值,所述序列号按固定步长递增变化;所述网络拓展装置产生的原始路由数据帧包括接收方地址、发送方地址和路由帧体,所述路由帧体包括原始链路状态报文,所述原始链路状态报文包括原始发送方地址、链路状态值、终端信息和序列号,所述原始发送方地址为网络拓展装置中数据收发子单元的地址,所述链路状态值取最大值,所述终端信息为本网络拓展装置覆盖范围内的使用终端的地址,所述序列号按固定步长递增变化;所述网络接入装置的路由信息维护模块接收、转发其他网络装置产生的路由数据帧,并在转发路由数据帧时更新路由数据帧中链路状态报文的链路状态值,更新后的链路状态值用于反应链路状态报文的原始发送方地址对应的网络装置和本网络接入装置之间的通信链路状态,所述网络接入装置中的路由信息维护模块基于路由数据帧维护路由分配表,所述路由分配表的每个分配记录表项中记录的目的地址为路由数据帧链路状态报文的原始发送方地址,记录的候选分配路由地址为使本网络接入装置到目的地址对应的网络装置的通信链路中链路状态稳定值最大的本网络接入装置的下一跳网络装置的地址;所述网 络拓展装置的路由信息维护模块接收、转发其他网络装置产生的路由数据帧,并在转发路由数据帧时更新路由数据帧中链路状态报文的链路状态值,更新后的链路状态值用于反应链路状态报文的原始发送方地址对应的网络装置和本网络拓展装置之间的通信链路状态,所述网络拓展装置中的路由信息维护模块基于路由数据帧维护路由分配表,所述路由分配表的每个分配记录表项中记录的目的地址为路由数据帧链路状态报文的原始发送方地址,记录的候选分配路由地址为使本网络拓展装置到目的地址对应的网络装置的通信链路中链路状态稳定值最大的本网络拓展装置的下一跳网络装置的地址。
  7. 根据权利要求6所述的网络分享系统,其特征在于,所述网络接入装置和网络拓展装置的路由信息维护模块均基于路由数据帧维护有叠加表、接收表、链路状态表和所述路由分配表;
    所述叠加表包括有若干条叠加记录表项,每条叠加记录表项中记录有候选路由地址和叠加值的对应关系,且在每条叠加记录表项的对应关系中,所述候选路由地址为本网络装置的相邻一跳网络装置的地址,所述叠加值为本网络装置发送的路由数据帧被候选路由地址对应的本网络装置的相邻一跳网络装置接收并被其转发后再次被本网络装置接收的收发概率;
    所述接收表包括有若干条接收记录表项,每条接收记录表项中记录有目的地址、候选路由地址和接收值的对应关系,且在每条接收记录表项的对应关系中,所述目的地址为目的网络装置的地址,所述候选路由地址为本网络装置的相邻一跳网络装置的地址,所述接收值为目的地址对应的目的网络装置发送的路由数据帧经由候选路由地址对应的本网络装置的相邻一跳网络装置转发后被本网络装置接收的接收概率;
    所述链路状态表包括有若干条链路状态记录表项,每条链路状态记录表项中记录有目的地址、候选路由地址和链路状态稳定值的对应关系,所述链路状态表基于所述叠加表和接收表构造,每条链路状态记录表项由具有相同候选路由地址的一条叠加记录表项和一条接收记录表项形成,所述链路状态记录表项中的目的地址为接收记录表项中的目的地址,所述链路状态记录表项中的候选路由地址为叠加记录表项和接收记录表项中含有的相同的候选路由地址,所述链路状态记录表项中的链路状态稳定值基于叠加记录表项中的叠加值和接收记录表项中的接收值计算得到;
    所述路由分配表基于所述链路状态表来构造,在链路状态表中提取具有相同目的地址的链路状态记录表项集合,在所述链路状态记录表项集合中选取链路状态稳定值最大的链路状态记录表项,并将该链路状态稳定值最大的链路状态记录表项中的目的地址和候选路由地址分别作为路由分配表的分配记录表项中的目的地址和候选分配路由地址;
    所述的网络装置为网络接入装置或网络拓展装置,网络装置的地址为网络接入装置或网络拓展装置中的数据收发子单元的地址。
  8. 根据权利要求7所述的网络分享系统,其特征在于,所述网络接入装置和网络拓展装置的路由信息维护模块均基于最新的路由数据帧更新所述叠加表和接收表,当路由数据帧的链路状态报文的原始发送方地址为本网络装置的地址时,所述路由信息维护模块更新所述叠加表,在叠加表中查询候选路由地址为路由数据帧的发送方地址的叠加记录表项,若能查询到所述叠加记录表项则更新所述叠加记录表项中的叠加值,若不能查询到所述叠加记录表项则在叠加表中新增一条叠加记录表项,新增的叠加记录表项中的候选路由地址为路由数据帧的发送方地址,新增的叠 加记录表项中的叠加值的计算方法与叠加值的更新方法相同;当路由数据帧的链路状态报文的原始发送方地址不为本网络装置的地址时,所述路由信息维护模块更新所述接收表,在接收表中查询目的地址为路由数据帧的链路状态报文的原始发送方地址并且候选路由地址为路由数据帧的发送方地址的接收记录表项,若能查询到所述接收记录表项则更新所述接收记录表项中的接收值,若不能查询到所述接收记录表项则在接收表中新增一条接收记录表项,新增的接收记录表项中的目的地址为路由数据帧的链路状态报文的原始发送方地址,新增的接收记录表项中的候选路由地址为路由数据帧的发送方地址,新增的接收记录表项中的接收值的计算方法与所述接收值的更新方法相同。
  9. 根据权利要求8所述的网络分享系统,其特征在于,所述路由信息维护模块每次更新完所述接收表后,按照以下方式同时更新所述链路状态表:首先提取路由数据帧的链路状态报文的链路状态值,记为x;其次在叠加表中查询候选路由地址为路由数据帧的发送方地址的叠加记录表项,若不能在叠加表中查询到上述叠加记录表项,则结束所述链路状态表的更新,若能在叠加表中查询到上述叠加记录表项,则提取所述叠加记录表项中的叠加值,记为y;接着提取接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址并且候选路由地址为路由数据帧的发送方地址的接收记录表项中的接收值,记为z;当(y/z)<1时,将路由数据帧的链路状态报文的链路状态值更新为x*(y/z),当(y/z)≥1时,将路由数据帧的链路状态报文的链路状态值更新为原值x;最后在链路状态表中查询目的地址为路由数据帧中的链路状态报文的原始发送方地址并且候选路由地址为路由数据帧的发送方地址的链路状态记录表项,若能查询到所述链路状态记录表项,则基于路由数据帧的链路状态报文的更新后的链路状态值更新该链路状态记录表项中的链路状态稳定值,若不能查询到所述链路状态记录表项则在链路状态表中新增一条链路状态记录表项,新增的链路状态记录表项的目的地址为路由数据帧中的链路状态报文的原始发送方地址,新增的链路状态记录表项的候选路由地址为路由数据帧的发送方地址,新增的链路状态记录表项的链路状态稳定值为路由数据帧中的链路状态报文的更新后的链路状态值。
  10. 根据权利要求8或9所述的网络分享系统,其特征在于,所述链路状态表中为每一条链路状态记录表项都维护有一个均值队列,且每条链路状态记录表项对应的均值队列的长度相同,所述均值队列中存储有路由数据帧的链路状态报文的更新后的链路状态值,且所述均值队列中链路状态值的移入移出遵循先入先出的原则,所述链路状态记录表项中的链路状态稳定值为均值队列中存储的所有链路状态值的平均值;所述路由信息维护模块每次更新完所述接收表后,按照以下方式同时更新所述链路状态表:首先提取路由数据帧的链路状态报文的链路状态值,记为x;其次在叠加表中查询候选路由地址为路由数据帧的发送方地址的叠加记录表项,若不能在叠加表中查询到上述叠加记录表项,则结束所述链路状态表的更新,若能在叠加表中查询到上述叠加记录表项,则提取所述叠加记录表项中的叠加值,记为y;接着提取接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址并且候选路由地址为路由数据帧的发送方地址的接收记录表项中的接收值,记为z;当(y/z)<1时,将路由数据帧的链路状态报文的链路状态值更新为x*(y/z),当(y/z)≥1时,将路由数据帧的链路状态报文的链路状态值更新为原值x;最后在链路状态表中查询目的地址为路由数据帧的链路状态报文的原始发送方地址并且候选路由地址为路由数据帧的发送方地址的链路状态记录表项,若能查询到该链路状态记录表项 则向该链路状态记录表项对应的均值队列中移入路由数据帧的链路状态报文的更新后的链路状态值,并重新计算均值队列中所有链路状态值的平均值,将所述链路状态记录表项中的链路状态稳定值更新为所述平均值,若不能查询到该链路状态记录表项则在链路状态表中新增一条链路状态记录表项,新增的链路状态记录表项的目的地址为路由数据帧的链路状态报文的原始发送方地址,新增的链路状态记录表项的候选路由地址为路由数据帧的发送方地址,并向新增的链路状态记录表项对应的均值队列中移入路由数据帧的链路状态报文的更新后的链路状态值,新增的链路状态记录表项的链路状态稳定值为其对应的均值队列中链路状态值的平均值。
  11. 根据权利要求9或10所述的网络分享系统,其特征在于,所述路由信息维护模块每次更新完所述链路状态表后,按照以下方式同时更新所述路由分配表:首先在链路状态表中查询得到目的地址为路由数据帧的链路状态报文的原始发送方地址的链路状态记录表项集合;接着在所述链路状态记录表项集合中选取链路状态稳定值最大的链路状态记录表项,并将该链路状态稳定值最大的链路状态记录表项中的目的地址和候选路由地址分别作为路由更新信息中的目的地址和候选路由地址;然后在路由分配表中查询目的地址为路由更新信息中的目的地址的分配记录表项,若能查到所述分配记录表项则将所述分配记录表项中的候选分配路由地址更新为所述路由更新信息中的候选路由地址,若不能查到所述分配记录表项,则在路由分配表中新增一条分配记录表项,新增的分配记录表项的目的地址和候选分配路由地址分别为所述路由更新信息中的目的地址和候选路由地址。
  12. 根据权利要求8-10任一项所述的网络分享系统,其特征在于,所述叠加表为每条叠加记录表项都维护有一个叠加队列,且各叠加记录表项对应的叠加队列长度相同,所述叠加队列中存储有路由数据帧的链路状态报文的序列号,且所述叠加队列中序列号的移入移出遵循先入先出的原则,每条叠加记录表项中的叠加值为其对应的叠加队列中存储的序列号的数量与叠加队列长度的比值,且所述叠加表中各叠加记录表项对应的叠加队列中序列号的移入移出过程保持同步,所述路由信息维护模块基于最新的路由数据帧更新所述叠加表时,按照以下方式更新叠加记录表项中的叠加值:将叠加表中候选路由地址为路由数据帧的发送方地址的叠加记录表项作为本叠加记录表项,向本叠加记录表项对应的叠加队列中移入路由数据帧的链路状态报文的序列号,同时向叠加表中除本叠加记录表项以外的其他叠加记录表项对应的叠加队列中移入一个空元素,然后将叠加表中的各叠加记录表项的叠加值更新为其对应的叠加队列中存储的序列号的数量与叠加队列长度的比值;所述接收表为每条接收记录表项都维护有一个接收队列,且各接收记录表项对应的接收队列长度相同,所述接收队列中存储有路由数据帧的链路状态报文的序列号,且所述接收队列中序列号的移入移出遵循先入先出的原则,每条接收记录表项中的接收值为其对应的接收队列中存储的序列号的数量与接收队列长度的比值,且所述接收表中目的地址相同的接收记录表项对应的接收队列中序列号的移入移出过程保持同步,所述路由信息维护模块基于最新的路由数据帧更新所述接收表时,按照以下方式更新接收记录表项中的接收值:将接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址并且候选路由地址为路由数据帧的发送方地址的接收记录表项作为本接收记录表项,向本接收记录表项对应的接收队列中移入路由数据帧的链路状态报文的序列号,同时向除本接收记录表项之外的接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址的其他接收记录表项对应的接收队列中移入一个空元素,然后将接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址的各 接收记录表项的接收值更新为其对应的接收队列中存储的序列号的数量与接收队列长度的比值。
  13. 根据权利要求12所述的网络分享系统,其特征在于,所述叠加队列与所述接收队列的长度相同;新生成的链路状态报文的序列号在前一个具有相同原始发送方地址的链路状态报文的序列号的基础上按固定步长L递增;所述路由信息维护模块每次更新所述叠加表时,按照以下方式更新叠加表中叠加记录表项的叠加值:提取叠加表中各叠加记录表项对应的叠加队列中序列号的最大值,记为a,提取路由数据帧的链路状态报文的序列号,记为b,向叠加表中除本叠加记录表项以外的其他叠加记录表项对应的叠加队列中依次移入((b-a)/L)个空元素,向本叠加记录表项对应的叠加队列中依次移入(((b-a)/L)-1)个空元素和序列号b,然后将叠加表中的各叠加记录表项中的叠加值更新为其对应的叠加队列中存储的序列号的数量与叠加队列长度的比值;所述路由信息维护模块每次更新所述接收表时,按照以下方式更新接收表中相关接收记录表项的接收值:提取接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址的接收记录表项对应的接收队列中序列号的最大值,记为m,提取路由数据帧的链路状态报文的序列号,记为n,向接收表中除本接收记录表项以外的目的地址为路由数据帧的链路状态报文的原始发送方地址的接收记录表项对应的接收队列中依次移入((n-m)/L)个空元素,向本接收记录表项对应的接收队列中依次移入(((n-m)/L)-1)个空元素和序列号n,然后将接收表中目的地址为路由数据帧的链路状态报文的原始发送方地址的各接收记录表项的接收值更新为其对应的接收队列中存储的序列号的数量与接收队列长度的比值。
  14. 根据权利要求8-13任一项所述的网络分享系统,其特征在于,所述网络接入装置的网络接入组网单元还包括有预处理子单元,所述预处理子单元连接于网络接入组网单元中的所述路由子单元、数据收发子单元和服务信息子单元,所述预处理子单元中维护有预处理表,所述预处理表包括有若干预处理记录表项,每个预处理记录表项中记录有原始发送方地址和序列号的对应关系,所述预处理子单元基于数据收发子单元接收的路由数据帧维护所述预处理表并判定路由数据帧是否为最新的路由数据帧,首先在预处理表中查询原始发送方地址为路由数据帧的链路状态报文的原始发送方地址的预处理记录表项,若没有查询到对应的预处理记录表项,则判定数据收发子单元提供的路由数据帧为最新的路由数据帧并将其发往路由子单元的路由信息维护模块,同时在预处理表中新增一项预处理记录表项,新增的预处理记录表项的原始发送方地址和序列号分别为路由数据帧的链路状态报文的原始发送方地址和序列号;若在预处理表中查询到原始发送方地址为路由数据帧的链路状态报文的原始发送方地址的预处理记录表项,则比较所述预处理记录表项中的序列号与路由数据帧的链路状态报文的序列号的大小关系,若所述预处理记录表项中的序列号小于路由数据帧的链路状态报文的序列号,则判定数据收发子单元提供的路由数据帧为最新的路由数据帧并将其发往路由子单元的路由信息维护模块,同时将所述预处理记录表项中的序列号更新为路由数据帧的链路状态报文的序列号,若所述预处理记录表项中的序列号大于等于路由数据帧的链路状态报文的序列号,则判定数据收发子单元提供的路由数据帧不是最新的路由数据帧,将所述路由数据帧丢弃;同时所述预处理子单元判定数据收发子单元提供的路由数据帧为最新的路由数据帧时,进一步判断最新的路由数据帧的链路状态报文中是否设置有终端信息,若是则向所述服务信息子单元提供服务更新信息,所述服务更新信息包括路由数据帧的链路状态报文的原始发送方地址和链路状态报文中的终端信息。
  15. 根据权利要求14所述的网络分享系统,其特征在于,所述服务信息子单元接收到预处理子单元提供的服务更新信息后按照以下方式更新服务信息表:对于服务更新信息的终端信息中的每一个使用终端地址,在服务信息表中查找使用终端地址为该使用终端地址且网络拓展装置地址为服务更新信息中的原始发送方地址的服务记录表项,若不能查找到所述服务记录表项,则在服务信息表中新增一项服务记录表项,新增服务记录表项的使用终端地址为该使用终端地址,新增服务记录表项的网络拓展装置地址为服务更新信息中的原始发送方地址;同时对于服务信息表中每一个网络拓展装置地址为服务更新信息中原始发送方地址的服务记录表项,如果该服务记录表项中的使用终端地址没有包括在服务更新信息的终端信息包括的使用终端地址中,则在服务信息表中删除该服务记录表项。
  16. 根据权利要求8-13任一项所述的网络分享系统,其特征在于,所述网络拓展装置的网络拓展组网单元还包括有预处理子单元,所述预处理子单元连接于网络拓展组网单元中的所述路由子单元和数据收发子单元,所述预处理子单元中维护有预处理表,所述预处理表包括有若干预处理记录表项,每个预处理记录表项中记录有原始发送方地址和序列号的对应关系,所述预处理子单元基于数据收发子单元接收的路由数据帧维护所述预处理表并判定路由数据帧是否为最新的路由数据帧,首先在预处理表中查询原始发送方地址为路由数据帧的链路状态报文的原始发送方地址的预处理记录表项,若没有查询到对应的预处理记录表项,则判定数据收发子单元提供的路由数据帧为最新的路由数据帧并将其发往路由子单元的路由信息维护模块,同时在预处理表中新增一项预处理记录表项,新增的预处理记录表项的原始发送方地址和序列号分别为路由数据帧的链路状态报文的原始发送方地址和序列号;若在预处理表中查询到原始发送方地址为路由数据帧的链路状态报文的原始发送方地址的预处理记录表项,则比较所述预处理记录表项中的序列号与路由数据帧的链路状态报文的序列号的大小关系,若所述预处理记录表项中的序列号小于路由数据帧的链路状态报文的序列号,则判定数据收发子单元提供的路由数据帧为最新的路由数据帧并将其发往路由子单元的路由信息维护模块,同时将所述预处理记录表项中的序列号更新为路由数据帧的链路状态报文的序列号,若所述预处理记录表项中的序列号大于等于路由数据帧的链路状态报文的序列号,则判定数据收发子单元提供的路由数据帧不是最新的路由数据帧,将所述路由数据帧丢弃。
  17. 根据权利要求9或10所述的网络分享系统,其特征在于,所述路由信息维护模块每次更新完路由数据帧的链路状态报文的链路状态值时,将所述链路状态报文发送至数据收发子单元,数据收发子单元将所述链路状态报文封装为路由数据帧后转发,封装的路由数据帧的接收方地址为广播地址,发送方地址为数据收发子单元的地址,帧体为路由数据标记和所述链路状态报文。
  18. 根据权利要求11所述的网络分享系统,其特征在于,所述网络拓展装置的路由信息维护模块同时维护有所述路由分配表和网关列表,所述网关列表包括有若干网关记录表项,每个网关记录表项中记录有网络接入装置的地址和链路状态稳定值的对应关系,所述路由信息维护模块每次更新完所述链路状态表后,按照以下方式同时更新所述网关列表:首先判断路由数据帧的链路状态报文中是否设置有网关标记,若否则不进行网关列表更新,若是则在链路状态表中查询得到目的地址为路由数据帧的链路状态报文的原始发送方地址的链路状态记录表项集合,在所述链路状态记录表项集合中选取链路状态稳定值最大的链路状态记录表项,并将该链路状态稳定值最大的链路状态记录表项中的目的地址和链路状态稳定值分别作为网关更 新信息中的目的地址和链路状态稳定值,然后在网关列表中查询网络接入装置地址为网关更新信息中的目的地址的网关记录表项,若能查到所述网关记录表项则将所述网关记录表项中的链路状态稳定值更新为所述网关更新信息中的链路状态稳定值,若不能查到所述网关记录表项,则在网关列表中新增一条网关记录表项,新增的网关记录表项的网络接入装置地址和链路状态稳定值分别为所述网关更新信息中的目的地址和链路状态稳定值;所述网络拓展装置的路由信息维护模块接收到发送自网络拓展装置的数据收发子单元的网关查询请求后,在网关列表中查找链路状态稳定值最大的网关记录表项,并将所查找到的网关记录表项中的网络接入装置地址作为网关查询响应发送给所述数据收发子单元。
  19. 根据权利要求4-18任一项所述的网络分享系统,其特征在于,所述网络接入无线服务单元和网络拓展无线服务单元均包括有IP地址分配子单元和客户端接入子单元,所述客户端接入子单元为覆盖范围内的使用终端提供无线网络服务,所述IP地址分配子单元为接入客户端接入子单元提供的无线网络中的使用终端分配整个网络分享系统中唯一的IP地址。
  20. 根据权利要求14-16任一项所述的网络分享系统,其特征在于,所述预处理表的每条预处理记录表项中还记录有路由数据帧的最新接收时间,所述接收表的每条接收记录表项中还记录有路由数据帧的最新接收时间,所述路由信息维护模块包括有定时更新子单元,所述定时更新子单元按照一定的时间间隔周期性地遍历所述预处理表,对于预处理表中的每一条预处理记录表项都判断其中的最新接收时间和当前时间的差值是否超出第一阈值,若超出则在预处理表中删除对应的预处理记录表项,并在接收表、链路状态表和路由分配表中同时删除目的地址为该预处理记录表项中原始发送方地址的对应表项,在服务信息表中删除网络拓展装置地址为该预处理记录表项中原始发送方地址的表项,在网关列表中删除网络接入装置地址为该预处理记录表项中原始发送方地址的表项;所述定时更新子单元按照一定的时间间隔周期性地遍历所述接收表,对于接收表中的每一项接收记录表项都判断其中的最新接收时间和当前时间的差值是否超出第二阈值,若超出则在接收表中删除对应的接收记录表项,设被删除的接收记录表项中的目的地址为dest_mac、候选路由地址为cand_mac,删除所述接收记录表项后同时在链路状态表中删除目的地址为dest_mac并且候选路由地址为cand_mac的表项,然后在链路状态表中查询目的地址为dest_mac的表项记为动态更新表项集合,在动态更新表项集合中选取链路状态稳定值最大的表项作为路由更新信息,并基于所述路由更新信息更新路由分配表。
  21. 一种基于权利要求4-20任一项所述的网络分享系统进行的网络分享方法,其特征在于,包括以下网络分享过程:
    (1)、对于网络接入装置覆盖范围内的使用终端访问互联网时,来自所述使用终端的数据包通过本网络接入装置的网络接入无线服务单元发送至本网络接入装置的数据分析单元,再经数据分析单元发往互联网;
    (2)、对于来自互联网的数据包,网络接入装置的数据分析单元接收所述数据包,并判定所述数据包是否发往本网络接入装置覆盖范围内的使用终端,若是则将所述数据包通过本网络接入装置的网络接入无线服务单元发送至所述使用终端;若否则所述数据分析单元将所述数据包发往本网络接入装置的数据收发子单元,所述数据收发子单元接收到所述数据包时,先向本网络接入装置的服务信息子单元发送服务查询请求,所述服务查询请求包括所述数据包的接收终端地址,所述服务信息子单元在其维护的服务信息表中查询使用终端地址与所述接收终端地址相同的服务 记录表项,并将所查找到的服务记录表项中的网络拓展装置地址作为服务查询响应发给所述数据收发子单元,所述数据收发子单元收到所述服务查询响应后向本网络接入装置的路由子单元发送路由查询请求,所述路由查询请求包括服务查询响应中的网络拓展装置地址,所述路由子单元在其维护的路由分配表中查找目的地址与路由查询请求中的网络拓展装置地址相同的分配记录表项,并将所查找到的分配记录表项中的候选分配路由地址作为路由查询响应发给所述数据收发子单元,所述数据收发子单元根据服务查询响应和路由查询响应构造负载数据帧并发送,所构造的负载数据帧的接收方地址为路由查询响应中的候选分配路由地址,所构造的负载数据帧的发送方地址为所述数据收发子单元的地址,所构造的负载数据帧的帧体包括负载数据标记、最终接收装置地址和所述数据包,其中负载数据帧的帧体中的最终接收装置地址为所述服务查询响应中的网络拓展装置地址;
    (3)、对于网络接入装置的数据收发子单元接收到其他网络装置发送的负载数据帧时,所述数据收发子单元提取所接收到的负载数据帧的帧体中的最终接收装置地址,并判断所述最终接收装置地址是否为本网络接入装置的地址,若是则提取所述负载数据帧的帧体中的数据包并发送至本网络接入装置的数据分析单元,经数据分析单元将所述数据包发往互联网,若所述最终接收装置地址不为本网络接入装置的地址,则所述数据收发子单元先向本网络接入装置的路由子单元发送路由查询请求,所述路由查询请求包括所述最终接收装置地址,所述路由子单元在其维护的路由分配表中查找目的地址与路由查询请求中的最终接收装置地址相同的分配记录表项,并将所查找到的分配记录表项中的候选分配路由地址作为路由查询响应发给所述数据收发子单元,所述数据收发子单元根据路由查询响应构造负载数据帧并发送,所构造的负载数据帧的接收方地址为路由查询响应中的候选分配路由地址,所构造的负载数据帧的发送方地址为所述数据收发子单元的地址,所构造的负载数据帧的帧体包括负载数据标记、所述最终接收装置地址和所述数据包;
    (4)、对于网络拓展装置覆盖范围内的使用终端访问互联网时,来自所述使用终端的数据包通过本网络拓展装置的网络拓展无线服务单元发送至本网络拓展装置的数据收发子单元,所述数据收发子单元接收到所述数据包时,先向本网络拓展装置的路由子单元发送网关查询请求,所述路由子单元收到网关查询请求后在其维护的网关列表中查找链路状态稳定值最大的网关记录表项,并将所查找到的网关记录表项中的网络接入装置地址作为网关查询响应发送给所述数据收发子单元,所述数据收发子单元接收到所述网关查询响应后向本网络拓展装置的路由子单元发送路由查询请求,所述路由查询请求包括所述网关查询响应中的网络接入装置地址,所述路由子单元在其维护的路由分配表中查找目的地址与路由查询请求中的网络接入装置地址相同的分配记录表项,并将所查找到的分配记录表项中的候选分配路由地址作为路由查询响应发给所述数据收发子单元,所述数据收发子单元根据网关查询响应和路由查询响应构造负载数据帧并发送,所构造的负载数据帧的接收方地址为路由查询响应中的候选分配路由地址,所构造的负载数据帧的发送方地址为所述数据收发子单元的地址,所构造的负载数据帧的帧体包括负载数据标记、最终接收装置地址和所述数据包,其中负载数据帧的帧体中的最终接收装置地址为所述网关查询响应中的网络接入装置地址;
    (5)对于网络拓展装置的数据收发子单元接收到其他网络装置发送的负载数据帧时,所述数据收发子单元提取所接收到的负载数据帧的帧体中的最终接收装置地址,并判断所述最终接收装置地址是否为本网络拓展装置的地址,若是则提取所述 负载数据帧的帧体中的数据包并发送至本网络拓展装置的网络拓展无线服务单元,经网络拓展无线服务单元将所述数据包发送至本网络拓展装置覆盖范围内的使用终端;若所述最终接收装置地址不为本网络拓展装置的地址,则所述数据收发子单元先向本网络拓展装置的路由子单元发送路由查询请求,所述路由查询请求包括所述最终接收装置地址,所述路由子单元在其维护的路由分配表中查找目的地址与路由查询请求中的最终接收装置地址相同的分配记录表项,并将所查找到的分配记录表项中的候选分配路由地址作为路由查询响应发给所述数据收发子单元,所述数据收发子单元根据路由查询响应构造负载数据帧并发送,所构造的负载数据帧的接收方地址为路由查询响应中的候选分配路由地址,所构造的负载数据帧的发送方地址为所述数据收发子单元的地址,所构造的负载数据帧的帧体包括负载数据标记、所述最终接收装置地址和所述数据包。
PCT/CN2016/101290 2016-05-31 2016-09-30 一种网络分享系统和网络分享方法 WO2017206410A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610376433.6A CN107454653B (zh) 2016-05-31 2016-05-31 一种网络分享系统和网络分享方法
CN201610376433.6 2016-05-31

Publications (1)

Publication Number Publication Date
WO2017206410A1 true WO2017206410A1 (zh) 2017-12-07

Family

ID=60478401

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/101290 WO2017206410A1 (zh) 2016-05-31 2016-09-30 一种网络分享系统和网络分享方法

Country Status (2)

Country Link
CN (1) CN107454653B (zh)
WO (1) WO2017206410A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108770039B (zh) * 2018-04-08 2021-04-13 山东比特智能科技股份有限公司 网状网络路由重置方法
CN108881025B (zh) * 2018-06-01 2021-04-09 国电南瑞科技股份有限公司 基于云终端方式的多电网调控系统画面统一浏览集成方法
CN113612691B (zh) * 2021-08-06 2023-04-07 浙江工商大学 一种路径转换方法、存储介质及终端设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110733A (zh) * 2007-08-21 2008-01-23 北京航空航天大学 大规模动态异构混合无线自组织网络中的接入及路由计算方法
CN101197748A (zh) * 2007-11-30 2008-06-11 华南理工大学 一种基于分区树的多跳无线自组织网络构建方法
US20090274160A1 (en) * 2008-04-30 2009-11-05 Brother Kogyo Kabushiki Kaisha Tree-shaped broadcasting system, packet transmitting method, node device, and computer-readable medium
CN103347294A (zh) * 2013-07-11 2013-10-09 清华大学 无线传感器系统及数据收集方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101521895A (zh) * 2009-04-03 2009-09-02 南京邮电大学 无线自组织网络中用于构建多跳路由转发的方法
US9084091B2 (en) * 2011-11-17 2015-07-14 Silver Spring Networks, Inc. Registration and data exchange using proxy gateway
CN102938907B (zh) * 2012-10-09 2014-12-24 常熟理工学院 一种全ip无线传感器网络移动方法
CN103312547B (zh) * 2013-06-18 2016-06-29 华为技术有限公司 通信方法、装置及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110733A (zh) * 2007-08-21 2008-01-23 北京航空航天大学 大规模动态异构混合无线自组织网络中的接入及路由计算方法
CN101197748A (zh) * 2007-11-30 2008-06-11 华南理工大学 一种基于分区树的多跳无线自组织网络构建方法
US20090274160A1 (en) * 2008-04-30 2009-11-05 Brother Kogyo Kabushiki Kaisha Tree-shaped broadcasting system, packet transmitting method, node device, and computer-readable medium
CN103347294A (zh) * 2013-07-11 2013-10-09 清华大学 无线传感器系统及数据收集方法

Also Published As

Publication number Publication date
CN107454653A (zh) 2017-12-08
CN107454653B (zh) 2021-06-15

Similar Documents

Publication Publication Date Title
US7606176B2 (en) System and method to improve the performance of an on demand routing protocol in a wireless network
US7315548B2 (en) Method and apparatus for determining a route between a source node and a destination node in a wireless multihopping communication network
US8441958B2 (en) Directed acyclic graph discovery and network prefix information distribution relative to a clusterhead in an ad hoc mobile network
US8787350B2 (en) System and method to facilitate the use of multiple radios to increase the capacity of a wireless communication network
CN1926835B (zh) 在无线多跳自组织网络中用于地址解析映射的方法、通信装置和系统
US20070274232A1 (en) Method, Communication Device and System for Detecting Neighboring Nodes in a Wireless Multihop Network Using Ndp
US20080137556A1 (en) Mesh networking auto configuration method, virtual link setting method, packet transmission method in multi-hop wireless lan, and terminal thereof
US20080317047A1 (en) Method for discovering a route to a peer node in a multi-hop wireless mesh network
US8254348B2 (en) Voice-over-internet protocol intra-vehicle communications
US20080240112A1 (en) Layer 2 routing protocol
US8284775B2 (en) Six-address scheme for multiple hop forwarding in wireless mesh networks
US20070076673A1 (en) System and method to discover and maintain multiple routes in a wireless communication network
WO2008157650A1 (en) Method for discovering a route to an intelligent access point (iap)
WO2017206410A1 (zh) 一种网络分享系统和网络分享方法
CN108449271A (zh) 一种监测路径节点能量和队列长度的路由方法
WO2017206409A1 (zh) 基于无线自组织网络的移动通信系统
CN101106520A (zh) 基于aodv的数根节点独立的多路由技术
Rahman et al. Integrated metric-ad hoc on-demand distance vector: a routing protocol over wireless mesh networks
Park et al. Routing table maintenance in mobile ad hoc networks
Oigawa et al. An improvement in zone routing protocol using bloom filter
Chissungo et al. Routing protocols and metrics used on wireless mesh networks
Eu et al. Experimental performance modeling of MANET interconnectivity
KR101029497B1 (ko) 리엑티브 방식의 라우팅 프로토콜을 사용하는 이동 애드혹 네트워크 상에서 경로탐색 과정을 통한 에이알피 프로토콜 대체 방법
Su et al. HSG‐ad hoc network: A novel hierarchical star graph ad hoc network with self‐organization and routing discovery free
Kim et al. Region-Based multicast routing protocol with dynamic address allocation scheme in mobile ad-hoc networks

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16903792

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16903792

Country of ref document: EP

Kind code of ref document: A1