A kind of realization method and system of wireless network relayingTechnical field
The present invention relates to a kind of realization method and systems of wireless network relaying, are relayed more particularly to a kind of wireless networkRealization method and system.
Background technology
Relaying in traditional technology is intended to method and is applied to LoRa (a kind of low-power consumption wide area network, Low Power WideArea Network- abridge LPWAN) in a kind of wireless technology, have long range, low-power consumption, low rate, low cost spyPoint is suitble to large scale deployment.Coverage area can be a city, even a country, can realize the data of collectionIt is integrated into common data platform.Such as smart city, wisdom traffic, wisdom factory project are established, these data can also be utilizedThe big data that can carry out the later stage is excavated, and is conducive to the items such as city management, social public administration, industry internet, development consultingMesh.
The LoRaWAN network architectures are made of three parts, including terminal, gateway (Gateway) or are base station, network serviceDevice (Network Server- abbreviation NS) forms.It gives the correct time in LoRaWAN network terminal data, terminal outwardly sends no line numberAccording to;After gateway receives wireless signal, can data be reported to by net by Ethernet or cellular carrier network (3G or 4G)Network server;Network server preserves the data of reception, and identifies the type of data packet reported, if needing backMultiple data packet will then reply message and is pushed to gateway, sent in the form of wireless by gateway again.It is taken in gateway and networkInteraction protocol between device of being engaged in is complete ICP/IP protocol, is wirelessly interacted between terminal and gateway, using belonging to MACThe LoRaWAN agreements of layer.In LoRaWAN specifications, two kinds of terminal access modules, respectively Over-The-Air are definedActivation (abbreviation OTAA) and Activation By Personalization (abbreviation ABP).It, can root under OTAA patternsThe AppNonce that the DevNonce and network server generated at random according to terminal is generated at random automatically generates NwkSKey (NetworkSession Key) and AppSKey (Application Session Key);It is then to use fixed NwkSKey under ABP patternsAnd AppSKey.Both of which all respectively has feature, and the safety of OTAA is more preferable, and ABP is then accessed using fairly simple.In LoRaWANIn specification, the operating mode of tri- kinds of transmission mechanisms of A, B, C is defined, we are known as Class A, Class B, Class C.During Class mode As, terminal can open after a upstream data is sent completely after the RECEIVE_DELAY1 times are waited forRX1 receives window, if being not received by data during RX1 receives window, (RECEIVE_DELAY2) again after waiting for 1 secondIt opens RX2 and receives window, receive downlink data by way of two are opened after both uplink windows and receives window, instituteGateway to be required data must to be sent when downlink window is opened, data are not otherwise just received.In Class AWhen, in addition to uplink and downlink window is opened the time for sending or receiving data, other time is all processing suspend mode, in this way can be mostThe reduction power consumption of limits.Class B-modes are on the basis of Class mode As, periodically report and send Beacon messages,After gateway receives Beacon messages in this way, data can be issued receiving in window accordingly.Class C are then in Class AOn the basis of, by the period of terminal sleeping all for monitoring downlink data, so the reception window of Class C is always on, no longer it has been low-power consumption under this pattern, has been only used for the high application of real time down configuration requirement.
According to LoRaWAN1.01 specifications define, 470 frequency range uplink frequency point of China from 470.3MHz to 489.3MHz,In per 200KHz be a frequency point, a frequency point corresponds to a working channel;Such as mono- channel of 470.3MHz, 470.5MHzOne channel, etc. is divided into 96 channels altogether.And the range of receiving of a gateway can only in continuous 8 range of channels,So 96 channels can be divided into 12 channel groups again.
The receivable range of channels of each gateway is a channel group.Terminal and the mutual messaging of gateway, it is desirable that workIn same channel group, it is assumed that terminal works are in first channel, and frequency point ranges are 470.3 to 471.7, transmission dataWhen, can therefrom random one frequency point of selection, can be respectively 470.3MHz, 470.5MHz, 470.7MHz, 470.9MHz,471.1MHz、471.3MHz、471.5MHz、471.7MHz。
Since the LoRaWAN network terminals are wirelessly reported datas, so under certain specific environments, such as undergroundRoom, can cause wireless signal that cannot be passed to gateway at ventilation shaft due to shielding, interference;Or signal is too weak, noise too big netClosing can not also parse after receiving, and be finally that data is caused to report failure.In this case, it is that increase terminal and gateway are wireless firstTransmission power increases antenna gain, but both methods is only limited to the characteristic of equipment in itself, there is certain limitation;Secondly by way of oil (gas) filling device.Can blind spot region increase a gateway, cover blind spot region in equipment, but thisKind mode arranges net cost can be higher;In addition it is to increase a relaying in blind spot region, is responsible for terminal data in blind spot regionForwarding.Relaying only does wireless terminal data forwarding, too powerful function is not needed to, so cost can be more much lower than gateway.
In the implementation when equipment, mainly there is Railway Project, first, since normal terminal data reports frequency point and spread spectrumThe factor can be random, but it is fixed to relay the frequency point persistently received and spreading factor setting, so will appear relayingIt receives frequency point and sends the inconsistent situation of frequency point with terminal, relaying is not received by terminal data, is also just not carried out relaying work(Energy;Second is that may be received when terminal signaling is in by gateway, and the state that may not be received by gateway, can cause so sometimesNetwork server receives one in front and one in back two identical uplink packets simultaneously, if handled simultaneously, will reply two downstream packets, in this wayTerminal can also receive two downstream packets, be likely to result in this way in service logic abnormal.
To sum up, the prior art exists since relaying and terminal send and receive the inconsistent caused relay function defect of frequency pointAnd due to webmaster receive data uncertainty data is caused to report service exception the technical issues of.
Invention content
In view of the shortcomings that above prior art, the purpose of the present invention is to provide a kind of implementation methods of wireless network relayingAnd system, including:
S1, receiving terminal access request in fixed flag frequency point, simultaneously forwarding terminal access request to gateway, receives gatewayResponse message sends gateway response message to terminal, and the network response for establishing repeater and terminal room connects;
S2, it receives terminal uplink data packet in flag frequency point and records receiving time, send terminal uplink data packet to netIt closes, waits gateway downlink data to be received, the sending time for the time adjustment gateway downlink data that opened a window according to extended terminal is being sent outIt send and gateway downlink data is sent in the time to terminal.
In one embodiment of the present invention, step S2, terminal uplink data packet is received in flag frequency point and record receptionTime sends terminal uplink data packet to gateway, waits gateway downlink data to be received, opened a window the time according to the terminal of logic of propositionsThe sending time of gateway downlink data is adjusted, gateway downlink data is sent in sending time to terminal, including:
S21, forwarding terminal send upstream data packet and receive downstream response message;
S22, the downstream response message time that downlink transfer is adjusted according to the windowing time of terminal so that downstream response messageTime is less than the windowing time;
S23, according to downstream response message time downlink transfer downstream response message.
In one embodiment of the present invention, a kind of wireless network relay system, including:Network request trunk module and upperRow downlink relay module;Network request trunk module, for receiving terminal access request and forwarding terminal access request to gateway,Gateway response message is received, sends gateway response message to terminal, the network response for establishing repeater and terminal room connects;UplinkDownlink relay module is connect with the request trunk module that networks, and for receiving terminal uplink data packet and recording receiving time, is sentTerminal uplink data packet waits gateway downlink data to be received, according to extended terminal windowing time adjustment gateway downlink to gatewayThe sending time of data sends gateway downlink data to terminal in sending time.
In one embodiment of the present invention, upstream and downstream trunk module includes:Relay data forwarding module, downlink transferTime-triggered protocol module and downlink transfer module;Data forwarding module is relayed, the upstream data packet sent for forwarding terminal simultaneously connectsReceive downstream response message;Downlink times processing module is connect with relaying data forwarding module, for receiving downlinkDuring response message, according to the downstream response message time of the windowing time adjustment downlink transfer of terminal so that downstream response messageTime is less than the windowing time;Downlink transfer module is connect with downlink times processing module, for according to downstream response messageTime downlink transfer downstream response message.
In one embodiment of the present invention, a kind of data transmission method of wireless network relaying realization, including:
S1 ', terminal access request is sent to repeater, receive gateway response message, establish the net of terminal and inter-repeaterNetwork response connection, the frequency point that record connection uses;
S2 ', usage flag frequency point send terminal uplink data packet, and delay receives the windowing time of window, are receiving windowIt is inscribed to accept row response message, obtain downlink data from downstream response message.
In one embodiment of the present invention, terminal access request step S1 ', is sent to repeater, receives gateway responseInformation, the network response connection for establishing terminal and inter-repeater include:
S11 ' sends the terminal access request;
S12 ' records the frequency point when accessing network success, wherein, the frequency point is the flag of the repeaterFrequency point.
In one embodiment of the present invention, terminal uplink data packet step S2 ', is sent, delay receives the windowing of windowTime is inscribed in reception window and accepts row response message, downlink data is obtained from downstream response message, including:
S21 ' usage flags frequency point sends upstream data packet with fixed rate;
S22 ' settings receive the first reception window of downstream response message and spare reception window;
S23 ' judges whether the first reception window receives downstream response message;
S24 ' postpones the spare unlatching for receiving window if it is not, then according to logic of propositions and the requirement of response message receiving timeTime;
S25 ' opens downstream response message according to the opening time and receives window;
S26 ' receives usage flag frequency point in window in downstream response and receives downstream response message;
S27 ' judgements receive in window whether receive downstream response message in downstream response message;
S28 ' obtains downlink data, and finishing service data report process.
In one embodiment of the present invention, a kind of terminal, including:Terminal networking module and business datum reporting module:Terminal networking module for sending terminal access request to repeater, receives gateway response message, establishes terminal and inter-repeaterNetwork response connection, the frequency point that uses of record connection;Business datum reporting module is connect with business datum reporting module, is used forUsage flag frequency point sends terminal uplink data packet, and delay receives the windowing time of window, is inscribed in reception window and accepts capable soundMessage is answered, downlink data is obtained from downstream response message.
In one embodiment of the present invention, terminal networking module includes:Access request module, frequency point logging modle and companyConnect unsuccessfully module;Access request module sends terminal access request;Frequency point logging modle is connect with access request module, is used forIn successful connection, judgement is successfully established terminal and is connect with repeater, and access network success records frequency point, wherein, during frequency point isAfter the flag frequency point of device;Connection failure module is connect with access request module, for when connecting failed, judgement to access networkFailure.
In one embodiment of the present invention, business datum reporting module includes:Packet sending module, reception window are setPut module, first window receives judgment module, windowing time delay module, window opening module, message receiving module, responds judgement mouldBlock and downlink data acquisition module;Packet sending module sends upstream data packet for usage flag frequency point with fixed rate;Window setting module is received, for setting first to receive window and spare reception window;First window receives judgment module, is used forJudge whether the first reception window receives downstream response message;Open a window time delay module, for not received in the first reception windowDuring to downstream response message, according to logic of propositions and receiving time requirement, postpone the spare opening time for receiving window;Window is openedModule is opened, window is received for opening downstream response message according to the opening time;Message receiving module connects with window opening moduleIt connects, downstream response message is received for receiving usage flag frequency point in window in downstream response;Response determination module connects with messageModule connection is received, for judging to receive in window whether receive downstream response message in downstream response message;Downlink data obtainsModulus block is connect with message receiving module, for receiving in window whether receive downstream response message in downstream response messageWhen, downlink data is obtained, finishing service data report process.
As described above, a kind of realization method and system of wireless network relaying provided by the invention, has below beneficial to effectFruit:Trunking can easily be disposed, it is only necessary to open trunking, it is possible to realize the data penetration transmission of terminal, withoutIt to be specifically configured, be disposed convenient for application again.The relay processes in traditional technology are solved since random terminal data reportsCaused by frequency point and spreading factor and the frequency point that persistently receives of relaying and spreading factor are set as fixed relay reception frequency point withIt is inconsistent so that the technical issues of relay function can not be realized that terminal sends frequency point.Meanwhile the present invention in network server simultaneouslyThe technical issues of two downstream packets generation service logics are abnormal is replied after receiving one in front and one in back two identical uplink packets.
To sum up, the present invention solves of the existing technology sends and receives with terminal that frequency point is inconsistent to be caused due to relayingRelay function defect and due to webmaster receive data uncertainty data is caused to report service exception the technical issues of, portionAdministration and it is more convenient to use, relay function it is highly reliable.
Description of the drawings
Fig. 1 is shown as a kind of implementation method step schematic diagram of wireless network relaying of the present invention.
Fig. 2 is shown as the relay forwarding specific steps schematic diagram of the present invention.
Fig. 3 is shown as a kind of wireless network relay system module diagram of the present invention.
Fig. 4 is shown as a kind of upstream and downstream trunk module schematic diagram of the present invention.
Fig. 5 is shown as the data transmission method step schematic diagram that a kind of wireless network relaying of the present invention is realized.
Fig. 6 is shown as the relay transmission schematic diagram of the present invention.
The transmission frequency point that Fig. 7 is shown as the present invention determines step schematic diagram.
Fig. 8 is shown as the terminal downstream transmission step schematic diagram of the present invention.
Fig. 9 is shown as a kind of terminal module schematic diagram of the present invention.
Figure 10 is shown as the terminal networking module diagram of the present invention.
Figure 11 is shown as the business datum reporting module schematic diagram of the present invention.
Component label instructions
A kind of 1 wireless network relay system
11, which network, asks trunk module
12 upstream and downstream trunk modules
121 relaying data forwarding modules
122 downlink times processing modules
123 downlink transfer modules
A kind of 2 ' terminals
21 ' terminal networking modules
22 ' business datum reporting modules
211 ' relaying data forwarding modules
212 ' downlink times processing modules
213 ' downlink transfer modules
221 ' packet sending modules
222 ' receive serial port setting module
223 ' first windows receive judgment module
224 ' windowing time delay modules
225 ' window opening modules
226 ' message receiving modules
227 ' response judgment modules
228 ' downlink data acquisition modules
Step numbers explanation
Fig. 1 S1~S2
Fig. 2 S21~S23
Fig. 5 S1 '~S2 '
Fig. 7 S11 '~S12 '
Fig. 8 S21 '~S28 '
Specific embodiment
Embodiments of the present invention are illustrated by particular specific embodiment below, those skilled in the art can be by this explanationContent disclosed by book understands other advantages and effect of the present invention easily.
It please refers to Fig.1 to Figure 11, it should however be clear that the structure depicted in this specification institute accompanying drawings, only coordinating specificationRevealed content so that those skilled in the art understands and reads, is not limited to the enforceable restriction item of the present inventionPart, therefore do not have technical essential meaning, the modification of any structure, the change of proportionate relationship or the adjustment of size are not influencingUnder the effect of present invention can be generated and the purpose that can reach, should all still fall can contain in disclosed technology contentsIn the range of lid.Meanwhile in this specification it is cited such as " on ", " under ", " left side ", " right side ", " centre " and " one " term,Understanding rather than to limit the enforceable range of the present invention for narration is merely convenient to, relativeness is altered or modified,It is changed under technology contents without essence, when being also considered as the enforceable scope of the present invention.
Referring to Fig. 1, a kind of implementation method step schematic diagram of wireless network relaying of the offer of the display present invention, such as Fig. 1Shown, a kind of implementation method of wireless network relaying includes:
S1, receiving terminal access request in fixed flag frequency point, simultaneously forwarding terminal access request to gateway, receives gatewayResponse message sends gateway response message to terminal, and the network response for establishing repeater and terminal room connects;Specifically, becauseThe frequency point that RXU is persistently received must be fixed, and in the present invention program, in each channel group, the last one frequency point can as RXUWorkable frequency point, the two frequency points are referred to herein as flag frequency point.470 frequency range of China has 12 flag frequency point (channelsGroup), RXU can be operated in any one of these frequency points.Since the signal of blind spot region is weaker, with the expansion of higher rateThe frequency factor may not can guarantee signal transmission, so RXU uses fixed spreading factor (SF) 12, the i.e. mode of minimum speed limit.Such asFruit connection failure needs to send the Join request messages of flag frequency point with SF12, if it is possible to receive what relay forwarding came outJoin response messages can be then successfully accessed, and be illustrated using the success of relay access network network;If can not receive Join response messages,Illustrate that this wheel Join failures or current environment add in trunking and also connect less than base station.
S2, it receives terminal uplink data packet in flag frequency point and records receiving time, send terminal uplink data packet to netIt closes, waits gateway downlink data to be received, the sending time for the time adjustment gateway downlink data that opened a window according to extended terminal is being sent outIt send and gateway downlink data is sent in the time to terminal.During accessing terminal to network, a frequency point is selected in each channel group at randomJoin request messages are sent, if successful connection, illustrate that the network does not need to go directly base station by repeater.Specifically, after terminal is successfully accessed, two reception windows can be opened after upstream data is sent completely.Using relaying transparent data messageAfterwards, original RX1 window receptions time cannot ensure that, simultaneously because data transmission period can not be estimated, so the RX2 of terminalWindowing also has and can not receive, and a kind of implementation method of wireless network relaying provided by the invention does the windowing time of terminalProcessing is delayed, ensures to be received by terminal in downlink data.
Referring to Fig. 2, the relay forwarding specific steps schematic diagram of the present invention is shown as, as shown in Fig. 2, step S2, receptionTerminal uplink data packet simultaneously records receiving time, sends terminal uplink data packet to gateway, waits gateway downlink data to be received, rootAccording to the sending time of the terminal windowing time adjustment gateway downlink data of logic of propositions, line number under gateway is sent in sending timeAccording to terminal, including:
S21, forwarding terminal send upstream data packet and receive downstream response message, relay forwarding downstream response messageIt is carried out in fixed frequency point;
S22, the downstream response message time that downlink transfer is adjusted according to the windowing time of terminal so that downstream response messageTime is less than the windowing time, after repeater receives downlink message, is finely tuned according to the windowing time of agreement, to adapt to opening for terminalThe window time adjusts, and then sends downlink message;
S23, according to downstream response message time downlink transfer downstream response message, after downlink times are finely tuned, underRow transmitting message is able to be received by terminal within the windowing time of terminal.
Referring to Fig. 3, a kind of wireless network relay system module diagram of the present invention is shown as, it is as described in Figure 3, a kind ofWireless network relay system 1, including:Network request trunk module 11 and upstream and downstream trunk module 12;Network request relaying mouldBlock 11, for receiving terminal access request, simultaneously forwarding terminal access request to gateway, receives gateway response message, sends gateway and ringAnswering information, the network response for establishing repeater and terminal room connects, networking stream of the terminal device in the above method to terminalJourney sends Join request connections and networks;Repeater is forwarded after receiving Join requests;It is handled by gateway and network serverAfterwards, Join responses are replied;Relaying forwards Join sound to connect again after receiving Join responses;Terminal represents to have networked after receiving Join responsesInto.Upstream and downstream trunk module 12 is connect with networking request module, for receiving terminal uplink data packet and recording receiving time,Terminal uplink data packet is sent to gateway, waits gateway downlink data to be received;Relaying receives forwarding uplink data after data, recordsThe timestamp of reception;Gateway is forwarded to network server after receiving, by normal process flow returned data packet;Repeater receivesIt after downlink message, is finely tuned according to the windowing time of agreement, to adapt to the adjustment of the windowing time of terminal, then sends downlink reportText;Terminal receives downlink message during RX2 windows are opened, and obtains downlink data, business datum reports process to complete.
Referring to Fig. 4, the upstream and downstream trunk module schematic diagram of the present invention is shown as, as shown in figure 4, upstream and downstream relaysModule 12 includes:Relay data forwarding module 121, downlink times processing module 122 and downlink transfer module 123;RelayingData forwarding module 121, the upstream data packet sent for forwarding terminal simultaneously receives downstream response message, when terminal receivesAfter networking request message response message, start reported data, wherein uplink message and downlink message is via relay forwarding;Downlink passesDefeated time-triggered protocol module 122 is connect with downlink times processing module 121, for when receiving downstream response message, rootAccording to the downstream response message time of the windowing time adjustment downlink transfer of terminal so that when downstream response message time is less than windowingBetween, the sending time for the time adjustment gateway downlink data that opened a window according to extended terminal sends gateway downlink in sending timeData are to terminal.Terminal sends upstream data packet, and receives window according to delay in 2 seconds is added to open above RECEIVE_DELAY1;Downlink transfer module 123 and downlink times processing module 122 connect, for according to downstream response message time downlink transferReply data is forwarded in windowing state by downstream response message, downlink transfer module 123 according to the downgoing time of fine tuningTerminal.
Fig. 5 and Fig. 6 are please referred to, the data transmission method step for being shown as a kind of wireless network relaying realization of the present invention is shownIntention and relay transmission sequence diagram, as shown in Figure 5 and Figure 6, the data transmission method that a kind of wireless network relaying is realized, including:
S1 ', terminal access request is sent to repeater, receive gateway response message, establish the net of terminal and inter-repeaterNetwork response connection, the frequency point that record connection uses, terminal can be learnt and currently connect after usage flag frequency point carries out Join successesIt is trunking to connect equipment, gives the correct time in business datum below and uses the flag frequency point and fixed rate consistent with relaying RXUSF12 carrys out transmission data;
S2 ', usage flag frequency point send terminal uplink data packet, and delay receives the windowing time of window, are receiving windowIt is inscribed to accept row response message, obtain downlink data from downstream response message.Assuming that t0 is start time, t1 is that terminal reportsData are transmitted the time, and t2 is the windowing time of the terminal after RECEIVE_DELAY1, and t3 is when RX1 is not receivedData, terminal open the time of RX2, and t4 is the time that terminal reenters dormancy.Relaying sequential should be sent from terminal dataCompletion starts, and t1 is the initial time of relaying, and t1 ' is data transmission period, when due to transparent transmission, so same data segmentTransmission time is the same, so t1 '-t1=t1-t0;T2 ' is that gateway issues the time of downlink data and relaying starts to connectReceive the time of user equipment downlink data;When there are during downlink data, t4 ' is exactly a unfixed time, because unpredictable arriveThe downlink data data length that gateway is replied is how many, and the space time that also can not just calculate this data is how many.If it needsIt to be received in the RX2 of terminal, it is desirable to meet t4 ' < t3.
Referring to Fig. 7, the transmission frequency point for being shown as the present invention determines step schematic diagram, as shown in fig. 7, step S1 ', transmissionTerminal access request receives gateway response message, the network response connection for establishing terminal and inter-repeater includes to repeater:
S11 ', terminal access request is sent, terminal sends Join network insertion request messages and built in terminal and trunkingAfter vertical connection, terminal knows trunking;
S12 ', frequency point is recorded when accessing network success, wherein, frequency point is the flag frequency point of repeater, and RXU is persistently receivedFrequency point must be fixed, in the present invention program, terminal record the fixation frequency point and in transmission process using the fixation frequencyPoint, the last one frequency point of each channel group as RXU can workable frequency point, the two frequency points be referred to herein as flag frequencyPoint.470 frequency range of China has 12 flag frequency points (channel group), and RXU can be operated in any one of these frequency points.Due toThe signal of blind spot region is weaker, and signal transmission may not be can guarantee with the spreading factor of higher rate.
Referring to Fig. 8, the terminal downstream transmission step schematic diagram of the present invention is shown as, as shown in figure 8, step S2 ', hairIt makes arrangements for his funeral and holds upstream data packet, delay receives the windowing time of window, is inscribed in reception window and accepts row response message, rung from downlinkIt answers and downlink data is obtained in message, including:
S21 ', usage flag frequency point send upstream data packet with fixed rate, using flag frequency point as downstream transmissionFixed frequency point determines the frequency point of trunking.Terminal in the present invention is given the correct time in carry out business using fixed frequency point, with relayingThe fixation flag frequency point that device uses is unified;
S22 ', setting receive the first reception window of downstream response message and spare reception window, after terminal is successfully accessed,Two reception windows can be opened after upstream data is sent completely, two reception windows one in front and one in back, ensure downlink in sequentialThe reception of business information in data packet;
S23 ', judge whether the first reception window receives downstream response message;
S24 ', if it is not, then according to logic of propositions and response message receiving time requirement, postpone it is spare receive window unlatchingTime, it is assumed that transmission time and T can obtain t3=T+RECEIVE_DELAY2, t4 '=2T+RECEIVE_ according to upper figureDELAY1 so the condition of t4 ' < t3 is T < 1, that is, requires data transmission period to be less than 1 second;
S25 ', terminal open downstream response message according to the opening time and receive window, in fact, when SF12,Maximum transmitted byte is 52 bytes defined in LoRaWAN specifications, and rate is 30 bytes-per-seconds during SF12, it is known that transmission at most needs1.5 second time.So directly data packet can be can not receive in some cases using RX2;
S26 ', usage flag frequency point reception downstream response message in window is received in downstream response, since terminal is in JoinCan obtain in the process access network mode, be relaying access or base station access, can terminal can specify areaIt is divided to two kinds of access ways.Fashionable in middle continued access, terminal can be by the time lengthening 2 seconds of RECEIVE_DELAY1;
S27 ', judgement receive in window whether receive downstream response message in downstream response message;And in network serviceThe corresponding value for receiving delay time or RECEIVE_DELAY1 of the terminal above device, so gateway can be according to the original timePoint is sent to relaying;
S28 ' obtains downlink data, and finishing service data report process;The time reported on relaying according to terminal is returningAccordingly extend the time for sending downlink data when multiple, meet the establishment of inequality t4 ' < t3 conditions.
Referring to Fig. 9, a kind of terminal module schematic diagram of the present invention is shown as, as shown in figure 9, a kind of terminal 2 ', including:Terminal networking module 21 ' and business datum reporting module 22 ':Terminal networking module 21 ', for sending terminal access request intoAfter device, gateway response message is received, the network response for establishing terminal and inter-repeater connects, the frequency point that record connection uses;IndustryBusiness data reporting module 22 ' is connect with terminal networking module 21 ', is sent terminal uplink data packet for usage flag frequency point, is prolongedThe windowing time of window is received late, is inscribed in reception window and accepts row response message, and lower line number is obtained from downstream response messageAccording to.
Referring to Fig. 10, it is shown as the terminal networking module diagram of the present invention, as shown in Figure 10, terminal networking module21 ' include:Access request module 211 ', frequency point logging modle 212 ' and connection failure module 213 ';Access request module 211 ',Send terminal access request;Frequency point logging modle 212 ', in successful connection, judgement to be successfully established terminal and connects with repeaterIt connects, access network success, record frequency point, frequency point logging modle 212 ' it is connect with access request module 211 ', wherein, during frequency point isAfter the flag frequency point of device;Connection failure module 213 ', for when connecting failed, judgement to access network failure, connection failureModule is connect with frequency point logging modle 212 '.
1 is please referred to Fig.1, the business datum reporting module schematic diagram of the present invention is shown as, as shown in figure 11, in business datumReport module 22 ' includes:Packet sending module 221 ' receives window setting module 222 ', first window reception judgment module223 ', time delay module 224 ', window opening module 225 ', message receiving module 226 ', response determination module 227 ' are opened a window underRow data acquisition module 228 ';Packet sending module 221 ' sends upstream data for usage flag frequency point with fixed ratePacket;Window setting module 222 ' is received, for setting first to receive window and spare reception window, receives window setting module222 connect with packet sending module 221 ';First window receives judgment module 223 ', for whether judging the first reception windowReceive downstream response message;Open a window time delay module 224 ', for first reception window do not receive downstream response message when,According to logic of propositions and receiving time requirement, postpone the spare opening time for receiving window;Window opening module 225 ', for rootDownstream response message, which is opened, according to the opening time receives window, window opening module 225 ' and windowing time delay module 224 ';Message connectsModule 226 ' is received, downstream response message is received for receiving usage flag frequency point in window in downstream response;Respond determination module227 ', for judging to receive in window whether receive downstream response message, corresponding determination module 227 ' in downstream response messageIt is connect with message receiving module 226 ';Downlink data acquisition module 228 ', for downstream response message receive window in whetherWhen receiving downstream response message, obtain downlink data, finishing service data report process, downlink data acquisition module 228 ' withMessage receiving module 226 ' connects.
To sum up, the realization method and system of a kind of wireless network relaying provided by the invention, has the advantages that:SolutionIt is inconsistent so that relay function can not realize and reply two that relay reception frequency point of having determined in traditional technology with terminal sends frequency pointA downstream packets generate the technical issues of service logic is abnormal.The present invention solves of the existing technology since relaying and terminal are sent outSend and receive the inconsistent caused relay function defect of frequency point and since the uncertainty that webmaster receives data causes in dataReport service exception the technical issues of, deployment and it is more convenient to use, relay function it is highly reliable.Receive terminal uplink data packetAnd receiving time is recorded, terminal uplink data packet is sent to gateway, according to the windowing time adjustment of the extended terminal of logic of propositionsThe sending time of gateway downlink data sends gateway downlink data to terminal in sending time.Relaying can easily be disposedEquipment, it is only necessary to open trunking, it is possible to realize the data penetration transmission of terminal, without specific configuration again, have veryHigh commercial value and practicability.