Summary of the invention
Embodiments of the invention provide a kind of data transmission method and data forwarding device, can reduce the power consumption of data forwarding device.
For achieving the above object, embodiments of the invention adopt following technical scheme:
First aspect, provides a kind of data transmission method, comprising:
Data forwarding device receives by data access module the data that at least one client computer sends, and the described data that receive by described data access module are sent to data cache module storage;
In the time judging that state data memory in described data cache module meets data and sends condition, by described data cache module, data are sent to instruction and be sent to data transmission blocks;
Sending instruction according to described data sends the described data of described data cache module storage by described data transmission blocks.
In the possible implementation of the first, according to first aspect, described data forwarding device receives by data access module the data that at least one client computer sends, and before the described data that receive by described data access module are sent to data cache module storage, comprising:
Judge in described data cache module and whether have described at least one client computer by the data of described data access module transmission;
If described data cache module is not stored described data, start the timer arranging in described data cache module.
In the possible implementation of the second, the implementation possible according to the first all do not stored data when described data cache module in default several described time out periods, stops the timer arranging in described data cache module.
In the third possible implementation, in conjunction with any the possible implementation in first aspect or the possible implementation of the first or the possible implementation of the second, described in the time judging that state data memory in described data cache module meets data and sends condition, by described data cache module, data are sent to instruction and are sent to data transmission blocks, comprising:
In the time that the timing of the set timer in described data cache module exceedes default time out period, by described data cache module, described data are sent to instruction and be sent to described data transmission blocks.
In the 4th kind of possible implementation, in conjunction with any the possible implementation in first aspect or the possible implementation of the first or the possible implementation of the second, described in the time judging that state data memory in described data cache module meets data and sends condition, by described data cache module, data are sent to instruction and are sent to data transmission blocks, comprising:
Whether storage area corresponding to each client computer in described at least one client computer of judgement is filled with data in a described time out period;
If the storage area of client computer is filled with data described in any one, by described data cache module, described data is sent to instruction and be sent to described data transmission blocks.
In the 5th kind of possible implementation, according to the 4th kind of possible implementation, if the storage area of all described client computer is not all filled with data, described method also comprises:
Calculate the mean value of the maximum data filling rate of the described data cache module in all described time out period after the timer of described data cache module starts;
When the timer of described data cache module does not reach described time out period, and the mean value of described maximum data filling rate is greater than preset upper limit threshold value, by described data cache module, described data sent to instruction and is sent to described data transmission blocks.
In the 6th kind of possible implementation, according to the 5th kind of possible implementation, when the timer of described data cache module reaches described time out period, and the mean value of described maximum data filling rate is less than predetermined lower threshold value, and described method also comprises:
By described data cache module, described data are sent to instruction and be sent to described data transmission blocks.
In the 7th kind of possible implementation, in conjunction with any the possible implementation in the 5th kind of possible implementation or the 6th kind of possible implementation, the mean value of the maximum data filling rate of the described data cache module in all described time out period of described calculating after the timer of described data cache module starts, comprising:
The timer that is recorded in described data cache module starts the data stuffing rate of the storage area of the each client computer in described at least one client computer in each described time out period afterwards;
The maximum data filling rate of the described data cache module that the maximum in the data stuffing rate of the storage area of the each client computer in the each described time out period described in choosing after the timer of described data cache module starts in described at least one client computer is each described time out period;
Calculate the mean value of the maximum data filling rate of the each described time out period of described data cache module after the timer of described data cache module starts.
In the 8th kind of possible implementation, according to first aspect, described data forwarding device receives by data access module the data that at least one client computer sends, and by described data access module, described data is sent to data cache module storage, comprising:
The data that described at least one client computer receiving by described data access module is sent deposit the region that prestores in described data cache module in;
Judge according to the sequencing of described data storage successively whether each client computer of described at least one client computer exists reference numeral mark in described data cache module;
If there is described number-mark in described data cache module, the data that exist the client computer of described number-mark to send are deposited in to the storage area of the client computer that described in described data cache module, number-mark is corresponding in described data cache module.
In the 9th kind of possible implementation, according to the 8th kind of possible implementation, if there is not described number-mark in described data cache module, described method also comprises:
To not having the client computer of described number-mark to generate new number-mark;
Judge whether described data cache module exists idle memory region;
If there is described idle memory region in described data cache module, in described idle memory region, apply for a storage area taking described new number-mark as mark, and the data that client computer corresponding described new number-mark is sent deposit described storage area in.
In the tenth kind of possible implementation, according to the 9th kind of possible implementation, if there is not described idle memory region in described data cache module, described method also comprises:
Judge and in described data cache module, whether have the storage area of not storing data;
If do not store the storage area of data described in existing, selecting not store described in all in the storage area of data free time the longest storage area preferentially discharges, and by described free time the longest storage area configure to client computer corresponding to described new number-mark, to store the data that client computer corresponding to described new number-mark sends.
In the 11 kind of possible implementation, according to the tenth kind of possible implementation, describedly in the time judging that state data memory in described data cache module meets data and sends condition, by described data cache module, data are sent to instruction and are sent to data transmission blocks, comprising:
If do not store the storage area of data described in not existing, by described data cache module, described data are sent to instruction and be sent to described data transmission blocks.
Second aspect, a kind of data forwarding device is provided, comprise data access module and data transmission blocks, it is characterized in that, described data forwarding device also comprises: data cache module and the data processing module being connected with described data cache module, and described data cache module is connected with described data access module and data transmission blocks; Wherein,
Described data access module, the data that send for receiving at least one client computer;
Described data cache module, the data that send for storing at least one client computer of described data access module reception;
Described data processing module, in the time judging that the state data memory of described data cache module meets data transmission condition, sends instruction by described data cache module by data and is sent to data transmission blocks;
Described data transmission blocks, sends the described data of described data cache module storage for sending instruction according to described data.
In the possible implementation of the first, according to second aspect, described data forwarding device also comprises:
Time block, for judging whether described data cache module has the data that described at least one client computer sends by described data access module; And if be no for judged result, start the timer arranging in described data cache module.
In the possible implementation of the second, the implementation possible according to the first, described time block, also, for all not storing data when judging in a default described time out period, stops the timer arranging in described data cache module.
In the third possible implementation, in conjunction with any the possible implementation in second aspect or the possible implementation of the first or the possible implementation of the second, described data processing module, specifically in the time that the timing arranging in timer exceedes default time out period, sends instruction by described data and is sent to described data transmission blocks.
In the 4th kind of possible implementation, in conjunction with any the possible implementation in second aspect or the possible implementation of the first or the possible implementation of the second, described data processing module comprises:
Whether described data determining unit, be filled with data for the storage area of each client computer of judging described at least one client computer in a described time out period;
Described instruction sending unit, if be that the storage area of client computer is filled with data described in any one for the judged result of described data determining unit, send instruction by described data and is sent to described data transmission blocks.
In the 5th kind of possible implementation, if be not all filled with data according to the storage area of the 4th kind of possible all described client computer of implementation, if the storage area that the judged result of described data determining unit is all described client computer is not all filled with data,
Described instruction sending unit also comprises:
Described data stuffing rate computation subunit, for calculating the mean value of maximum data filling rate of the described data cache module in all described time out period after the timer of described data cache module starts;
Described instruction sends subelement, does not reach described time out period for the timer when described data cache module, and the mean value of described maximum data filling rate is greater than preset upper limit threshold value, described data is sent to instruction and be sent to described data transmission blocks.
In the 6th kind of possible implementation, according to the 5th kind of possible implementation, when the timer in described data cache module reaches described time out period, and the mean value of described maximum data filling rate is less than predetermined lower threshold value,
Described instruction sends subelement, is also sent to described data transmission blocks for described data are sent to instruction.
In the 7th kind of possible implementation, in conjunction with any the possible implementation in the 5th kind of possible implementation or the 6th kind of possible implementation, described data stuffing rate computation subunit, specifically for being recorded in the data stuffing rate of the storage area of the each client computer in described at least one client computer in the each described time out period of the timer of described data cache module after starting; The maximum data filling rate of the described data cache module that is also each described time out period for the maximum in the data stuffing rate of the storage area of each client computer of at least one client computer described in choosing in the each described time out period of the described timer in described data cache module after starting; Also for calculating the mean value of maximum data filling rate of the each described time out period of described data cache module after the timer of described data cache module starts.
In the 8th kind of possible implementation, according to second aspect, described data cache module also comprises:
The first data storage cell, for depositing the data of described at least one client computer transmission receiving by described data access module in the region that prestores of described data cache module;
Whether mark judging unit, there is reference numeral mark for the each client computer that judges successively described at least one client computer according to the sequencing of described data storage in described data cache module;
The second data storage cell, if also judge that for described mark judging unit described data cache module exists described number-mark, the data that exist the client computer of described number-mark to send in described data cache module are deposited in to the storage area of the client computer that described in described data cache module, number-mark is corresponding.
In the 9th kind of possible implementation, according to the 8th kind of possible implementation, if judging, described mark judging unit in described data cache module, there is not described number-mark,
Described the second data storage cell also comprises:
Described mark generates subelement, for to not having the client computer of described number-mark to generate new number-mark;
Described storage area judgment sub-unit, for judging whether described data cache module exists idle memory region;
Described storage area application subelement, if judge that for described storage area judging unit described data cache module exists described idle memory region, in described idle memory region, apply for a storage area taking described new number-mark as mark, and the data that client computer corresponding described new number-mark is sent deposit described storage area in.
In the tenth kind of possible implementation, according to the 9th kind of possible implementation, described storage area application subelement, if also there is not described idle memory region for described data cache module, judges in described data cache module, whether there is the storage area of not storing data; And if for not storing the storage area of data described in existence, selecting not store described in all in the storage area of data free time the longest storage area preferentially discharges, and by described free time the longest storage area configure to client computer corresponding to described new number-mark, to store the data that client computer corresponding to described new number-mark sends.
In the 11 kind of possible implementation, according to the tenth kind of possible implementation, described data processing module, if also judge that for described storage area judgment sub-unit described data cache module do not store the storage area of data described in not existing, described data sent to instruction and be sent to described data transmission blocks.
The data transmission method that embodiments of the invention provide and data forwarding device, when the state data memory of the data that can store in data cache module meets data transmission condition, the data that data transmission blocks just sends according to data cache module send instruction the data of data cache module storage are sent, making data transmission blocks be waken up number of times reduces, increase the idle sleep time, and then reduced the power consumption of data forwarding device.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Embodiments of the invention are applied to the data forwarding device that adopts two connected patterns of module to realize transfer of data, and this data forwarding device can be wireless routing data terminal, wireless routing data terminal has mobility, conventionally adopt powered battery, and in the time that each packet passes through, all by two access module waking up at any time in these wireless routing data, therefore, these two access module are often in running order, and data forwarding device provided by the invention, further expand the application of data cache module, reduce the wake-up times of data access module to data transmission blocks, and then reduce the power consumption of data forwarding device, concrete implementation is as follows, as shown in Figure 1, a kind of data transmission method provided by the invention comprises the steps:
101, data forwarding device receives by data access module the data that at least one client computer sends, and the data that receive by data access module are sent to data cache module storage.
102, in the time judging that state data memory in data cache module meets data and sends condition, data forwarding device sends instruction by data cache module by data and is sent to data transmission blocks.
103, data forwarding device sends the data of data cache module storage according to data transmission instruction by data transmission blocks.
Furthermore, no matter be that data access module sends and be stored in data cache module by the data that receive, or data cache module sends data to data transmission blocks, the transmission of the data is here all to transmit according to first-in first-out (First Input First Output, FIFO) principle.
The data transmission method that embodiments of the invention provide, when the state data memory of the data that can store in data cache module meets data transmission condition, the data transmission instruction that data transmission blocks just sends according to the data cache module just data of data cache module storage sends, making data transmission blocks be waken up number of times reduces, increase the idle sleep time, and then reduced the power consumption of data forwarding device.
The present invention discloses a kind of data transmission method, as shown in Figure 2, the data transmission method of mentioning in the present embodiment be according to the data volume of storing in whole data cache module number and timing determine whether to send data send instruction, this data transmission method comprises the steps:
201, data forwarding device receives by data access module the data that at least one client computer sends, and the data that receive by data access module are sent to data cache module storage.
The data that 201a, data forwarding device send at least one client computer receiving by data access module deposit the region that prestores in data cache module in.
Wherein, the region that prestores in above-mentioned data cache module is the reserve part of data cache module, does not include the calculating of the memory space in data cache module in.
201b, data forwarding device judge according to the sequencing of data storage whether each client computer of at least one client computer exists reference numeral mark in data cache module successively.
If there is number-mark in data cache module, forward step 201c1 to, if there is not number-mark in data cache module, forward step 201c2 to.
201c1, data forwarding device deposits the data that exist the client computer of number-mark to send in data cache module in the storage area of the client computer that in data cache module, number-mark is corresponding.
Or,
Step 201c2 comprises the steps:
A1, data forwarding device be not to having the client computer of number-mark to generate new number-mark.
A2, data forwarding device judge whether data cache module exists idle memory region.
If judged result, for there is idle memory region, forwards step a3 to, if judged result is for there not being described idle memory region, forward step 201c3 to.
A3, data forwarding device are applied for a storage area taking new number-mark as mark in idle memory region, and the data that client computer corresponding new number-mark is sent deposit storage area in.
Step 201c3 comprises the steps:
B1, data forwarding device judge in data cache module, whether there is the storage area of not storing data.
If do not store the storage area of data in b2 data cache module, data forwarding device selects in all storage areas of not storing data free time the longest storage area preferentially to discharge, and the storage area the longest free time is configured to the client computer corresponding to new number-mark, to store the data of the client computer transmission that new number-mark is corresponding.
If there is not the storage area of not storing data in 202 data cache module, data forwarding device sends instruction by data cache module by data and is sent to data transmission blocks.
203, data forwarding device sends the data of data cache module storage according to data transmission instruction by data transmission blocks.
Furthermore, no matter be that data access module sends and be stored in data die change piece by the data that receive, or data cache module sends data to data transmission blocks, and the transmission of data is all transmitted according to first-in first-out FIFO principle.
In addition, when the data of transmitting when above-mentioned data transmission method comprise upstream data and/or downlink data, the data cache module between data access module and data transmission blocks in data forwarding device can be divided into upstream data cache module and/or downlink data cache module.
In the time that upstream data is initiated, data access module receives the upstream data that at least one client computer sends, and the upstream data receiving is stored in upstream data cache module.In the time that upstream data cache module is filled with upstream data and does not store the storage area of data, upstream data cache module sends data to data transmission blocks and sends instruction, and final data sending module sends instruction according to data the upstream data in data cache module is sent to remote client.
In the time that downlink data is initiated, the downlink data that at least one remote client that data transmission blocks receives sends, and the downlink data receiving is stored in downlink data cache module.In the time that downlink data cache module is filled with downlink data and does not store the storage area of data, downlink data cache module sends data to data transmission blocks and sends instruction, and final data sending module sends instruction according to data the downlink data in data memory module is sent to client computer.
Further, in the time there is upstream data and downlink data simultaneously, the size of the memory space of upstream data cache module and downlink data cache module can be distributed according to practical business demand, generally do not possess symmetry, because upstream data is generally the solicited message to practical business, and downlink data is generally the corresponding Download Info of the solicited message to practical business in upstream data, therefore, the space of downlink data cache module can be larger than the space of upstream data cache module, meets actual asymmetric data throughout requirement.
The data transmission method that embodiments of the invention provide, when the state data memory of the data that can store in data cache module meets data transmission condition, the data transmission instruction that data transmission blocks just sends according to the data cache module just data of data cache module storage sends, making data transmission blocks be waken up number of times reduces, increase the idle sleep time, and then reduced the power consumption of data forwarding device.
The present invention discloses a kind of data transmission method, as shown in Figure 3,4, the data transmission method of mentioning in the present embodiment is in default time out period, how much to determine whether to send data according to the data volume of storing in data cache module to send instruction, as shown in Figure 3, when this date storage method being described from microcosmic angle (being the number of the data volume of storing in each client computer data cache module), the method comprises the steps:
301a, data forwarding device judge in data cache module, whether there are the data that at least one client computer sends by data access module.
If 302a data cache module is not stored data, the timer arranging in data forwarding device log-on data cache module.
303a, data forwarding device receive by data access module the data that at least one client computer sends, and send data to data cache module storage by data access module.
304a, data forwarding device judge whether storage area corresponding to each client computer of at least one client computer is filled with data in a time out period.
Step 305a can have following several situation:
If the storage area of any one client computer of 305a1 is filled with data, data forwarding device sends instruction by data cache module by data and is sent to data transmission blocks.
Or,
If the storage area of 305a2 All Clients is not all filled with data, data forwarding device calculates the mean value of the maximum data filling rate of the data cache module in all time out periods after the timer of data cache module starts.
The concrete computational process of step 305a2 is as follows:
The data stuffing rate of the storage area of the each client computer in the each time out period after the timer that a1, data forwarding device are recorded in data cache module starts at least one client computer.
The maximum data filling rate of the data cache module that the maximum in the data stuffing rate of the storage area of the each client computer in the each time out period after the timer that a2, data forwarding device are chosen at data cache module starts at least one client computer is each time out period.
The mean value of the maximum data filling rate of a3, the each time out period of data forwarding device calculated data cache module after the timer of data cache module starts.
305a3, do not reach time out period when the timer of data cache module, and the mean value of maximum data filling rate is greater than preset upper limit threshold value, data forwarding device sends instruction by data cache module by data and is sent to data transmission blocks.
Or,
305a4, reach time out period when the timer of data cache module, and the mean value of maximum data filling rate is less than predetermined lower threshold value, data forwarding device sends instruction by data cache module by data and is sent to data transmission blocks.
Concrete, the data stuffing rate of the storage area that the each time out period of data forwarding device after the timer of data cache module starts records the each client computer at least one client computer in time out period, then pick out the maximum wherein maximum data filling rate as data cache module in each time out period, and this maximum data filling rate is stored in a virtual circulation vessel with memory function, and often just store maximum data filling rate one time through a time out period circulation vessel, and calculate the mean value of all maximum data filling rates of once storing in above-mentioned virtual circulation vessel.Until the mean value of this maximum data filling rate is greater than preset upper limit threshold value, and when the timer of data cache module does not reach time out period, or, the mean value of maximum data filling rate is less than predetermined lower threshold value, and when the timer of data cache module reaches time out period, stop the computational process of the mean value of maximum data filling rate.In addition,, in first time out period after the timer of data cache module starts, owing to only storing a maximum data filling rate in above-mentioned circulation vessel, therefore, mean value is now a default average threshold of circulation vessel.
Concrete, when the mean value of maximum data filling rate is greater than preset upper limit threshold value, illustrate that the data of transmitting in the process of this transfer of data are to have successionally, directly transmit all data; When the mean value of maximum data filling rate is less than predetermined lower threshold value, when the data of transmitting in the process of this transfer of data are described, exist intermittently, only have in the time that the timer of data cache module reaches time out period, all data could be transmitted.
306a, data forwarding device send instruction according to data the data of data cache module storage are sent by data transmission blocks.
As shown in Figure 4, when macroscopic perspective (time that judges data cache module storage data reaches default time out period) illustrates this date storage method, the method comprises the steps:
301b, data forwarding device judge in data cache module, whether there are the data that at least one client computer sends by data access module.
If 302b data cache module is not stored data, the timer arranging in data forwarding device log-on data cache module.
303b, in the time that the timing of the set timer in data cache module exceedes default time out period, data forwarding device sends instruction by data cache module by data and is sent to data transmission blocks.
304a, data forwarding device send instruction according to data the data of data cache module storage are sent by data transmission blocks.
Optionally, in a default time out period, all do not store data when data cache module, stop the timer arranging in data cache module.
Furthermore, no matter be that data access module sends and be stored in data die change piece by the data that receive, or data cache module sends data to data transmission blocks, and the transmission of data is all transmitted according to first-in first-out FIFO principle.And for fear of the possibility of the space failure of client computer request for data cache module, to select according to actual demand for the space size of data cache module.
When the data of transmitting when above-mentioned data transmission method comprise upstream data and/or downlink data, the data cache module between data access module and data transmission blocks in data forwarding device can be divided into upstream data cache module and/or downlink data cache module.
In the time that upstream data is initiated, data access module receives the upstream data that at least one client computer sends, and before the upstream data receiving is stored in upstream data cache module, first upstream data cache module starts timer, and then carries out the storage of upstream data.In the time that the time of upstream data cache module buffer memory upstream data reaches default time out period, the data of the storage area storage of client computer reach pre-determined amount or in the time that the time of upstream data cache module buffer memory upstream data reaches default time out period, upstream data cache module sends data to data transmission blocks and sends instruction, and final data sending module sends instruction according to data the upstream data in data cache module is sent to remote client.
In the time that downlink data is initiated, the downlink data that at least one remote client that data transmission blocks receives sends, and before the downlink data receiving is stored in downlink data cache module, first downlink data cache module starts timer, and then carries out the storage of downlink data.In the time that the time of downlink data cache module buffer memory downlink data reaches default time out period, the data of the storage area storage of client computer reach pre-determined amount or in the time that the time of upstream data cache module buffer memory upstream data reaches default time out period, downlink data cache module sends data to data transmission blocks and sends instruction, and final data sending module sends instruction according to data the downlink data in data cache module is sent to remote client.
Further, in the time there is upstream data and downlink data simultaneously, the size of the memory space of upstream data cache module and downlink data cache module can be distributed according to practical business demand, generally do not possess symmetry, because upstream data is generally the solicited message to practical business, and downlink data is generally the corresponding Download Info of the solicited message to practical business in upstream data, therefore, the space of downlink data cache module can be larger than the space of upstream data cache module, meets actual asymmetric data throughout requirement.
The data transmission method that embodiments of the invention provide, when the state data memory of the data that can store in data cache module meets data transmission condition, the data transmission instruction that data transmission blocks just sends according to the data cache module just data of data cache module storage sends, making data transmission blocks be waken up number of times reduces, increase the idle sleep time, and then reduced the power consumption of data forwarding device.
Embodiments of the invention provide a kind of data forwarding device, this data forwarding device can be a wireless routing data terminal, and the data access module in this data forwarding device can be WLAN (wireless local area network) (Wireless Local Area Networks, WLAN) access module, data transmission blocks in data forwarding device can be wireless wide area network (Wireless Wide Area Network, WWAN) access module, wherein, wireless wide area network access module can be used but be not limited to existing global system for mobile communications (Global Sys tem for Mobile Communications, GSM), Wideband Code Division Multiple Access (WCDMA) (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution project (Long Term Evolution, , the technology such as LTE), wireless local area network access module can be used but be not limited to existing wireless Internet access technology (Wireless Fidelity, Wi-Fi), the technology such as bluetooth (Blue tooth).And can be personal digital assistant (Personal Digital Assistant for sending the client computer of data, PDA), radio modem (modem), Wireless Telecom Equipment, handheld device (handheld), smart mobile phone (Smart phone), kneetop computer (Laptop Computer) or wireless local loop (Wireless Local Loop, WLL) platform etc.
Shown in Fig. 5, this data forwarding device is for realizing above-mentioned data transmission method for uplink, this data forwarding device 5 comprises: data access module 41, data transmission blocks 42, data cache module 43 and data processing module 44, wherein this data cache module 43 is connected with data access module 41 and data transmission blocks 42, this data processing module 44 is connected with data cache module 43, wherein, in actual wireless router terminal, above-mentioned data processing module 44 can be CPU (the Central Processing Unit in wireless router terminal, central processing unit), above-mentioned data cache module 42 can be the memory in wireless router terminal, for example read-only memory (Read-Only Memory, ROM), above-mentioned data access module 41 and data transmission blocks 42 can be in wireless router terminal any communication interface.
Concrete, shown in the concrete function of above-mentioned module is achieved as follows:
Data access module 41, the data that send for receiving at least one client computer.
Data cache module 43, the data that send for storing at least one client computer that data access module 41 receives.
Data processing module 44, in the time judging that the state data memory of data cache module 43 meets data transmission condition, sends instruction by data cache module 43 by data and is sent to data transmission blocks 42.
Data transmission blocks 42, sends for the data of data cache module 43 being stored according to data transmission instruction.
Further alternative, shown in Fig. 6,7,8, data forwarding device also comprises: time block 45, for judging whether data cache module 43 has the data that at least one client computer sends by data access module; And if be no for judged result, the timer arranging in log-on data cache module.
Further alternative, this time block 45, also for all not storing data, the timer that stops arranging in data cache module when judging in a default time out period.
Further alternative, shown in Fig. 6, this data processing module 44, specifically in the time that the timing arranging in timer exceedes default time out period, sends instruction by data and is sent to data transmission blocks 42.
Further alternative, as shown in Figure 7, data processing module 44 comprises: data judgment sub-unit 441 and instruction send subelement 442, wherein:
Whether data determining unit 441, be filled with data for the storage area of each client computer of judging at least one client computer in a time out period.
Instruction sending unit 442, if the storage area that is any one client computer for the judged result of data determining unit 441 is filled with data, sends instruction by data and is sent to data transmission blocks 42.
Further alternative, as shown in Figure 8, if the storage area that the judged result of data determining unit 441 is All Clients is not all filled with data,
Instruction sending unit 442 comprises: data stuffing rate computation subunit 442a, instruction send subelement 442b, wherein:
Data stuffing rate computation subunit 442a, for calculating the mean value of maximum data filling rate of the data cache module in all time out periods after the timer of data cache module 43 starts;
Instruction sends subelement 442b, does not reach time out period for the timer when data cache module 43, and the mean value of maximum data filling rate is greater than preset upper limit threshold value, data is sent to instruction and be sent to data transmission blocks 42.
Further alternative, when the timer in data cache module 43 reaches time out period, and the mean value of maximum data filling rate is less than predetermined lower threshold value,
Instruction sends subelement 442b, is also sent to data transmission blocks 42 for data being sent to instruction.
Further alternative, as shown in Figure 8, data stuffing rate computation subunit 442a, specifically for being recorded in the data stuffing rate of the storage area of the each client computer at least one client computer in each time out period of the timer of data cache module 43 after starting; The maximum data filling rate of the data cache module 43 that is also each time out period for the maximum being chosen in the data stuffing rate of storage area of each client computer of at least one client computer in each time out period of the timer of data cache module 43 after starting; The also mean value of the maximum data filling rate of the each time out period after the timer of data cache module 43 starts for calculated data cache module 43.
Optionally, as shown in Figure 9, data cache module 43 comprises: data storage cell 431 and mark judging unit 432, wherein:
The first data storage cell 431, for depositing the data of at least one client computer transmission receiving by data access module 41 in the region that prestores of data cache module 43.
Whether mark judging unit 432, there is reference numeral mark for the each client computer that judges successively at least one client computer according to the sequencing of data storage in data cache module 43.
The second data storage cell 433, if also judge that for mark judging unit 432 data cache module 43 exists number-mark, the data that exist the client computer of number-mark to send in data cache module 43 are deposited in to the storage area of the client computer that in data cache module 43, number-mark is corresponding.
Further alternative, if judging in data cache module 43, mark judging unit 432 there is not number-mark, the second data storage cell 433 comprises:
Mark generates subelement 433a, for to not having the client computer of number-mark to generate new number-mark.
Storage area judgment sub-unit 433b, for judging whether data cache module 43 exists idle memory region.
Storage area application subelement 433c, if judge that for storage area judging unit 433b data cache module 43 exists idle memory region, in idle memory region, apply for a storage area taking new number-mark as mark, and the data that client computer corresponding new number-mark is sent deposit storage area in.
Further alternative, storage area application subelement 433c, if also there is not idle memory region for data cache module 43, judges in data cache module 43, whether there is the storage area of not storing data; And if for not storing the storage area of data, select in all storage areas of not storing data free time the longest storage area preferentially to discharge, and the storage area the longest free time is configured to the client computer corresponding to new number-mark, to store the data of the client computer transmission that new number-mark is corresponding.
Further alternative, data processing module 44, if also judge that for storage area judgment sub-unit 433b data cache module 43 does not exist the storage area of not storing data, sends instruction by data and is sent to data transmission blocks 41.
The data forwarding device that embodiments of the invention provide, when the state data memory of the data that can store in data cache module meets data transmission condition, the data transmission instruction that data transmission blocks just sends according to the data cache module just data of data cache module storage sends, making data transmission blocks be waken up number of times reduces, increase the idle sleep time, and then reduced the power consumption of data forwarding device.
The structural representation of the data forwarding device that Figure 10 provides for another embodiment of the present invention, this data forwarding device is for realizing above-mentioned data transmission method for uplink, and this data forwarding device can be router or wireless routing data terminal, wherein, this data forwarding device 5 comprises processor 51, memory 52, communication interface 53 and bus 54.
Wherein, processor 51 can comprise data processing module 511, and memory 52 can comprise data cache module 521, and communication interface 53 can comprise: data access module 531 and data transmission blocks 532.
Wherein, the practical function that the module in above-mentioned processor 51, memory 52 and communication interface 53 is concrete is as follows.
Data access module 531, the data that send for receiving at least one client computer.
Data cache module 521, the data that send for storing at least one client computer that data access module 531 receives.
Data processing module 511, in the time judging that the state data memory of data cache module 521 meets data transmission condition, sends instruction by data cache module 521 by data and is sent to data transmission blocks 532.
Data transmission blocks 532, sends for the data of data cache module 521 being stored according to data transmission instruction.
Further alternative, memory also comprises: time block 522, for judging whether data cache module 521 has the data that at least one client computer sends by data access module; And if be no for judged result, in log-on data cache module 521 arrange timer.
Further alternative, this time block 522, also, for all not storing data when judging in a default time out period, stops the timer arranging in data cache module 521.
Further alternative, this data processing module 511, specifically in the time that the timing arranging in timer exceedes default time out period, sends instruction by data and is sent to data transmission blocks 532.
Further alternative, data processing module 511 comprises: data judgment sub-unit and instruction send subelement, wherein:
Whether data determining unit, be filled with data for the storage area of each client computer of judging at least one client computer in a time out period.
Instruction sending unit, if the storage area that is any one client computer for the judged result of data determining unit is filled with data, sends instruction by data and is sent to data transmission blocks 532.
Further alternative, if the storage area that the judged result of data determining unit is All Clients is not all filled with data,
Instruction sending unit comprises: data stuffing rate computation subunit, instruction send subelement, wherein:
Data stuffing rate computation subunit, for calculating the mean value of maximum data filling rate of the data cache module in all time out periods after the timer of data cache module starts.
Instruction sends subelement, and for not reaching time out period when the timer of data cache module 521, and the mean value of maximum data filling rate is greater than preset upper limit threshold value, data sent to instruction and be sent to data transmission blocks 532.
Further alternative, when the timer in data cache module 521 reaches time out period, and the mean value of maximum data filling rate is less than predetermined lower threshold value,
Instruction sends subelement, is also sent to data transmission blocks 532 for data being sent to instruction.
Further alternative, data stuffing rate computation subunit, specifically for being recorded in the data stuffing rate of the storage area of the each client computer at least one client computer in each time out period of the timer of data cache module 521 after starting; The maximum data filling rate of the data cache module 521 that is also each time out period for the maximum being chosen in the data stuffing rate of storage area of each client computer of at least one client computer in each time out period of the timer of data cache module after starting; The also mean value of the maximum data filling rate of the each time out period after the timer of data cache module 521 starts for calculated data cache module 521.
Optionally, data cache module 521 comprises: data storage cell and mark judging unit, wherein:
The first data storage cell, for depositing the data of at least one client computer transmission receiving by data access module 531 in the region that prestores of data cache module 521.
Whether mark judging unit, there is reference numeral mark for the each client computer that judges successively at least one client computer according to the sequencing of data storage in data cache module 521.
The second data storage cell, if also judge that for mark judging unit data cache module 521 exists number-mark, the data that exist the client computer of number-mark to send in data cache module 521 are deposited in to the storage area of the client computer that in data cache module 521, number-mark is corresponding.
Further alternative, if judging in data cache module 521, mark judging unit there is not number-mark, the second data storage cell comprises:
Mark generates subelement, for to not having the client computer of number-mark to generate new number-mark.
Storage area judgment sub-unit, for judging whether data cache module 521 exists idle memory region.
Storage area application subelement, if judge that for storage area judging unit data cache module 43 exists idle memory region, in idle memory region, apply for a storage area taking new number-mark as mark, and the data that client computer corresponding new number-mark is sent deposit storage area in.
Further alternative, storage area application subelement, if also there is not idle memory region for data cache module 521, judges in data cache module 521, whether there is the storage area of not storing data; And if for not storing the storage area of data, select in all storage areas of not storing data free time the longest storage area preferentially to discharge, and the storage area the longest free time is configured to the client computer corresponding to new number-mark, to store the data of the client computer transmission that new number-mark is corresponding.
Further alternative, data processing module 511, if also judge that for storage area judgment sub-unit data cache module 521 does not exist the storage area of not storing data, sends instruction by data and is sent to described data transmission blocks.
The data forwarding device that embodiments of the invention provide, when the state data memory of the data that can store in data cache module meets data transmission condition, the data transmission instruction that data transmission blocks just sends according to the data cache module just data of data cache module storage sends, making data transmission blocks be waken up number of times reduces, increase the idle sleep time, and then reduced the power consumption of data forwarding device.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can complete by the relevant hardware of program command, aforesaid program can be stored in a computer read/write memory medium, this program, in the time carrying out, is carried out the step that comprises said method embodiment; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CDs.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, any be familiar with those skilled in the art the present invention disclose technical scope in; can expect easily changing or replacing, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.