Summary of the invention
The purpose of the present invention is to provide a kind of processing method and processing devices of resource gravity treatment, solve the prior art for length
The system that period and short cycle are mixed, since the weighing apparatus that is unevenly distributed of long period business causes short cycle business to continue repeatedly to send out
The problem of sending unsuccessfully.
In order to achieve the above object, the embodiment of the present invention provides a kind of processing method of resource gravity treatment, comprising:
The resource selection window of first network node is divided into multiple resource selection child windows;
Obtain the transmission resource that the first network node selects in the resource selection window;
According to the transmission resource and the optional resource ratio of at least one resource selection child window, described first is determined
Whether network node carries out resource gravity treatment.
Wherein, the described the step of resource selection window of first network node is divided into multiple resource selection child windows,
Include:
According to the cycle length for the service period less than L that system allows, by the resource selection window of first network node
It is divided into multiple resource selection child windows;Wherein, L is positive integer;The length of the resource selection child window allows equal to system
The service period less than L cycle length.
Wherein, described according to the optional resource ratio for sending resource and at least one resource selection child window, really
The step of whether fixed first network node carries out resource gravity treatment, comprising:
If first network node receives in the m-th resource selection child window in the multiple resource selection child window
The business information that at least one second network node is sent with the service period less than L that system allows, obtains from m-th resource
The optional resource ratio for the continuous one or more resource selection child windows for selecting child window to rise;Wherein, M is positive integer;
Continuous one or more resource selection according to the transmission resource and from m-th resource selection child window
The optional resource ratio of window, determines whether the first network node carries out resource gravity treatment.
Wherein, described according to the transmission resource and the continuous one or more from m-th resource selection child window
The optional resource ratio of resource selection child window, determines the step of whether the first network node carries out resource gravity treatment, comprising:
According to the optional resource ratio and the transmission resource, judge whether first network node meets first resource
Reselection conditions;Wherein, first resource reselection conditions are as follows: continuous N number of sub- window of resource selection from m-th resource selection child window
The optional resource ratio of mouth is respectively less than preset ratio value, and the transmission resource is located at from m-th resource selection child window
In continuous N number of resource selection child window;N is positive integer, and N permits less than or equal to the length of resource selection window divided by system
Perhaps the minimal service period;
If the first network node meets first resource reselection conditions, according to from m-th resource selection child window
The optional resource ratio of continuous N number of resource selection child window, obtains the resource gravity treatment probability of first network node;If described first
Network node is unsatisfactory for the first resource reselection conditions, determines the first network node without resource gravity treatment;
If the resource gravity treatment probability of the first network node meets Secondary resource reselection conditions, the first network is determined
Node carries out resource gravity treatment;If the resource gravity treatment probability of the first network node is unsatisfactory for the Secondary resource reselection conditions,
Determine the first network node without resource gravity treatment;Wherein, the Secondary resource reselection conditions are as follows: resource gravity treatment probability is small
In a random probability value.
Wherein, described according to the optional resource ratio and the transmission resource, judge whether first network node is full
The step of sufficient first resource reselection conditions, comprising:
If the optional resource ratio in m-th resource selection child window is less than preset ratio value, setting gravity treatment counter
Value is 1;Otherwise, the value that gravity treatment counter is arranged is 0;
Successively by the optional resource ratio of the subsequent continuous resource selection child window of m-th resource selection child window and institute
State the comparison of preset ratio value;If optional resource ratio is less than the preset ratio value, the value for controlling the gravity treatment counter adds
1;Otherwise the value for controlling the gravity treatment counter sets 0;Then stop comparing until the value of the gravity treatment counter is equal to N;Or it is straight
Optional resource ratio to the last one resource selection child window in resource selection window has been compared with the preset ratio value
At then stopping comparing;
If the value of the gravity treatment counter is equal to N, continuous N number of resource choosing from m-th resource selection child window is determined
The optional resource ratio for selecting child window is respectively less than preset ratio value;Otherwise, it determines being not present from m-th resource selection child window
The optional resource ratio of continuous N number of resource selection child window is respectively less than the preset ratio value;
If the optional resource ratio of continuous N number of resource selection child window from m-th resource selection child window is respectively less than
Preset ratio value, judges whether the transmission resource is located at continuous N number of resource selection from m-th resource selection child window
In window;
If described send in continuous N number of resource selection child window that resource is located at from m-th resource selection child window, really
The fixed first network node meets first resource reselection conditions.
Wherein, the step of resource gravity treatment probability for obtaining first network node, comprising:
According to the optional resource ratio of continuous N number of resource selection child window from m-th resource selection child window and
The preset ratio value determines the resource gravity treatment probability of the first network node.
Wherein, the optional resource of continuous N number of resource selection child window of the basis from m-th resource selection child window
Ratio and the preset ratio value, the step of determining the resource gravity treatment probability of the first network node, comprising:
According to resource gravity treatment new probability formulaDetermine that the resource gravity treatment of the first network node is general
Rate;
Wherein, P is the resource gravity treatment probability of first network node;RiFor the optional resource of i-th of resource selection child window
Ratio;RpresetFor preset ratio value.
Wherein, after the determination first network node carries out resource gravity treatment, the method also includes:
Continuous N number of money from m-th resource selection child window is excluded in the resource selection window of first network node
After source selects child window, resource gravity treatment is carried out in remaining resource selection child window in resource selection window, is described the
One network node reselects transmission resource.
The embodiment of the present invention also provides a kind of processing unit of resource gravity treatment, comprising:
Window division module, for the resource selection window of first network node to be divided into the sub- window of multiple resource selections
Mouthful;
Position acquisition module, the transmission money selected in the resource selection window for obtaining the first network node
Source;
Gravity treatment determining module, for the optional resource according to the transmission resource and at least one resource selection child window
Ratio, determines whether the first network node carries out resource gravity treatment.
Wherein, the window division module includes:
Window divides submodule, the cycle length of the service period less than L for allowing according to system, by first network
The resource selection window of node is divided into multiple resource selection child windows;Wherein, L is positive integer;The resource selection child window
Length be equal to system allow the service period less than L cycle length.
Wherein, the gravity treatment determining module includes:
Ratio acquisition submodule, if the m-th money for first network node in the multiple resource selection child window
The business that at least one second network node is sent with the service period less than L that system allows is received in source selection child window
Information obtains the optional resource ratio of continuous one or more resource selection child windows from m-th resource selection child window;
Wherein, M is positive integer;
Gravity treatment determines submodule, for according to the transmission resource and continuous from m-th resource selection child window
The optional resource ratio of one or more resource selection child windows, determines whether the first network node carries out resource gravity treatment.
Wherein, the gravity treatment determines that submodule includes:
Judging unit, for judging that first network node is according to the optional resource ratio and the transmission resource
It is no to meet first resource reselection conditions;Wherein, first resource reselection conditions are as follows: the continuous N from m-th resource selection child window
The optional resource ratio of a resource selection child window is respectively less than preset ratio value, and the transmission resource is located at from m-th resource
In the continuous N number of resource selection child window for selecting child window to rise;N is positive integer, and N is less than or equal to resource selection window
The minimal service period that length allows divided by system;
Probability acquiring unit provides if meeting first resource reselection conditions for the first network node according to from m-th
The optional resource ratio for continuous N number of resource selection child window that source selects child window to rise obtains the resource weight of first network node
Select probability;If the first network node is unsatisfactory for the first resource reselection conditions, determine the first network node not into
Row resource gravity treatment;
Gravity treatment determination unit, if the resource gravity treatment probability for the first network node meets Secondary resource gravity treatment item
Part determines that the first network node carries out resource gravity treatment;If the resource gravity treatment probability of the first network node is unsatisfactory for institute
Secondary resource reselection conditions are stated, determine the first network node without resource gravity treatment;Wherein, the Secondary resource gravity treatment item
Part are as follows: resource gravity treatment probability is less than a random probability value.
Wherein, the judging unit includes:
First subelement, if being less than preset ratio value for the optional resource ratio in m-th resource selection child window, if
The value for setting gravity treatment counter is 1;Otherwise, the value that gravity treatment counter is arranged is 0;
Second subelement, for successively by the subsequent continuous resource selection child window of m-th resource selection child window
Optional resource ratio is compared with the preset ratio value;If optional resource ratio be less than the preset ratio value, control described in
The value of gravity treatment counter adds 1;Otherwise the value for controlling the gravity treatment counter sets 0;Until the value of the gravity treatment counter is equal to N then
Stop comparing;Or until the last one resource selection child window in resource selection window optional resource ratio with it is described pre-
It is completed if ratio value compares, then stops comparing;
Third subelement is determined from m-th resource selection child window if the value for the gravity treatment counter is equal to N
The optional resource ratio of continuous N number of resource selection child window be respectively less than preset ratio value;Otherwise, it determines being selected from m-th resource
Selecting child window, there is no the optional resource ratios of continuous N number of resource selection child window to be respectively less than the preset ratio value;
4th subelement, if for the optional of continuous N number of resource selection child window from m-th resource selection child window
Resource ratio is respectively less than preset ratio value, judges whether the transmission resource is located at the company from m-th resource selection child window
Continue in N number of resource selection child window;
5th subelement, if being located at continuous N number of resource from m-th resource selection child window for the transmission resource
It selects to determine that the first network node meets first resource reselection conditions in child window.
Wherein, the probability acquiring unit includes:
Probability obtains subelement, for according to continuous N number of resource selection child window from m-th resource selection child window
Optional resource ratio and the preset ratio value, determine the resource gravity treatment probability of the first network node.
Wherein, the probability acquisition subelement includes:
Probability determination module, for according to resource gravity treatment new probability formulaDetermine the first network section
The resource gravity treatment probability of point;
Wherein, P is the resource gravity treatment probability of first network node;RiFor the optional resource of i-th of resource selection child window
Ratio;RpresetFor preset ratio value.
Wherein, described device further include:
Resource gravity treatment module, for being excluded in the resource selection window of first network node from m-th resource selection
After continuous N number of resource selection child window that window rises, carried out in remaining resource selection child window in resource selection window
Resource gravity treatment reselects transmission resource for the first network node.
Above-mentioned technical proposal of the invention at least has the following beneficial effects:
The processing method and processing device of the resource gravity treatment of the embodiment of the present invention, the transmission resource selected according to first network node
And the optional resource ratio at least one resource selection child window around the transmission resource is to determine whether carry out resource
Gravity treatment, and transmission resource is reselected for first network node by resource gravity treatment, so that resource selection occupation proportion is balanced,
Interference effect is reduced, the reliability of short cycle business is improved, to improve the reliability of system.
Specific embodiment
To keep the technical problem to be solved in the present invention, technical solution and advantage clearer, below in conjunction with attached drawing and tool
Body embodiment is described in detail.
First embodiment
As shown in Figure 1, the first embodiment of the present invention provides a kind of processing method of resource gravity treatment, comprising:
Step 11, the resource selection window of first network node is divided into multiple resource selection child windows;
Step 12, the transmission resource that the first network node selects in the resource selection window is obtained;
Step 13, it according to the transmission resource and the optional resource ratio of at least one resource selection child window, determines
Whether the first network node carries out resource gravity treatment.
Wherein, optional resource ratio: the money of unappropriated total number resource and all resources in the duration window of setting
The ratio of source sum.Specifically, the control information SA that other nodes that first network node listens in audit window are sent,
And the reservation that other nodes are obtained from the SA being successfully decoded occupies resource and can determine setting to carry out resource exclusion
Unappropriated resource in duration window.
In the above embodiment of the present invention, the service period that system allows includes long period and short cycle, and long period is big
In or equal to 100ms service period, such as 100ms, 200ms etc..Short cycle is the service period less than 100ms, such as
20ms etc..Specifically, at least one resource selection child window in above-mentioned steps 13 is the first money where above-mentioned transmission resource
Source selects other resource selection child windows around child window and first resource selection child window.
Specifically, step 11 includes: in the above embodiment of the present invention
Step 111, the cycle length of the service period less than L allowed according to system, by the resource of first network node
Selection window is divided into multiple resource selection child windows;Wherein, L is positive integer;The length of the resource selection child window is equal to
The cycle length for the service period less than L that system allows.
Wherein, L is equal to 100ms;Business of the service period that system allows less than L is known as short cycle business.Such as Fig. 2 institute
Show, the resource selection window of first network node is divided into multiple resource selection child windows, which can also
Referred to as resource gravity treatment window.Specifically, the length of resource selection child window is equal to short-period cycle length.
It should be noted that in the above embodiment of the present invention according to short-period cycle length to resource selection window into
It is only a preferred embodiment of the invention that row, which divides, is not used in the protection scope of limitation the application;According to other principles or other
The method that measurement unit divides resource selection window also belongs to the protection scope of the application.
Further, step 13 includes: in the above embodiment of the present invention
Step 131, if m-th resource selection child window of the first network node in the multiple resource selection child window
Inside receive the business information that at least one second network node is sent with the service period less than L that system allows, obtain from
The optional resource ratio for continuous one or more resource selection child windows that m-th resource selection child window rises;Wherein, M is positive
Integer;
Step 132, continuous one or more moneys according to the transmission resource and from m-th resource selection child window
Source selects the optional resource ratio of child window, determines whether the first network node carries out resource gravity treatment.
In the above embodiment of the present invention, m-th resource selection child window receives for first in resource selection window
The resource selection child window of short cycle business.Specifically, the service period of the second network node is the service period less than L, i.e.,
Second network node supports short cycle business.Preferably, M is positive integer, and such as 1,2,3 etc., it is not specifically limited herein.
It should be noted that first resource need to be met when judging whether to resource gravity treatment in the above embodiment of the present invention
Reselection conditions and Secondary resource reselection conditions.
Specifically, step 132 includes:
Step 1321, according to the optional resource ratio and the transmission resource, judge whether first network node is full
Sufficient first resource reselection conditions;Wherein, first resource reselection conditions are as follows: continuous N number of money from m-th resource selection child window
The optional resource ratio of source selection child window is respectively less than preset ratio value, and the transmission resource is located at from m-th resource selection
In continuous N number of resource selection child window that child window rises;N is positive integer, and N is less than or equal to the length of resource selection window
The minimal service period allowed divided by system.N is properly termed as resource reselecting parameters, and N can be pre-configured by system, can also be by being
System configuration in real time, is not specifically limited herein.N can according to the length of short-period cycle length and resource selection window come
It determines.Specifically, be rounded after the minimal service period that the length that N is less than or equal to resource selection window allows divided by system
Integer, but N also needs to be more than or equal to 1.And preset ratio value generally may be configured as 20% or other values.
It should be noted that including above-mentioned m-th resource selection child window in above-mentioned continuous N number of resource selection child window.
Step 1322, if the first network node meets first resource reselection conditions, according to sub from m-th resource selection
The optional resource ratio for continuous N number of resource selection child window that window rises obtains the resource gravity treatment probability of first network node;If
The first network node is unsatisfactory for the first resource reselection conditions, determines the first network node without resource weight
Choosing.
Specifically, if first network section cannot be directly determined after first network node meets first resource reselection conditions
Point needs to carry out resource gravity treatment;If but first network node is unsatisfactory for first resource reselection conditions, can directly determine
One network node does not need to carry out resource gravity treatment.
Further, if first network node meets first resource reselection conditions, the resource of first network node is obtained
Gravity treatment probability;And further judge whether the resource gravity treatment probability of first network node meets Secondary resource reselection conditions.
Step 1323, if the resource gravity treatment probability of the first network node meets Secondary resource reselection conditions, institute is determined
It states first network node and carries out resource gravity treatment;If the resource gravity treatment probability of the first network node is unsatisfactory for the Secondary resource
Reselection conditions determine the first network node without resource gravity treatment;Wherein, the Secondary resource reselection conditions are as follows: resource
Gravity treatment probability is less than a random probability value.
Specifically, the random probability value is thrown at random, it is a dynamic value.If the resource gravity treatment of first network node is general
Rate is less than random probability value, it is determined that the resource gravity treatment probability of first network node meets Secondary resource reselection conditions, further
Determine that the first network node needs to carry out resource gravity treatment;If the resource gravity treatment probability of first network node is more than or equal to
Random probability value, it is determined that the resource gravity treatment probability of first network node is unsatisfactory for Secondary resource reselection conditions, further determines that
The first network node does not need to carry out resource gravity treatment.
Further, step 1321 includes: in the above embodiment of the present invention
Step 13211, if the optional resource ratio in m-th resource selection child window is less than preset ratio value, setting weight
The value for selecting counter is 1;Otherwise, the value that gravity treatment counter is arranged is 0;
Step 13212, successively by the optional money of the subsequent continuous resource selection child window of m-th resource selection child window
Source ratio is compared with the preset ratio value;If optional resource ratio is less than the preset ratio value, the gravity treatment meter is controlled
The value of number device adds 1;Otherwise the value for controlling the gravity treatment counter sets 0;Then stop ratio until the value of the gravity treatment counter is equal to N
It is right;Or optional resource ratio and the preset ratio until the last one resource selection child window in resource selection window
Value, which compares, to be completed, then stops comparing;
Step 13213, if the value of the gravity treatment counter is equal to N, determination is continuous from m-th resource selection child window
The optional resource ratio of N number of resource selection child window is respectively less than preset ratio value;Otherwise, it determines from the sub- window of m-th resource selection
There is no the optional resource ratios of continuous N number of resource selection child window to be respectively less than the preset ratio value for mouth.
For example, N is equal to 3;If the optional resource ratio in m-th resource selection child window is less than preset ratio value, setting
The value of gravity treatment counter is 1;If the optional resource ratio in the M+1 resource selection child window is less than preset ratio value, gravity treatment
The value of counter adds 1, i.e. the value of gravity treatment counter is 2;If the optional resource ratio in the M+2 resource selection child window is less than
Preset ratio value, the value of gravity treatment counter add 1 again, i.e. the value of gravity treatment counter is 3;The value of the value of gravity treatment counter and N at this time
It is identical, it is not necessarily to be further continued for comparing the size of optional the resource ratio and preset ratio value of the M+3 resource child window at this time, terminate
Process.
For another example N is equal to 3;It altogether include 5 resource selection child windows in resource selection window;M is equal to 2.If the 2nd
Optional resource ratio in resource selection child window is less than preset ratio value, and the value of setting gravity treatment counter is 1;If 3 resources
The optional resource ratio in child window is selected to be more than or equal to preset ratio value, gravity treatment counter sets 0;If 4 resource selections
Optional resource ratio in child window is less than preset ratio value, and the value of gravity treatment counter adds 1, i.e. the value of gravity treatment counter is 1;If
Optional resource ratio in 5th resource selection child window is more than or equal to preset ratio value, and gravity treatment counter sets 0;At this time
The comparison of the last one resource selection child window has been completed, and process is terminated.
Step 13214, if the optional resource of continuous N number of resource selection child window from m-th resource selection child window
Ratio is respectively less than preset ratio value, and it is continuous N number of from m-th resource selection child window to judge whether the transmission resource is located at
In resource selection child window.Judge to send any one resource selection whether resource is located in N number of resource selection child window
In child window.
Step 13215, if the continuous N number of resource selection for sending resource and being located at from m-th resource selection child window
In child window, determine that the first network node meets first resource reselection conditions.
Specifically, step 1322 includes: in the above embodiment of the present invention
Step 13221, according to the optional money of continuous N number of resource selection child window from m-th resource selection child window
Source ratio and the preset ratio value determine the resource gravity treatment probability of the first network node.
Specifically, step 13221 includes:
According to resource gravity treatment new probability formulaDetermine the resource gravity treatment probability of the first network node;
Wherein, P is the resource gravity treatment probability of first network node;RiFor the optional resource of i-th of resource selection child window
Ratio;RpresetFor preset ratio value.
Further, in the above embodiment of the present invention, the determination first network node carry out resource gravity treatment it
Afterwards, the method also includes:
Step 14, the company from m-th resource selection child window is excluded in the resource selection window of first network node
After continuing N number of resource selection child window, resource gravity treatment is carried out in remaining resource selection child window in resource selection window, is
The first network node reselects transmission resource.
When first network node carries out resource gravity treatment, it need to exclude first continuous N number of from m-th resource selection child window
Resource selection child window;And then resource exclusion is carried out according to resource method for removing in the prior art, to be provided again
Source gravity treatment;So that resource selection occupancy is more balanced.
For the processing method of clearer description resource gravity treatment provided by the present application, below with reference to two specific examples pair
The processing method is described in detail:
First case
Assuming that it is 100ms that first network node, which sends service period, first network node is in the 2nd resource selection child window
On receive the business information of the second network node transmission, the service period of the second network node is 20ms.System configuration due to
Resource reselecting parameters N caused by short cycle is equal to 2.
As shown in figure 3, when receiving short cycle business in the 2nd resource selection child window of resource selection window, when
The optional resource ratio of preceding resource selection child window (i.e. the 2nd resource selection child window) is 15% (it is less than 20%), weight
The value of counter is selected to be set as 1.
In subsequent continuous 3rd resource selection child window, the optional resource ratio of the 3rd resource selection child window is
10% (it is again smaller than 20%), then the value of gravity treatment counter adds 1 to be 2.
Because the value of gravity treatment counter is 2 identical as resource reselecting parameters N, and the transmission resource of this section point selection is assumed
In the 3rd resource selection child window, then the transmission resource of this node need to carry out the judgement of re-selection process again.
The resource gravity treatment probability P of first network node is calculated first:
Then throwing random probability value is 0.7, then 0.7 is greater than resource gravity treatment probability P, then this node is in the 3rd resource selection
Transmission resource in child window needs gravity treatment, and when gravity treatment, which needs to be limited in, excludes the 2nd resource selection in resource selection window
The resource of window and the 3rd resource selection child window;It is less than resource gravity treatment probability P if throwing random probability value for 0.6,0.6,
Then without resource gravity treatment.
Second case
Assuming that it is 100ms that first network node, which sends service period, second is received in the 2nd resource selection child window
The business information that network node is sent, the service period of the second network node are 20ms.System configuration is as caused by short cycle
Resource reselecting parameters N is equal to 2.
As shown in figure 4, when receiving short cycle business in the 2nd resource selection child window of resource selection window, when
The optional resource ratio of preceding resource selection child window (i.e. the 2nd resource selection child window) is 15% (it is less than 20%), weight
The value of counter is selected to be set as 1.
In subsequent continuous 3rd resource selection child window, the optional resource ratio of the 3rd resource selection child window is
30% (it is greater than 20%), the value of gravity treatment counter is set to 0.
Assuming that in subsequent continuous 4th resource selection child window, the optional resource ratio of the 4th resource selection child window
Example is 10% (it is less than 20%), and the value of gravity treatment counter is set as 1.And in the 5th resource selection child window, the 5th resource
Select the optional resource ratio of child window for 22% (it is greater than 20%), the value of gravity treatment counter is set to 0.
Since in the resource selection window of first network node, the value of the gravity treatment counter in each resource selection child window
It is all not up to the value of resource reselecting parameters N, therefore this node is without resource gravity treatment.
To sum up, in the processing method for the resource gravity treatment that the first embodiment of the present invention provides, according to business short cycle and
Load condition in the resource selection child window of short cycle duration adjusts the transmission resource of sending node, carries out probability resource
Gravity treatment improves the reliability of short cycle business, ensure that so that the Workload Balance in system, reduces interference effect
The equiblibrium mass distribution of business in system, improves the reliability of system.
Second embodiment
As shown in figure 5, the second embodiment of the present invention provides a kind of processing unit of resource gravity treatment, comprising:
Window division module 51, for the resource selection window of first network node to be divided into the sub- window of multiple resource selections
Mouthful;
Position acquisition module 52, the transmission selected in the resource selection window for obtaining the first network node
Resource;
Gravity treatment determining module 53, for the optional money according to the transmission resource and at least one resource selection child window
Source ratio, determines whether the first network node carries out resource gravity treatment.
Specifically, window division module described in the second embodiment of the present invention includes:
Window divides submodule, the cycle length of the service period less than L for allowing according to system, by first network
The resource selection window of node is divided into multiple resource selection child windows;Wherein, L is positive integer;The resource selection child window
Length be equal to system allow the service period less than L cycle length.
Specifically, gravity treatment determining module described in the second embodiment of the present invention includes:
Ratio acquisition submodule, if the m-th money for first network node in the multiple resource selection child window
The business that at least one second network node is sent with the service period less than L that system allows is received in source selection child window
Information obtains the optional resource ratio of continuous one or more resource selection child windows from m-th resource selection child window;
Wherein, M is positive integer;
Gravity treatment determines submodule, for according to the transmission resource and continuous from m-th resource selection child window
The optional resource ratio of one or more resource selection child windows, determines whether the first network node carries out resource gravity treatment.
Specifically, gravity treatment described in the second embodiment of the present invention determines that submodule includes:
Judging unit, for judging that first network node is according to the optional resource ratio and the transmission resource
It is no to meet first resource reselection conditions;Wherein, first resource reselection conditions are as follows: the continuous N from m-th resource selection child window
The optional resource ratio of a resource selection child window is respectively less than preset ratio value, and the transmission resource is located at from m-th resource
In the continuous N number of resource selection child window for selecting child window to rise;N is positive integer, and N is less than or equal to resource selection window
The minimal service period that length allows divided by system;
Probability acquiring unit provides if meeting first resource reselection conditions for the first network node according to from m-th
The optional resource ratio for continuous N number of resource selection child window that source selects child window to rise obtains the resource weight of first network node
Select probability;If the first network node is unsatisfactory for the first resource reselection conditions, determine the first network node not into
Row resource gravity treatment;
Gravity treatment determination unit, if the resource gravity treatment probability for the first network node meets Secondary resource gravity treatment item
Part determines that the first network node carries out resource gravity treatment;If the resource gravity treatment probability of the first network node is unsatisfactory for institute
Secondary resource reselection conditions are stated, determine the first network node without resource gravity treatment;Wherein, the Secondary resource gravity treatment item
Part are as follows: resource gravity treatment probability is less than a random probability value.
Specifically, judging unit described in the second embodiment of the present invention includes:
First subelement, if being less than preset ratio value for the optional resource ratio in m-th resource selection child window, if
The value for setting gravity treatment counter is 1;Otherwise, the value that gravity treatment counter is arranged is 0;
Second subelement, for successively by the subsequent continuous resource selection child window of m-th resource selection child window
Optional resource ratio is compared with the preset ratio value;If optional resource ratio be less than the preset ratio value, control described in
The value of gravity treatment counter adds 1;Otherwise the value for controlling the gravity treatment counter sets 0;Until the value of the gravity treatment counter is equal to N then
Stop comparing;Or until the last one resource selection child window in resource selection window optional resource ratio with it is described pre-
It is completed if ratio value compares, then stops comparing;
Third subelement is determined from m-th resource selection child window if the value for the gravity treatment counter is equal to N
The optional resource ratio of continuous N number of resource selection child window be respectively less than preset ratio value;Otherwise, it determines being selected from m-th resource
Selecting child window, there is no the optional resource ratios of continuous N number of resource selection child window to be respectively less than the preset ratio value;
4th subelement, if for the optional of continuous N number of resource selection child window from m-th resource selection child window
Resource ratio is respectively less than preset ratio value, judges whether the transmission resource is located at the company from m-th resource selection child window
Continue in N number of resource selection child window;
5th subelement, if being located at continuous N number of resource from m-th resource selection child window for the transmission resource
It selects to determine that the first network node meets first resource reselection conditions in child window.
Specifically, probability acquiring unit described in the second embodiment of the present invention includes:
Probability obtains subelement, for according to continuous N number of resource selection child window from m-th resource selection child window
Optional resource ratio and the preset ratio value, determine the resource gravity treatment probability of the first network node.
Specifically, the acquisition subelement of probability described in the second embodiment of the present invention includes:
Probability determination module, for according to resource gravity treatment new probability formulaDetermine the first network section
The resource gravity treatment probability of point;
Wherein, P is the resource gravity treatment probability of first network node;RiFor the optional resource of i-th of resource selection child window
Ratio;RpresetFor preset ratio value.
Specifically, device described in the second embodiment of the present invention further include:
Resource gravity treatment module, for being excluded in the resource selection window of first network node from m-th resource selection
After continuous N number of resource selection child window that window rises, carried out in remaining resource selection child window in resource selection window
Resource gravity treatment reselects transmission resource for the first network node.
To sum up, in the processing unit for the resource gravity treatment that the second embodiment of the present invention provides, according to business short cycle and
Load condition in the resource selection child window of short cycle duration adjusts the transmission resource of sending node, carries out probability resource
Gravity treatment improves the reliability of short cycle business, ensure that so that the Workload Balance in system, reduces interference effect
The equiblibrium mass distribution of business in system, improves the reliability of system.
It should be noted that the second embodiment of the present invention provide resource gravity treatment processing unit be able to carry out it is above-mentioned
The processing unit of the processing method of resource gravity treatment, then all embodiments of the processing method of above-mentioned resource gravity treatment are suitable for the money
The processing unit of source gravity treatment, and can reach the same or similar beneficial effect.
3rd embodiment
As shown in fig. 6, the third embodiment of the present invention also provides a kind of processing unit of resource gravity treatment, it is applied to the first net
Network node, the processing unit of the resource gravity treatment include: processor 100;It is connected by bus interface with the processor 100
Memory 120, and the transceiver 110 being connected by bus interface with processor 100;The memory is described for storing
Processor used program and data when executing operation;Control command etc. is sent by the transceiver 110;Work as processor
When calling and executing the program and data that are stored in the memory, following functional module is realized:
Window division module, for the resource selection window of first network node to be divided into the sub- window of multiple resource selections
Mouthful;
Position acquisition module, the transmission money selected in the resource selection window for obtaining the first network node
Source;
Gravity treatment determining module, for the optional resource according to the transmission resource and at least one resource selection child window
Ratio, determines whether the first network node carries out resource gravity treatment.
Wherein, in Fig. 6, bus architecture may include the bus and bridge of any number of interconnection, specifically by processor 100
The various circuits for the memory that the one or more processors and memory 120 of representative represent link together.Bus architecture is also
Various other circuits of such as peripheral equipment, voltage-stablizer and management circuit or the like can be linked together, these are all
It is it is known in the art, therefore, it will not be further described herein.Bus interface provides interface.Transceiver 110 can
To be multiple element, that is, includes transmitter and transceiver, the list for communicating over a transmission medium with various other devices is provided
Member.Processor 100, which is responsible for management bus architecture and common processing, memory 120, can store processor 100 and is executing operation
When used data.
Processor 100, which is responsible for management bus architecture and common processing, memory 120, can store processor 100 and is holding
Used data when row operation.
It should be noted that the processing unit for the resource gravity treatment that the third embodiment of the present invention provides is and above-mentioned resource weight
The corresponding processing unit of the processing method of choosing, then all embodiments of the processing method of above-mentioned resource gravity treatment are suitable for the resource
The processing unit of gravity treatment, and can reach the same or similar beneficial effect.
The above is a preferred embodiment of the present invention, it is noted that for those skilled in the art
For, without departing from the principles of the present invention, several improvements and modifications can also be made, these improvements and modifications
It should be regarded as protection scope of the present invention.