The content of the invention
Technical problem to be solved of the embodiment of the present invention is to provide a kind of side of data processing gateway service information reportingMethod, the number to reduce the timer required in processing data processing gateway business information.
Accordingly, the embodiment of the present invention additionally provides a kind of device of data processing gateway service information reporting, to protectDemonstrate,prove the realization and application of the above method.
In order to solve the above problems, the embodiment of the invention discloses a kind of side of data processing gateway service information reportingMethod, the data processing gateway includes chained list and strategy, charging control PCC data structure and timer, the PCC data knotStructure includes PCC rules, and the chained list includes list item and corresponding chain table pointer, and the list item includes counter, and the chained list refers toPin points to corresponding PCC rules, and the PCC rules include structured fingers, and the structured fingers point to corresponding list item, the sideMethod includes:
First recording step:When timer reaches preset threshold value, the first local zone time timecount1 is recorded;
First judgment step:Whether the list item for judging chained list is non-NULL;If so, then performing increase step;Increase step:PinAdd one to the counter;
Second judgment step:Judge whether the counter reaches counter threshold one by one;Step is reported if so, then performingSuddenly, if it is not, then performing the 3rd judgment step;Report step:The chain table pointer of the list item where the counter is reported, it is correspondingPCC rule corresponding to business information;
3rd judgment step:Judge whether to reach the afterbody of the chained list;If reaching the afterbody of the chained list, is performedTwo recording steps;If being not reaching to the afterbody of the chained list, the first judgment step is returned;
Second recording step:Record the second local zone time timecount2;
Amendment step:The timer is changed according to timecount1 and timecount2;
Starting step:Start the timer, and return to first recording step.
Preferably, methods described also includes:
If effective list item is not present in the chained list, the timer is restarted.
Preferably, it is described report step after, in addition to:
By the counter O reset, and return to the first recording step.
Preferably, methods described also includes:
When being provided with new PCC rules in the PCC data structures, new list item is added after the afterbody of the chained listAnd corresponding chain table pointer, the new list item include new counter;The new counter initial preset is 0;
The new chain table pointer is pointed into the new PCC rules;
For the new structured fingers of PCC rule additions;
The new structured fingers are pointed into the new list item.
Preferably, methods described also includes:
When the PCC rules in the PCC data structures are deactivated, PCC rules are found in the chained listStructured fingers corresponding to list item;
Delete the list item and corresponding chain table pointer.
Preferably, the amendment step includes:
Judge whether the timecount1 and timecount2 difference is more than preset result;
If so, then being calculated using preset formula, and the timer is changed according to the result of calculation;
Wherein, the preset formula is:Timer=1000- (timecount2-timecount2) %10*10;
The timer is the predicted value of current timer;
If it is not, then changing the timer using preset calculated value.
Preferably, the business information includes service traffics, business use time, and/or business disappears and reported, described pre-The predicted value put is 1000*n, and the n is more than 0;The new counter initial preset is 0.
The embodiment of the invention also discloses a kind of device of data processing gateway service information reporting, the data processing netThe Central Shanxi Plain includes chained list and strategy, charging control PCC data structure and timer, and the PCC data structures include PCC rules, instituteStating chained list includes list item and corresponding chain table pointer, and the list item includes counter, and the chain table pointer points to corresponding PCC ruleThen, the PCC rules include structured fingers, and the structured fingers point to corresponding list item, and described device includes:
First logging modle, for when timer reaches preset threshold value, recording the first local zone time timecount1;
First judge module, for judging whether the list item of chained list is non-NULL;If there is effective list item in the chained list,Then call increase module;
Increase module, for adding one for the counter;
Second judge module, for judging whether the counter reaches counter threshold one by one;Reported if so, then performingModule, if it is not, then performing the 3rd judge module;
Reporting module, the chain table pointer for reporting the list item where the counter, corresponding PCC rules are correspondingBusiness information;
3rd judge module, the afterbody for judging whether to reach the chained list;If reaching the afterbody of the chained list, holdThe logging modle of row second;If being not reaching to the afterbody of the chained list, the first judgment step is returned;
Second logging modle, for recording the second local zone time timecount2;
Modified module, for changing the timer according to timecount1 and timecount2;
Starting module, for starting the timer, and returns to first logging modle.
Preferably, described device also includes:
Module is restarted, for effective list item to be not present in the chained list, then the timer is restarted.
Preferably, described device also includes:
Dump block, for by the counter O reset, and calls the first logging modle.
Preferably, described device also includes:
Chain table pointer add module, for when being provided with new PCC rules in the PCC data structures, in the chainNew list item and corresponding chain table pointer are added after the afterbody of table, the new list item includes new counter;The new meterNumber device initial preset is 0;
Chain table pointer points to module, for the new chain table pointer to be pointed into the new PCC rules;
Structured fingers add module, for adding new structured fingers for PCC rules;
Structured fingers point to module, for the new structured fingers to be pointed into the new list item.
Preferably, described device also includes:
Searching modul, when being deactivated for the PCC rules in the PCC data structures, is searched in the chained listTo the list item corresponding to the structured fingers of PCC rules;
Removing module, for deleting the list item and corresponding chain table pointer.
Preferably, the modified module includes:
Difference judging submodule, for judging it is preset whether the timecount1 and timecount2 difference are more thanAs a result;If so, calculating sub module is then called, if it is not, then calling modification submodule;
Calculating sub module, for being calculated using preset formula, and changes the timing according to the result of calculationDevice;
Wherein, the preset formula is:Timer=1000- (timecount2-timecount2) %10*10;
The timer is the predicted value of current timer;
Submodule is changed, for changing the timer using preset calculated value.
Compared with prior art, the embodiment of the present invention includes advantages below:
In the embodiment of the present invention using chained list and timer, include list item and corresponding chain table pointer in chained list, it is describedList item includes counter, and the chain table pointer points to corresponding PCC rules, and the PCC rules include structured fingers, the structurePointer points to corresponding list item, now completes chained list and the two-way binding of PCC rules.Can quickly it be navigated to using structured fingersThe list item of association, can carry out quickly navigating to the PCC rules of association using chain table pointer.When the timer has lapsed, start pairList item in chained list is scanned one by one, and when reaching preset threshold value for list item Counter, starts to report the chain of the list itemThe corresponding business information of list index.With need for each PCC rule set timer background technology for, the present invention implementExample only needs to setting a timer for chained list, thus a large amount of numbers for reducing required counter.
In embodiments of the present invention, when there are new PCC rules to need installation, chained list can be found by chain table pointerAfterbody, then adds a new list item and corresponding chain table pointer, in the table entry including counter, chained list in the afterbody of chained listPointer points to PCC rules, and the pointer of PCC rules is pointed into the list item, completes two-way binding.Also need to simultaneously by PCC numbersThe counter of list item is assigned to according to the threshold value in structure.When there is PCC rules to be deactivated, according to the chained list in PCC data structuresPointer can quickly find the list item of association, then delete the list item in chained list, can quickly be determined using pointerPosition, treatment effeciency is high.
Embodiment
In order to facilitate the understanding of the purposes, features and advantages of the present invention, it is below in conjunction with the accompanying drawings and specific realApplying mode, the present invention is further detailed explanation.
The step of reference picture 2, embodiment of the method for showing a kind of data processing gateway service information reporting of the invention, flowsChained list and strategy, charging control PCC data structure and timer, the PCC can be included in Cheng Tu, the data processing gatewayData structure can include PCC rules, and the chained list can include list item and corresponding chain table pointer, and the list item can includeCounter, the chain table pointer can point to corresponding PCC rules, and the PCC rules can include structured fingers, the structurePointer can point to corresponding list item;
A kind of data structure of PCC rules of the invention shown in reference picture 3 running situation simplified diagram in internal memory,By taking EPC data processing gateway as an example, the structure that can be combined using the embodiment of the present invention by chained list and timer comes realThe problem of existing data processing gateway service information reporting.It can be included in each list item of chained list in the structure shown here:One meterNumber device, for recording the number of times that list item is scanned;One chain table pointer, points to the PCC data structures of EPC data processing gatewayPCC rule.In actual applications, flow and the disappearance of identification business is reported to be all based on the PCC rules in terminal.In PCC numbersThe function of a reported event is included according to structure;In addition, the structure is also comprising a timer (timer), whenever timer is arrivedDuring the phase, just whole chained list is scanned.
Needing the data structure in PCC rules in embodiments of the present invention increases a structured fingers, points to and PCC rulesThe associated chained list of structure in list item, thus complete two-way binding..The effect of the structured fingers is quick positioning and its phaseThe list item of association, facilitates the data structure of PCC rules to need synchronously to remove the list item being associated when deleting.Certainly, in this hairIn bright embodiment can also other modes complete the two-way binding of the PCC rules of chained list and PCC data structures, the present invention implementedExample is not any limitation as to this.
In the specific implementation, chained list is storage organization discontinuous, non-sequential on a kind of physical memory cell, in chained listThe logical order of list item is realized by the pointer link orders in chained list.Chained list is made up of a series of nodes (list item), tableItem can be dynamically generated at runtime.Each list item generally includes two parts:A part is the data field of storing data-elements,Another part is the pointer field for storing next node address.
Methods described specifically may include steps of:
First recording step 101:When timer reaches preset threshold value, the first local zone time timecount1 is recorded;
In embodiments of the present invention, timer can be pre-set in data processing gateway or other network equipmentsTime threshold, when the timer set in data processing gateway or other network equipments reaches the threshold value of setting, is recordedLocal zone time this moment, the local zone time can be recorded as timecount1.Wherein, local zone time can be entered using MillisecondRow record, or other ranks are recorded.
First judgment step 102:Whether the list item for judging chained list is non-NULL;If so, then performing increase step 103;
In the specific implementation, need to check that chained list whether there is list item, it is confirmation chained list to judge whether the method for list itemThe non-NULL in addition to head node.If list item is not present in chained list, timer can be now restarted, and return to the first record stepRapid 101.
Increase step 103:Add one for the counter;
Second judgment step 104:Judge whether the counter reaches counter threshold one by one;Reported if so, then performingStep, if it is not, then performing the 3rd judgment step;
In embodiments of the present invention, counter threshold refer to the PCC data structures with millisecond (ms) be unit timerValue, such as PCC data are appointed as reporting primary information in every 1 second, then counter threshold could be arranged to 1000, because chained list is determinedWhen device be about 1 millisecond, that is to say, that every millisecond will run-down chained list, when Counter Value be more than or equal to 1000, then recognizeHave do not report information within 1 second for the PCC data, this time should reporting service information.
Report step 105:The chain table pointer of the list item where the counter is reported, corresponding PCC rules are correspondingBusiness information;
In embodiments of the present invention, if calculator reaches predetermined threshold value, the function of a reported event can be called,The corresponding business information of PCC rules is reported.
In one preferred embodiment of the invention, it is described report step 105 after, methods described can also be included such asLower step:
By the counter O reset.
In the specific implementation, because business information was reported, then counter O reset can return to the first noteStep 101 is recorded, restarts the flow of " waiting --- then --- to report ".
3rd judgment step 106:Judge whether to reach the afterbody of the chained list;If reaching the afterbody of the chained list, holdThe second recording step of row 107;If being not reaching to the afterbody of the chained list, the first judgment step 102 is returned;
Second recording step 107:Record the second local zone time timecount2;
If in the specific implementation, there is effective list item in chained list, for corresponding to effective list item whole in chained listCalculator add one, then judge whether the counter in chained list is reached in data processing gateway or other network equipments one by oneIn pre-set the threshold value of counter.
In a kind of preferred exemplary of concrete application of the present invention, if more than or equal to the threshold value, then will can be somebody's turn to doThe corresponding business information of PCC rules is reported.Wherein, the business information can include service traffics, business use time,Other business information such as business disappearance report.If less than the threshold value, then it is assumed that the associated PCC rules of the list item need notReporting service message, it is possible to judge whether to have reached the afterbody of chained list, i.e., whether had stepped through list items whole in chained list.
When having traveled through list items whole in chained list, local zone time this moment is recorded, the local zone time can be recorded astimecount2。
Amendment step 108:The timer is changed according to timecount1 and timecount2;
In one preferred embodiment of the invention, the amendment step 108 can include following sub-step:
Sub-step S11, judges whether the timecount1 and timecount2 difference is more than preset result;IfIt is then to perform sub-step S12, if it is not, then performing sub-step S13;
Sub-step S12, is calculated using preset formula, and changes the timer according to the result of calculation;
Wherein, the preset formula is:Timer=1000- (timecount2-timecount2) %10*10;
The timer is the predicted value of current timer;
Sub-step S13, the timer is changed using preset calculated value.
In embodiments of the present invention, using preset formula or predicted value (wherein, it is contemplated that value=1000*n, the n is bigIn 0, and n can be specified by system, 1000 indicate can allowable error be 1 second) be adjusted for timer value timer.The purpose of amendment step is verification timer value.
It should be noted that in embodiments of the present invention can also be using other modes come for timer value timerIt is adjusted, the embodiment of the present invention is not restricted to this.
Starting step 109:Start the timer, and return to first recording step 101.
It after the numerical value adjustment for timer is finished, can restart, and return to the first recording step 101,Chained list is scanned again when the timer has lapsed.
In one preferred embodiment of the invention, methods described can also comprise the following steps:
If effective list item is not present in the chained list, the timer is restarted.
If in the specific implementation, effective list item is not present in chained list, timer can be restarted, exited currentBusiness processing flow, if
In one preferred embodiment of the invention, methods described can also comprise the following steps:
The new chain table pointer is pointed into the new PCC rules;
For the new structured fingers of PCC rule additions;
The new structured fingers are pointed into the new list item.
In the specific implementation, when being provided with new PCC rules in the PCC data structures, adding after the afterbody of chained listPlus new list item and corresponding chain table pointer, new list item includes new counter;The new counter is initialized as 0.
, can be with when there is new PCC rules to need installation as a kind of preferred exemplary of concrete application of the embodiment of the present inventionChained list afterbody is found by chain table pointer, then a new list item and corresponding chain table pointer is added in the afterbody of chained list,Include counter in the table entry, the Counter Value is initialized as 0, chain table pointer points to PCC rules, and by the finger of PCC rulesPin points to the list item, completes two-way binding.Also need to the threshold value in PCC data structures being assigned to the counting of new list item simultaneouslyDevice.
In one preferred embodiment of the invention, methods described can also comprise the following steps:
When the PCC rules in the PCC data structures are deactivated, PCC rules are found in the chained listStructured fingers corresponding to list item;
Delete the list item and corresponding chain table pointer.
It is used as another preferred exemplary of concrete application of the embodiment of the present invention, when there are PCC rules to be deactivated, Ke YigenThe list item of association is found according to the chain table pointer in PCC data structures, then the list item is deleted in chained list.
In order that it is further understood that the embodiment of the present invention, below using a specific example forThe handling process that bright business of the present invention is reported.
, specifically can be with to the process chart of chain table algorithm when a kind of timer of the invention shown in reference picture 4 expiresIncluding following sub-step:
1st, when timer expires in data processing gateway or other network equipments, into chain table algorithm.
2nd, record local zone time timecount1.The local zone time can be carried out using Millisecond or other ranksRecord.
3rd, check that chained list whether there is effective list item, if it has not, then restarting timer, turn the 10th step.Otherwise the 4th is turnedStep.
4th, increase 1 to the counter in chained list list item, and the value is compared with default counter threshold.
5th, judge whether the value of counter reaches counter threshold.If it is not, then thinking the associated PCC rule of the list itemService message then need not temporarily be reported, and turn the 3rd step;If Counter Value reaches counter threshold, turn the 6th step.
6th, the structure of the PCC rules associated with the list item is found using the chain table pointer of list item, with PCC regular texturesFunction carries out information reporting.Such as report flow, time, or reporting service disappearance report etc..
7th, the Counter Value is re-set as 0.
8th, next list item in chained list is searched.
Whether the 9th, judge the list item is chained list afterbody.If it is, showing that chained list is disposed, the 10th step is transferred to, otherwiseRepeat the operation of the 3rd step to the 9th step.
10th, record Millisecond local zone time timecount2.
11st, using timecount1 and timecount2 for being timed device numerical value timer adjustment.The purpose of the stepIt is verification timer value.Adjustment algorithm is:
Timer=1000- (timecount2-timecount2) %10*10;
12nd, timer is restarted.
13rd, the algorithm to chain list processing is exited.
Using the embodiment of the present invention, when the timer has lapsed, start to be scanned the list item in chained list one by one, and in tableWhen item Counter reaches preset threshold value, the corresponding business information of chain table pointer of the list item is reported.The embodiment of the present invention is with needingWill for each PCC rule set timer background technology for, it is only necessary to a timer is set, institute is largely reducedThe number of the counter needed.
In embodiments of the present invention, chain table pointer points to corresponding PCC rules, and the structured fingers of the PCC rules are pointed toCorresponding list item, chained list forms two-way binding with PCC rules.The list item of association can be quickly navigated to using structured fingers, is adoptedThe PCC rules of association can be carried out quickly navigating to chain table pointer, treatment effeciency is effectively increased.
It should be noted that for embodiment of the method, in order to be briefly described, therefore it to be all expressed as to a series of action groupClose, but those skilled in the art should know, the application is not limited by described sequence of movement, because according to this ShenPlease, some steps can be carried out sequentially or simultaneously using other.Secondly, those skilled in the art should also know, specificationDescribed in embodiment belong to necessary to preferred embodiment, involved action not necessarily the application.
Reference picture 5, shows a kind of structural frames of the device embodiment of data processing gateway service information reporting of the inventionChained list and strategy, charging control PCC data structure and timer, the PCC numbers can be included in figure, the data processing gatewayPCC rules can be included according to structure, the chained list can include list item and corresponding chain table pointer, and the list item can include meterNumber device, the chain table pointer can point to corresponding PCC rules, and the PCC rules can include structured fingers, and the structure refers toPin can point to corresponding list item, and described device can include following module:
First logging modle 201, for when timer reaches preset threshold value, recording the first local zone timetimecount1;
First judge module 202, for judging that chained list whether there is effective list item;If there is effective table in the chained list, then call increase module 203;
Increase module 203, for adding one for the counter;
Second judge module 204, for judging whether the counter reaches counter threshold one by one;If so, then performingReporting module 205, if it is not, then performing the 3rd judge module 206;
Reporting module 205, the chain table pointer for reporting the list item where the counter, the regular institutes of corresponding PCCCorresponding business information;
3rd judge module 206, the afterbody for judging whether to reach the chained list;If reaching the afterbody of the chained list,Then perform the second logging modle 207;If being not reaching to the afterbody of the chained list, the first judgment step 202 is returned;
Second logging modle 207, for recording the second local zone time timecount2;
Modified module 208, for changing the timer according to timecount1 and timecount2;
In one preferred embodiment of the invention, the modified module 208 can include following submodule:
Difference judging submodule, for judging it is preset whether the timecount1 and timecount2 difference are more thanAs a result;If so, calculating sub module is then called, if it is not, then calling modification submodule;
Calculating sub module, for being calculated using preset formula, and changes the timing according to the result of calculationDevice;
Wherein, the preset formula is:Timer=1000- (timecount2-timecount2) %10*10;
For the predicted value of current timer;
Submodule is changed, for changing the timer using preset calculated value.
Starting module 209, for starting the timer, and returns to first logging modle.
In one preferred embodiment of the invention, described device can also include following module:
Module is restarted, for effective list item to be not present in the chained list, then the timer is restarted.
In one preferred embodiment of the invention, described device can also include following module:
Dump block, for by the counter O reset, and calls the first logging modle.
In one preferred embodiment of the invention, described device can also include following module:
Chain table pointer add module, for when being provided with new PCC rules in the PCC data structures, in the chainNew list item and corresponding chain table pointer are added after the afterbody of table, the new list item includes new counter;The new meterNumber device initial preset is 0;
Chain table pointer points to module, for the new chain table pointer to be pointed into the new PCC rules;
Structured fingers add module, for adding new structured fingers for PCC rules;
Structured fingers point to module, for the new structured fingers to be pointed into the new list item.
In one preferred embodiment of the invention, described device can also include following module:
Searching modul, when being deactivated for the PCC rules in the PCC data structures, is searched in the chained listTo the list item corresponding to the structured fingers of PCC rules;
Removing module, for deleting the list item and corresponding chain table pointer.
In one preferred embodiment of the invention, the business information can include service traffics, business use time,And/or business disappears and reported, the preset predicted value can (wherein, n be specified by system, and 1000 indicate and can permit for 1000*nPerhaps error is 1 second);The new counter initial preset can be 0.
For device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, it is relatedPart illustrates referring to the part of embodiment of the method.
Each embodiment in this specification is described by the way of progressive, what each embodiment was stressed be withBetween the difference of other embodiment, each embodiment identical similar part mutually referring to.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, device or computer programProduct.Therefore, the application can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardwareApply the form of example.Moreover, the application can be used in one or more computers for wherein including computer usable program codeThe computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)The form of product.
The application is the flow with reference to method, equipment (system) and computer program product according to the embodiment of the present applicationFigure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagramJourney and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be providedThe processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produceA raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for realThe device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spyDetermine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring toMake the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram orThe function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meterSeries of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer orThe instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram oneThe step of function of being specified in individual square frame or multiple square frames.
Although having been described for the preferred embodiment of the application, those skilled in the art once know basic creationProperty concept, then can make other change and modification to these embodiments.So, appended claims are intended to be construed to include excellentSelect embodiment and fall into having altered and changing for the application scope.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to byOne entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operationBetween there is any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant meaningCovering including for nonexcludability, so that process, method, article or equipment including a series of key elements not only include thatA little key elements, but also other key elements including being not expressly set out, or also include be this process, method, article orThe intrinsic key element of equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", is not arrangedExcept also there is other identical element in the process including the key element, method, article or equipment.
Method to a kind of data processing gateway service information reporting provided by the present invention and a kind of data processing aboveThe device of gateway service information reporting, is described in detail, principle and reality of the specific case used herein to the present inventionThe mode of applying is set forth, and the explanation of above example is only intended to the method and its core concept for helping to understand the present invention;TogetherWhen, for those of ordinary skill in the art, according to the thought of the present invention, have in specific embodiments and applicationsChange part, in summary, this specification content should not be construed as limiting the invention.