CN108701030A - A kind of processor-based data processing method and device - Google Patents
A kind of processor-based data processing method and device Download PDFInfo
- Publication number
- CN108701030A CN108701030A CN201780011703.6A CN201780011703A CN108701030A CN 108701030 A CN108701030 A CN 108701030A CN 201780011703 A CN201780011703 A CN 201780011703A CN 108701030 A CN108701030 A CN 108701030A
- Authority
- CN
- China
- Prior art keywords
- function
- period
- periodic function
- periodic
- function set
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 10
- 230000006870 function Effects 0.000 claims abstract description 946
- 230000000737 periodic effect Effects 0.000 claims abstract description 411
- 230000001360 synchronised effect Effects 0.000 claims abstract description 21
- 238000000034 method Methods 0.000 claims abstract description 13
- 238000012545 processing Methods 0.000 claims description 27
- 230000003247 decreasing effect Effects 0.000 claims description 25
- 238000013507 mapping Methods 0.000 claims description 25
- 230000007423 decrease Effects 0.000 claims description 16
- 238000010586 diagram Methods 0.000 description 9
- 238000009826 distribution Methods 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 5
- 238000003860 storage Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 3
- 241000208340 Araliaceae Species 0.000 description 2
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 2
- 235000003140 Panax quinquefolius Nutrition 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 235000008434 ginseng Nutrition 0.000 description 2
- 210000004556 brain Anatomy 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Power Sources (AREA)
Abstract
A kind of processor-based data processing method and device, the method includes:Multiple periodic function set are set, and the corresponding execution period is respectively set for each periodic function set, and at least one periodic function is set in each periodic function set;The current operation duration for obtaining processor, and the current operation duration is compared with each execution period, and the periodic function set that comparison result is met to preset time conditions is determined as target period function set;The corresponding lumped parameter of each target period function set is updated, and obtains periodic function mark identical with updated lumped parameter in each target period function set, as target period function identification;The synchronous multiple power functions for executing the corresponding periodic function of each target period function identification and being included.Using the above method, the utilization rate to processor can be improved, to reduce the power consumption of processor.
Description
Technical field
The present invention relates to field of communication technology more particularly to a kind of processor-based data processing method and device.
Background technology
With the fast development of development of Mobile Internet technology, embedded real-time operating system (RTOS) is network-centric
It is applied widely in emerging computing devices and embedded market, especially in Digital Signal Processing (DSP) and wireless application
Embedded assembler code can be used to help corresponding operating system of single-chip microcomputer to realize the intelligence of product in field etc..
In traditional embedded software executive mode, each power function according to editor order carry out sequence execution,
When the corresponding power function of processor is more and more complicated, the execution time of each power function just needs more to grow, into
And sequential is caused to be unable to get corresponding guarantee.
In addition, in practical applications, each power function is most of to be executed by some cycles, if according to the circulating cycle
Phase is executed, it is possible to can be called each power function in the cycle period one time, i.e., can be increased in serial operation
The power consumption of big processor, and then waste the limited memory source of processor.
Invention content
Technical problem to be solved of the embodiment of the present invention is, provide a kind of processor-based data processing method and
Device can reduce the power consumption of processor, to avoid the wasting of resources of processor, and improve the utilization rate to processor.
In order to solve the above-mentioned technical problem, first aspect of the embodiment of the present invention provides at a kind of processor-based data
Reason method, including:
Multiple periodic function set are set, and the corresponding execution period is respectively set for each periodic function set, and each
At least one periodic function is set in periodic function set;Each periodic function corresponds to a cycle function identification;It is each to execute the period
It is different;
The current operation duration of processor is obtained, and the current operation duration is compared with each execution period, and
The periodic function set that comparison result is met to preset time conditions is determined as target period function set;
The corresponding lumped parameter of each target period function set is updated, and in each target period function
Periodic function mark identical with updated lumped parameter is obtained in set, as target period function identification;
The synchronous multiple power functions for executing the corresponding periodic function of each target period function identification and being included.
Multiple periodic function set are set, and the corresponding execution period is respectively set for each periodic function set, and each
At least one periodic function is set in periodic function set;Each periodic function corresponds to a cycle function identification;It is each to execute the period
It is different;
The current operation duration of processor is obtained, and the current operation duration is compared with each execution period, and
The periodic function set that comparison result is met to preset time conditions is determined as target period function set;
The corresponding lumped parameter of each target period function set is updated, and in each target period function
Periodic function mark identical with updated lumped parameter is obtained in set, as target period function identification;
The synchronous multiple power functions for executing the corresponding periodic function of each target period function identification and being included.
Wherein, the multiple periodic function set of the setting, and be respectively set for each periodic function set and corresponding execute week
Phase, and at least one periodic function is set in each periodic function set, including:
Multiple periodic function set are set, and the corresponding execution period is respectively set for each periodic function set;
Each power function corresponding preset cycle of operation is obtained, and each function is determined according to each cycle of operation
The running priority grade of function in the processor, and establish each running priority grade and each mapping table executed between the period;
According to the corresponding running priority grade of each power function, each work(is determined in the mapping table
It can the function corresponding execution period;
Have being added to the identical power function for executing the period in the corresponding periodic function set for executing the period, and
At least one periodic function is set in each periodic function set, and the power function in each periodic function set is distributed to institute
In each periodic function belonged to.
Wherein, the current operation duration for obtaining processor, and will the current operation duration and each execution period into
Row compares, and the periodic function set that comparison result is met to preset time conditions is determined as target period function set, wraps
It includes:
The current operation duration of processor is obtained, and reads the execution period of each periodic function set;
The current operation duration is compared with each execution period, and is generated corresponding respectively with each execution period
Comparison result;
It is determined as the comparison result that the current operation duration is the integral multiple for executing the period to meet preset timeline
The target comparison result of part;
The execution period corresponding periodic function set that the target comparison result is included is determined as target period letter
Manifold is closed.
Optionally, the current operation duration is compared with each execution period described, and generate with it is described current
After the corresponding comparison result of operation duration, further include:
When detecting that the current operation duration is not up to each integral multiple for executing the period, each comparison result is determined
Preset time conditions are unsatisfactory for, and discharge the memory source corresponding to each periodic function set.
Wherein, described that the corresponding lumped parameter of each target period function set is updated, and in each mesh
It marks and obtains periodic function mark identical with updated lumped parameter in periodic function set, as target period function mark
Know, including:
It obtains in the corresponding lumped parameter of each target period function set and each target period function set
Each periodic function corresponding periodic function mark;
Get parms update mode;
If the parameter update mode is parameter incremental manner, according to the parameter incremental manner to each target week
The corresponding lumped parameter of phase function set is incremented by, and in each target period function set obtain be incremented by after
Lumped parameter identical periodic function mark, as target period function identification;
If the parameter update mode is parameter decreasing fashion, according to the parameter decreasing fashion to each target week
The corresponding lumped parameter of phase function set successively decreases, and after obtaining and successively decrease in each target period function set
Lumped parameter identical periodic function mark, as target period function identification.
Second aspect of the embodiment of the present invention provides a kind of processor-based data processing equipment, including:
Correspondence is respectively set for multiple periodic function set to be arranged, and for each periodic function set in data setup module
The execution period, and at least one periodic function is set in each periodic function set;Each periodic function corresponds to a cycle letter
Number mark;Each execution period is different;
Time length comparison module, the current operation duration for obtaining processor, and by the current operation duration with respectively hold
The row period is compared, and the periodic function set that comparison result is met to preset time conditions is determined as target period function
Set;
Parameter update module, for being updated to the corresponding lumped parameter of each target period function set, and
Periodic function mark identical with updated lumped parameter is obtained in each target period function set, as target period
Function identification;
Function execution module, executing the corresponding periodic function of each target period function identification for synchronization is included
Multiple power functions.
Wherein, the data setup module includes:
Function set setting unit is respectively set for multiple periodic function set to be arranged, and for each periodic function set
The corresponding execution period;
Mapping relations establish unit, for obtaining each power function corresponding preset cycle of operation, and according to each
The cycle of operation determines the running priority grade of each power function in the processor, and establishes each running priority grade and execute week with each
Mapping table between phase;
Period determination unit is executed, for according to the corresponding running priority grade of each power function, being reflected described
It penetrates in relation table and determines each power function corresponding execution period;
Power function allocation unit executes week for that will have the identical power function for executing the period to be added to have to correspond to
In the periodic function set of phase, and at least one periodic function is set in each periodic function set, and by each periodic function collection
Power function in conjunction is distributed into affiliated each periodic function.
Wherein, the time length comparison module includes:
Duration acquiring unit, the current operation duration for obtaining processor, and read the execution of each periodic function set
Period;
Time length comparison unit, for the current operation duration to be compared with each execution period, and generate with it is described
It is each to execute period corresponding comparison result;
Condition meets unit, and the comparison result for by the current operation duration being the integral multiple for executing the period is determined as
Meet the target comparison result of preset time conditions;
Target collection determination unit, the execution period corresponding periodic function for being included by the target comparison result
Set is determined as target period function set.
Optionally, the time length comparison module further includes:
Memory releasing unit detects that the current operation duration is not up to each integral multiple for executing the period for working as
When, determine that each comparison result is unsatisfactory for preset time conditions, and discharge the memory corresponding to each periodic function set
Resource.
Wherein, the parameter update module, including:
Lumped parameter acquiring unit, for obtaining the corresponding lumped parameter of each target period function set and described
The corresponding periodic function mark of each periodic function in each target period function set;
Update mode acquiring unit, for the update mode that gets parms;
It is incremented by updating unit, if being parameter incremental manner for the parameter update mode, is incremented by according to the parameter
Mode is incremented by the corresponding lumped parameter of each target period function set, and in each target period function
Obtained in set be incremented by after lumped parameter identical periodic function mark, as target period function identification;
Successively decrease updating unit, if being parameter decreasing fashion for the parameter update mode, is successively decreased according to the parameter
Mode successively decreases to the corresponding lumped parameter of each target period function set, and in each target period function
It obtains in set and is identified with the identical periodic function of lumped parameter after successively decreasing, as target period function identification.
The embodiment of the present invention is respectively set for each periodic function set corresponding by the way that multiple periodic function set are arranged
The period is executed, and at least one periodic function is set in each periodic function set;Each periodic function corresponds to a cycle function
Mark;Each execution period is different;The current operation duration of processor is obtained, and by the current operation duration and each execution
Period is compared, and the periodic function set that comparison result is met to preset time conditions is determined as target period collection of functions
It closes;The corresponding lumped parameter of each target period function set is updated, and in each target period function set
It is middle to obtain periodic function mark identical with updated lumped parameter, as target period function identification;It is synchronous to execute each mesh
Mark periodic function identifies multiple power functions that corresponding periodic function is included.It can be seen that described be based on processor
Data processing equipment can meet the time conditions in the current operation duration and corresponding comparison result of each execution period
When, the periodic function set for meeting the time conditions is determined as the target period function set, and described each
It is synchronous to execute respectively when detecting that the target period function identification is equal to updated lumped parameter in target period function set
Multiple power functions included in the corresponding periodic function of target period function identification, and then improve the profit to processor
With rate, and the power consumption of processor is reduced, to avoid the wasting of resources of processor.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow diagram of processor-based data processing method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of processor-based data processing equipment provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of data setup module provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of time length comparison module provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of parameter update module provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of the processor-based data processing equipment of another kind provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts
Embodiment shall fall within the protection scope of the present invention.
Term " comprising " and " having " in description and claims of this specification and above-mentioned attached drawing and they appoint
What is deformed, it is intended that is covered and non-exclusive is included.Such as contain the process of series of steps or unit, method, system, production
The step of product or equipment are not limited to list or unit, but further include the steps that optionally do not list or unit, or
Further include optionally for other intrinsic steps of these processes, method, product or equipment or unit.
The execution of the processor-based data processing method referred in the embodiment of the present invention depends on computer program, can
It runs on the computer system of Feng Ruoyiman systems.The computer program can integrate in the application, also can be used as independent
Tool-class application operation.The computer system can be the terminals such as PC, tablet computer, laptop, smart mobile phone
Equipment.
It is described in detail separately below.
Fig. 1 is referred to, is a kind of flow signal of processor-based data processing method provided in an embodiment of the present invention
Figure.As shown in Figure 1, the processor-based data processing method includes at least:
Step S101, is arranged multiple periodic function set, and is respectively set for each periodic function set and corresponding executes week
Phase, and at least one periodic function is set in each periodic function set;Each periodic function corresponds to a cycle function identification;Respectively
It is different to execute the period;
Specifically, multiple periodic function set can be arranged in processor-based data processing equipment, and are each periodic function
The corresponding execution period is respectively set in set, and obtains each power function corresponding preset cycle of operation, and according to each
The cycle of operation determines the running priority grade of each power function in the processor, and establishes each running priority grade and execute week with each
Mapping table between phase, and according to the corresponding running priority grade of each power function, in the mapping table
The middle determination each power function corresponding execution period, and tool will be added to the identical power function for executing the period
In the standby corresponding periodic function set for executing the period, and at least one periodic function is set in each periodic function set, and will
Power function in each periodic function set is distributed into affiliated each periodic function;
Wherein, the processor-based data processing equipment can be applied to smart mobile phone, personal tablet, PC,
Mobile internet device, wearable device (such as smartwatch (such as iwatch), Intelligent bracelet) or other application can be installed
The terminal device of software;
Wherein, each periodic function set can meet certain multiple proportion between the corresponding execution period, to ensure
Each periodic function, which is integrated under same operation duration, obtains the minimum execution period, and executes the period as time of day, really using minimum
Each periodic function protected in each periodic function set can carry out time-division operation, and further ensure the sequential fortune of each periodic function
Row;
For example, the data processing equipment is subjected to multiple periodic function set of backstage manager's setting (for example, 3
It is a), and corresponding execution period is respectively set for each periodic function set (100 is delicate, 1 millisecond, 10 milliseconds).For example, first
A periodic function set corresponding execution period is 100 delicate (i.e. 0.1 millisecond, and according to (us) delicate in time of day and in the least
Reduction formula between second (ms), there is 1ms=1000us);The second period function set corresponding execution period is 1ms, the
Three periodic function set corresponding execution period is 10ms.As it can be seen that minimum execute the period for 100us, and according to the execution period
Inverse relation between frequency, can must execute that the period is smaller, then the number executed in the unit interval is more.In consideration of it, into one
Step is for running simultaneously three periodic function set, to ensure the timing of each power function, can will have minimum to execute week
The 100us of phase (takes, 10* as time of day when 10 periodic functions in period 1 function set have executed one time
100us=1ms), 10 periodic functions in second round function set have just executed one of periodic function and (have executed week
Phase is 1ms);Similarly it is found that when 10 periodic functions in second period function set have executed one time, the third period
Function set has just executed one of periodic function (the execution period is 10ms).
For another example, in 3 periodic function set of setting (periodic function set A, periodic function set B and periodic function
Set C) in, the operation needed for time-consuming situation and/or each power function when can in the processor be run according to each power function
Period determines the running priority grade of each power function in the processor, by taking 10 power functions in 100 power functions as an example
The explanation for carrying out priority distribution situation further refers to this 10 power functions that table 1 provides and corresponds in the processor
Running priority grade distribution situation table;
Table 1
The distribution situation table of this 10 power functions provided by above-mentioned table 1 corresponding running priority grade in the processor can
Know, since the operation of power function A and power function B in the processor takes minimum, so can determine this 2 power functions
Priority is the first priority, i.e., the two power functions are the power function with highest running priority grade;Power function C,
The operation of power function D, power function E and power function F in the processor is time-consuming longer, so can determine this 4 function letters
Several priority is the second priority;And power function G, power function H, power function I and power function J are in the processor
Operation takes longest, it may be determined that the priority of this 4 power functions is third priority.Alternatively, due to power function A and function
The cycles of operation of function B in the processor are most short, so power function A and power function B correspond to the first running priority grade;Separately
Outside, due to power function C, power function D, the cycle of operation of power function E and power function F in the processor is longer, so
Corresponding second priority of power function C, power function D, power function E and power function F;Further, since power function G,
The cycle of operation longest of power function H, power function I and power function J in the processor, so power function G, power function
H, power function I and power function J correspond to third priority.
It can similarly obtain, the determination of the priority of other 90 power functions in this 100 power functions also can be according to each
The cycle of operation needed for time-consuming situation and/or each power function when power function is run in the processor is determined, here
No longer enumerated.
For another example, still by taking above-mentioned 10 power functions as an example, obtaining, the corresponding operation of this 10 power functions is excellent
After first grade, each running priority grade and each mapping table executed between the period can be established, and can distinguish according to each power function
Corresponding priority further confirms that each power function corresponding execution period;Specifically, refer to table 2 provide it is each
Running priority grade and each mapping table executed between the period;
Periodic function set | Periodic function set A | Periodic function set B | Periodic function set C |
It is each to execute the period | 100us | 1ms | 10ms |
Running priority grade | First running priority grade | Second running priority grade | Third running priority grade |
Table 2
Each running priority grade and each mapping table executed between the period provided by above-mentioned table 2 is it is found that running priority
It is 100us that grade, which is the power function corresponding execution period of the first running priority grade, i.e., B pairs of functional function A and power function
One is answered to execute the periodic function that the period is 100us;In addition, the power function that running priority grade is the second running priority grade corresponds to
The execution period be 1ms, i.e., corresponding one of functional function C, power function D, power function E and power function F executes week
Phase is the periodic function of 1ms;In addition, the power function corresponding execution period that running priority grade is third running priority grade is
Corresponding one of 10ms, i.e., functional function G, power function H, power function I and power function J executes the week that the period is 10ms
Phase function;
Similarly, other 90 power functions with identical running priority grade (or executing the period) can be added to and has phase
In periodic function set with the execution period, and further the power function in each periodic function set can be distributed to affiliated
In each periodic function, for example, may include in periodic function 1 in periodic function set A two power functions (power function A and
Power function B);It may include four power functions (power function C, power functions in periodic function 3 in periodic function set B
D, power function E and power function F);It may include four power function (functions in periodic function 10 in periodic function set C
Function G, power function H, power function I and power function J).
Step S102, obtains the current operation duration of processor, and by the current operation duration and each execution period into
Row compares, and the periodic function set that comparison result is met to preset time conditions is determined as target period function set;
Specifically, the current operation duration of processor is obtained, and reads the execution period of each periodic function set, and by institute
It states current operation duration to be compared with each execution period, and generates comparison result corresponding with each execution period,
And it is determined as the comparison result that the current operation duration is the integral multiple for executing the period to meet the mesh of preset time conditions
Comparison result is marked, and the execution period corresponding periodic function set that the target comparison result is included is determined as target week
Phase function set.
Optionally, it when detecting that the current operation duration is not up to each integral multiple for executing the period, determines each
Comparison result is unsatisfactory for preset time conditions, and discharges the memory source corresponding to each periodic function set.
For example, the power function run is needed to have 100 in processor, and it is right in the processor to obtain each power function
It is tf that the operation answered, which takes, to ensure that each power function is able to chronologically rationally run;Processor can be by 20 Yun Hangzhouqi <
The power function of=1ms be put into respectively 10 in period 1 function set execute in the periodic function that the periods are 100us (by
It is just 10*100us=1ms to have run a wheel in this 20 power functions, so the cycle of operation of each power function can
For 1ms), that is, allowing in each periodic function has 2 power functions;In addition, can be by 40 Yun Hangzhouqi <The power function of=10ms
10 in second round function set are put into respectively to execute in the periodic function that the period is 1ms (due to this 40 power functions
It is just 10*1ms=10ms to have run a wheel, so the cycle of operation of each power function can be 10ms), that is, allow each week
Phase function has 4 power functions;In addition, by remaining 40 Yun Hangzhouqi <The power function of=100ms is put into third week respectively
10 in phase function set execute in the periodic function that the period is 10ms (since this 40 power functions have run a wheel just
It is well 10*10ms=100ms, so the cycle of operation of each power function can be 100ms), you can make each periodic function
Include inside 4 power functions.Further, it refers to each current operation duration that table 3 provides and corresponding executes between the period
Comparable situation;
Period 1 function set | Second round function set | Period 3 function set | |
It is each to execute the period | 100us | 1ms | 10ms |
Operation duration A | 50ms | 50ms | 50ms |
Operation duration B | 73ms | 73ms | 73ms |
Operation duration C | 930us | 930us | 930us |
Table 3
By the corresponding ratio executed between the period of each current operation duration provided of above-mentioned table 3 and respective cycle function set
Compared with known to situation:When current operation duration is operation duration A (50ms), the current operation duration is three periodic function collection
Close the integral multiple in corresponding execution period (100us, 1ms, 10ms);50ms in i.e. each comparison result is the 500 of 100us
Times, 50ms is 50 times of 1ms, and 50ms is 5 times of 10ms, is satisfied by the preset time conditions, so in the current fortune
When row when a length of operation duration A, can trigger execute the period be 100us, the synchronous operation of each periodic function set of 1ms, 10ms,
In consideration of it, can be to execute the comparison result of integral multiple in period to be determined as meeting preset timeline by the current operation duration
The target comparison result of part, and the execution period corresponding periodic function collection that can included by the target comparison result further
It closes (period 1 function set, second round function set and period 3 function set) and is determined as target period collection of functions
It closes.
Further optionally, when current operation duration is operation duration B (73ms), the current operation duration is wherein
The integral multiple in the execution period (100us and 1ms) corresponding to two periodic function set;73ms i.e. in comparison result is
730 times of 100us are 73 times of 1ms, are 7.3 times of 10ms, then execute two periodic functions that the period is 100us and 1ms
Set meets the preset time conditions;So, can be by period 1 letter when the current operation duration is operation duration B
Manifold is closed and second round function set is determined as meeting the target period function set of preset time conditions;In consideration of it, can
It is to execute the comparison result of integral multiple in period (73ms is 730 times of 100us, is the 73 of 1ms by the current operation duration
Times) be determined as meeting the target comparison result of preset time conditions, and can be included by the target comparison result further
Execution period corresponding periodic function set (period 1 function set and second round function set) be determined as target week
Phase function set.
Optionally, in addition, when current operation duration is operation duration C (930us), when can detect the current operation
The long integral multiple for being not up to each execution period (100us, 1ms, 10ms);That is 930us is 9.3 times of 100us, 930us
It is 0.93 times of 1ms, 930us is 0.093 times of 10ms, so when the current operation duration is operation duration C, each period
In function set the preset time is unsatisfactory for the corresponding each comparison result of each execution period (100us, 1ms, 10ms)
Condition;In consideration of it, the memory source corresponding to this releasable triply periodic function set.
Step S103 is updated the corresponding lumped parameter of each target period function set, and in each mesh
It marks and obtains periodic function mark identical with updated lumped parameter in periodic function set, as target period function mark
Know;
Specifically, the corresponding lumped parameter of each target period function set and each target period function are obtained
The corresponding periodic function mark of each periodic function in set, and the update mode that gets parms;If the parameter update side
Formula is parameter incremental manner, then according to the parameter incremental manner to the corresponding set of each target period function set
Parameter is incremented by, and obtain in each target period function set with incrementally after the identical periodic function of lumped parameter
Mark, as target period function identification;
Optionally, if the parameter update mode is parameter decreasing fashion, according to the parameter decreasing fashion to described
The corresponding lumped parameter of each target period function set successively decreases, and is obtained in each target period function set
It is identified with the identical periodic function of lumped parameter after successively decreasing, as target period function identification.
Wherein, the execution that the lumped parameter can be used for characterizing in target period function set corresponding to each periodic function is suitable
Sequence;
Wherein, the periodic function mark has uniqueness in corresponding single target periodic function set, maximum
Value can be used for indicating the quantity of periodic function in the single target periodic function set.
For example, with three run simultaneously when target period function set (A periodic function set, B periodic functions set and
C periodic functions set) for, wherein the A periodic function set corresponding execution period holds less than B periodic function set is corresponding
The row period, and the B periodic function set corresponding execution period is less than the C periodic function set corresponding execution period;In addition, this three
The corresponding lumped parameter of a target period function set is X, Y, Z, and the value of each lumped parameter can be in numerical value 1 to N
Any one numerical value (N is the positive integer more than 1, for example, 10) N is;In addition, each target period collection of functions can be obtained further
The corresponding periodic function mark of each periodic function and corresponding parameter update mode in conjunction is (for example, parameter is incremented by side
Formula), specifically, refer to two kinds of operation durations that table 4 provides (for example, A durations and B durations, and there are A durations to be less than B durations)
When the corresponding lumped parameter distribution situation of each target period function set;
Target period function set | A periodic function set | B periodic function set | C periodic function set |
Lumped parameter | X | Y | Z |
Periodic function identifies A | 8 | 4 | 1 |
Periodic function identifies B | 16 | 8 | 2 |
Table 4
The corresponding lumped parameter distribution situation of each target period function set provided by above-mentioned table 4 is it is found that due to A
The periodic function set corresponding execution period is less than the B periodic function set corresponding execution period, and B periodic function set corresponds to
The execution period be less than the C periodic function set corresponding execution period, so current operation duration be A durations when, can be read
To A periodic function set it is corresponding be incremented by after lumped parameter X=8, B periodic function set be incremented by after lumped parameter Y=4, C
The corresponding lumped parameter Z=1 of periodic function set executes A periodic function set, B period letters at this point, can be synchronized in A durations
Manifold is closed corresponding with each periodic function mark reached under the current operation duration in C periodic function set
Each periodic function.Further, since A periodic function set, B periodic functions set and the corresponding parameter update of C periodic function set
Mode is parameter incremental manner, so, it can be according to the corresponding parameter incremental manner of these three target period function sets to set
Parameter X, lumped parameter Y, lumped parameter C carry out being incremented by update.Wherein, it when the current operation duration is B durations, can detect
To A periodic function set it is corresponding be incremented by after lumped parameter X=16, B periodic function set be incremented by after lumped parameter Y=8,
C periodic function set be incremented by after lumped parameter Z=2, i.e., in B durations, A periodic function set, B periodic functions set and C
It is target period function identification that the corresponding periodic function of each periodic function in periodic function set, which identifies 16,8 and 2,
Execution can be synchronized under the current operation duration (B durations) meets each target period function identification corresponding 3
Each periodic function in a set.
Step S104, the synchronous multiple functions of executing the corresponding periodic function of each target period function identification and included
Function.
For example, in periodic function (periodic function 1 and periodic function 3) corresponding with each target period function identification
Include that can be equal to the updated lumped parameter (Y=detecting each target period function identification for 4 power functions
10, Z=2), wherein periodic function 1 corresponds to parameter decreasing fashion, and periodic function 3 corresponds to parameter incremental manner, at this point, together
Each power function that step executes in periodic function 1 and periodic function 3 specifically refers in each periodic function listed by table 5
Each power function table carried;
Table 5
The distribution situation of each power function is it is found that there is 4 in each periodic function provided by above-mentioned table 5 in periodic function 1
Power function, respectively power function A, power function B, power function C and power function D, this 4 power functions are in period letter
Number 1 can in a serial manner (for example, power function A is first carried out, secondly execute power function B, then execute function letter
Number C, finally executes power function D) it is run;Similarly, also include 4 power functions, respectively function in periodic function 3
Function E, power function F, power function G and power function H, this 4 power functions still press setting in periodic function 3
Sequence is executed one by one;
Optionally, after having executed power function 4 in each periodic function 1, lumped parameter Y corresponding with periodic function 1
Successively decreasing for corresponding set parameter (lumped parameter Y=10) will be carried out according to the parameter decreasing fashion, to be formed and next week
The corresponding lumped parameter (for example, Y=9) of phase function (for example, periodic function 2).Similarly, when having executed in periodic function 3
After power function H, lumped parameter Z corresponding with periodic function 3 will carry out corresponding set parameter according to the parameter incremental manner
(for example, Z=2's) is incremented by, to form lumped parameter corresponding with next cycle function (for example, periodic function 4) (for example, Z
=3).
It can be seen that multiple periodic function set are arranged in the processor-based data processing equipment first, and it is each
The corresponding execution period is respectively set in periodic function set, and at least one periodic function is arranged in each periodic function set;
Each periodic function corresponds to a cycle function identification;Each execution period is different;Secondly, when obtaining the current operation of processor
It is long, and the current operation duration is compared with each execution period, and comparison result is met into preset time conditions
Periodic function set is determined as target period function set;Then, the corresponding set of each target period function set is joined
Number is updated, and periodic function mark identical with updated lumped parameter is obtained in each target period function set
Know, as target period function identification;Finally, the synchronous corresponding periodic function of each target period function identification that executes is wrapped
The multiple power functions contained.As it can be seen that the processor-based data processing equipment comparable results meet the current operation
Periodic function set when respectively executing the integral multiple in period described in Shi Changwei, and can be in the week as target period function set
When phase function identification is equal to the updated lumped parameter, it regard periodic function mark as target period function identification,
And the synchronous multiple power functions executed in the corresponding periodic function of each target period function identification, to realize time-division operation
Multiple power functions further increase the utilization rate to processor, and then reduce the power consumption of processor.
Further, Fig. 2 is referred to, is the processor-based data processing equipment of another kind provided in an embodiment of the present invention
Structural schematic diagram.As shown in Fig. 2, the processor-based data processing equipment 1 includes at least:Data setup module 10,
Time length comparison module 20, parameter update module 30 and function execution module 40;
The data setup module 10 is set respectively for multiple periodic function set to be arranged, and for each periodic function set
It sets the corresponding execution period, and at least one periodic function is set in each periodic function set;Each periodic function corresponds to one
Periodic function identifies;Each execution period is different;
Specifically, the data setup module 10 in processor-based data processing equipment 1, can be used for being arranged multiple
Periodic function set, and the corresponding execution period is respectively set for each periodic function set, and it is right respectively to obtain each power function
The preset cycle of operation answered, and the running priority grade of each power function in the processor is determined according to each cycle of operation,
And each running priority grade and each mapping table executed between the period are established, and it is corresponding according to each power function
Running priority grade determines each power function corresponding execution period in the mapping table, and will have phase
It is added to and has in the corresponding periodic function set for executing the period with the power function for executing the period, and in each periodic function set
Middle at least one periodic function of setting, and the power function in each periodic function set is distributed to affiliated each periodic function
In;
Wherein, the processor-based data processing equipment 1 can be applied to smart mobile phone, personal tablet, PC,
Mobile internet device, wearable device (such as smartwatch (such as iwatch), Intelligent bracelet) or other application can be installed
The terminal device of software;
Wherein, each periodic function set can meet certain multiple proportion between the corresponding execution period, to ensure
Each periodic function, which is integrated under same operation duration, obtains the minimum execution period, and executes the period as time of day, really using minimum
Each periodic function protected in each periodic function set can carry out time-division operation, and further ensure the sequential fortune of each periodic function
Row;
Further, the specific implementation mode of the data setup module 10 refers in embodiment corresponding to above-mentioned Fig. 1
Description to step S101, is not discussed here.
Further, Fig. 3 is referred to, is a kind of structural schematic diagram of data processing module provided in an embodiment of the present invention.
As shown in figure 3, the data processing module 10, including:Function set setting unit 101, mapping relations are established unit 102, are held
Row period determination unit 103 and power function allocation unit 104;
The function set setting unit 101 for multiple periodic function set to be arranged, and is each periodic function set point
The corresponding execution period is not set;
The mapping relations establish unit 102, for obtaining each power function corresponding preset cycle of operation, and
Determine the running priority grade of each power function in the processor according to each cycle of operation, and establish each running priority grade with it is each
Execute the mapping table between the period;
The execution period determination unit 103, for according to the corresponding running priority grade of each power function,
Each power function corresponding execution period is determined in the mapping table;
The power function allocation unit 104 has pair for that will have the identical power function for executing the period to be added to
In the periodic function set that the period should be executed, and at least one periodic function is set in each periodic function set, and by each week
Power function in phase function set is distributed into affiliated each periodic function.
For example, the function set setting unit 101 is subjected to multiple periodic function set of backstage manager's setting
(for example, 5 periodic function set are respectively:Periodic function set A, periodic function set B, periodic function set C, period letter
Manifold closes D and periodic function set E), and for this 5 periodic function set be respectively set corresponding execution period (for example,
100us, 500us, 2.5ms, 12.5ms, 72.5ms);Wherein, minimum to execute the period for 100us, and according to execution period and frequency
Inverse relation between rate, can must execute that the period is smaller, then the execution number within the unit interval is more.
For another example, by taking 10 power functions as an example, the function set setting unit 101 can get 3 week of setting
Phase function set, the mapping relations establish unit 102, time-consuming situation when can in the processor be run according to each power function
And/or the cycle of operation needed for each power function is determined the corresponding running priority grade of each power function.For example, can root
Time-consuming how many setting corresponding cycles of operation when according to the operation in the processor of this 10 power functions, and according to the operation
Period determines the corresponding running priority grade of each power function, and establishes reflecting between each running priority grade and each execution period
Penetrate relation table so that static variable (each cycle of operation) associated with each power function in target period function can play meter
When function specifically refer to the corresponding cycle of operation statistical conditions table of each power function that table 4 provides;
Each power function | Power function 1 | Power function 2 | Power function 3 | Power function 4 | Power function 5 |
The cycle of operation | <500us | <800us | <10ms | <15ms | <20ms |
Each power function | Power function 6 | Power function 7 | Power function 8 | Power function 9 | Power function 10 |
The cycle of operation | <500us | <800us | <10ms | <15ms | <20ms |
Table 6
The corresponding each cycle of operation statistical conditions table of each power function provided by above-mentioned table 6 is it is found that the mapping
Relationship is established needed for time-consuming situation and/or each power function when unit 102 can in the processor be run according to each power function
The cycle of operation determine the running priority grade of each power function in the processor;Wherein, to each power function in processor
The description of time-consuming situation when middle operation can be found in the description in embodiment corresponding to above-mentioned Fig. 1 to step S101, you can according to
Time-consuming situation when the operation determines that each power function corresponding cycle of operation determines each power function in the processor
Running priority grade;It optionally, also can be according to each power function week of operation in the processor in above-mentioned 10 power functions
Phase determines the running priority grade of each power function in the processor, you can will be with the power function within the scope of certain cycle of operation
It is considered as the power function with same running priority grade.For example, can be that 10 power functions that above-mentioned table 6 provides were arranged for 3 week
Phase function set, these three periodic function set are respectively A periodic function set, B periodic functions set and C periodic function collection
Close, and A periodic function set corresponding the executions period be 100us, the B periodic function set corresponding execution period be 2ms, C weeks
The phase function set corresponding execution period is 10ms.In consideration of it, can be by the corresponding 3 periodic function collection of above-mentioned 10 power functions
The priority for setting gradually 3 grades is closed, for example, the cycle of operation can be less than to the power function 1 and power function of 500us first
6 and the cycle of operation be less than the power function 2 and power function 7 of 800us, this four power functions are set as the first running priority
Grade;Secondly, it can will be less than 10ms power functions 3 and power function 8 cycle of operation and the cycle of operation is less than 15ms power functions 4
It is set as the second running priority grade with power function 9;Then, the cycle of operation it can will be less than 20ms power functions 5 and power function
10 are set as third running priority grade;Further, reference can be made to table 1 is to 10 work(enumerating in embodiment corresponding to above-mentioned Fig. 1
Can function corresponding running priority grade in the processor description, be not discussed here.
In addition, the execution period determination unit 103 can be according between each running priority grade and each execution period
Mapping relations determine 10 power functions corresponding execution period in this 3 periodic function set;Further, it refers to
Execution period profile situation table in each periodic function shown in table 7 corresponding to each power function;
Each power function | Power function 1 | Power function 2 | Power function 3 | Power function 4 | Power function 5 |
Execute the period | 100us | 100us | 2ms | 2ms | 10ms |
Each power function | Power function 6 | Power function 7 | Power function 8 | Power function 9 | Power function 10 |
Execute the period | 100us | 100us | 2ms | 2ms | 10ms |
Table 7
Each distribution situation table for executing the period provided by above-mentioned table 7, and in conjunction with given by table 6 to the cycle of operation
Statistical conditions table it is found that in this 10 power functions, power function 1 and power function 6 can be added to periodic function 1
It is interior, and power function 2 and power function 7 can be added in periodic function 2, and make corresponding to periodic function 1 and periodic function 2
The execution period be 100us;In addition, power function 3 and power function 8 can be added in periodic function 3, and can be by function
Function 4 and power function 9 are added in periodic function 4, and keep the execution period corresponding to periodic function 3 and periodic function 4 equal
For 2ms;In addition, power function 5 and power function 10 can be added in periodic function 5, so that holding corresponding to periodic function 5
The row period is 10ms.Then, the power function allocation unit 104 can will with it is identical execute the period power function;For example,
Power function 1 and power function 6 and power function 2 and power function 7 can, be added to and have the corresponding period for executing the period
Function set (for example, A periodic functions set) correspondingly can be by power function 3 and power function 8 and 4 He of power function
This four power functions of power function 9 are corresponding to be added to B periodic function set;And it can be by power function 5 and power function 10
The two power functions are corresponding to be added to periodic function set C, so that each periodic function set (1~period of periodic function letter
Number 5) in separately include at least one periodic function, i.e. A periodic functions set includes 2 periodic functions, and each period letter
Include 2 power functions in number, B periodic function set includes 2 periodic functions, and includes 2 work(in each periodic function
Energy function, C periodic function set includes 1 periodic function, and includes 2 power functions in this 1 periodic function.
The time length comparison module 20, the current operation duration for obtaining processor, and by the current operation duration
The periodic function set for being compared with each execution period, and comparison result being met to preset time conditions is determined as target week
Phase function set;
Specifically, the time length comparison module 20, can be used for obtaining the current operation duration of processor, and read each period
The execution period of function set, and the current operation duration is compared with each execution period, and generate and respectively held with described
Row period corresponding comparison result, and the comparison result that the current operation duration is the integral multiple for executing the period is determined
To meet the target comparison result of preset time conditions, and the execution period for being included by the target comparison result is corresponding
Periodic function set is determined as target period function set.
Optionally, it when detecting that the current operation duration is not up to each integral multiple for executing the period, determines each
Comparison result is unsatisfactory for preset time conditions, and discharges the memory source corresponding to each periodic function set.
Wherein, the specific implementation mode of the time length comparison module 20, refers in embodiment corresponding to above-mentioned Fig. 1 to table
Each operation duration and each description executed between the period, are no longer repeated one by one here in 1.
Further, then Fig. 4 is referred to, is a kind of structural representation of time length comparison module provided in an embodiment of the present invention
Figure.As shown in figure 4, the time length comparison module 20, including:Duration acquiring unit 201, time length comparison unit 202, condition meet
Unit 203, target collection determination unit 204 and memory releasing unit 205;
The duration acquiring unit 201, the current operation duration for obtaining processor, and read each periodic function set
The execution period;
The time length comparison unit 202 for the current operation duration to be compared with each execution period, and generates
Comparison result corresponding with each execution period;
The condition meets unit 203, for being the comparison knot for the integral multiple for executing the period by the current operation duration
Fruit is determined as meeting the target comparison result of preset time conditions;
The target collection determination unit 204, the execution period for being included by the target comparison result are corresponding
Periodic function set is determined as target period function set;
The memory releasing unit 205 detects that the current operation duration is not up to each execution period for working as
Integral multiple when, determine that each comparison result is unsatisfactory for preset time conditions, and it is right to discharge each periodic function set institute
The memory source answered.
For example, current operation duration is got as 670us in the duration acquiring unit 201, and each execution got
When period is respectively 100us, 500us and 1000us, the time length comparison unit 202, can by the current operation duration with it is each
The execution period is compared respectively, and generates comparison result corresponding with these three execution periods, i.e.,;I.e. 670us is
6.7 times of 100us, 670us are 1.34 times of 500us, and 670us is 0.67 times of 1000us, so the memory releasing unit
205, it can be used for determining that the current operation duration 670us is not each integral multiple for executing the period, i.e., in each periodic function collection
In closing preset timeline is unsatisfactory for the corresponding each comparison result of each execution period (100us, 500us and 1000us)
Part;In consideration of it, the processor-based data processing equipment 1 can control the memory releasing unit 205 execute release this three
The step of memory source corresponding to periodic function set.
The parameter update module 30, for being carried out more to the corresponding lumped parameter of each target period function set
Newly, and in each target period function set periodic function mark identical with updated lumped parameter is obtained, as
Target period function identification;
Specifically, the parameter update module 30 can be used for obtaining the corresponding set of each target period function set
The corresponding periodic function mark of each periodic function in parameter and each target period function set, and get parms
Update mode;If the parameter update mode is parameter incremental manner, according to the parameter incremental manner to each target
The corresponding lumped parameter of periodic function set is incremented by, and is obtained and be incremented by each target period function set
The identical periodic function mark of lumped parameter afterwards, as target period function identification;
Optionally, if the parameter update mode is parameter decreasing fashion, according to the parameter decreasing fashion to described
The corresponding lumped parameter of each target period function set successively decreases, and is obtained in each target period function set
It is identified with the identical periodic function of lumped parameter after successively decreasing, as target period function identification.
Wherein, the execution that the lumped parameter can be used for characterizing in target period function set corresponding to each periodic function is suitable
Sequence;
Wherein, the periodic function mark has uniqueness in corresponding single target periodic function set, maximum
Value can be used for indicating the quantity of periodic function in the single target periodic function set.
Specifically, the specific implementation mode of the parameter update module 30 can be found in right in embodiment corresponding to above-mentioned Fig. 1
The description of step S103, is no longer repeated one by one here.
Further, then Fig. 5 is referred to, is a kind of structural representation of parameter update module provided in an embodiment of the present invention
Figure.As shown in figure 5, the parameter update module 30, including:Lumped parameter acquiring unit 301, update mode acquiring unit 302,
It is incremented by updating unit 303 and the updating unit 304 that successively decreases;
The lumped parameter acquiring unit 301, for obtaining the corresponding lumped parameter of each target period function set
And the corresponding periodic function mark of each periodic function in each target period function set;
The update mode acquiring unit 302, for the update mode that gets parms;
It is described to be incremented by updating unit 303, if being parameter incremental manner for the parameter update mode, according to the ginseng
Number incremental manners are incremented by the corresponding lumped parameter of each target period function set, and all in each target
Obtained in phase function set be incremented by after lumped parameter identical periodic function mark, as target period function identification;
The updating unit 304 that successively decreases, if being parameter decreasing fashion for the parameter update mode, according to the ginseng
Number decreasing fashions successively decrease to the corresponding lumped parameter of each target period function set, and in each target week
It obtains in phase function set and is identified with the identical periodic function of lumped parameter after successively decreasing, as target period function identification.
The function execution module 40 executes the corresponding periodic function institute of each target period function identification for synchronous
Including multiple power functions.
For example, in periodic function corresponding with each target period function identification (5 and 4) 5 comprising 3 power functions and
Include that can be equal to the updated collection detecting each target period function identification for 4 power functions in periodic function 4
It is synchronous to execute each target period function when closing parameter (lumped parameter X=5, the lumped parameter Y=4 after successively decreasing after successively decreasing)
Identify multiple power functions that corresponding periodic function (periodic function 5 and periodic function 4) is included.Specifically, please join
It is shown in Table the distribution situation of each power function in each periodic function that 8 provide;
Table 8
The periodic function 5 provided by above-mentioned table 8 distribution situation corresponding with each power function in periodic function 4 can
Know there is 3 power functions, respectively power function 1, power function 2 and power function 3, and these three functions in periodic function 5
Function can be by the importance carry out sequence execution of preset function in periodic function 5;At the same time, synchronous with periodic function 5
Include 4 power functions, respectively power function A, function letter in the periodic function 4 in another periodic function set executed
Number B, power function C and power function D, execution sequence of this 4 power functions in periodic function 4 is still preset important
Property carry out sequence execution.
It can be seen that multiple periodic function set are arranged in the processor-based data processing equipment first, and it is each
The corresponding execution period is respectively set in periodic function set, and at least one periodic function is arranged in each periodic function set;
Each periodic function corresponds to a cycle function identification;Each execution period is different;Secondly, when obtaining the current operation of processor
It is long, and the current operation duration is compared with each execution period, and comparison result is met into preset time conditions
Periodic function set is determined as target period function set;Then, the corresponding set of each target period function set is joined
Number is updated, and periodic function mark identical with updated lumped parameter is obtained in each target period function set
Know, as target period function identification;Finally, the synchronous corresponding periodic function of each target period function identification that executes is wrapped
The multiple power functions contained.As it can be seen that the processor-based data processing equipment comparable results meet the current operation
Periodic function set when respectively executing the integral multiple in period described in Shi Changwei, and can be in the week as target period function set
When phase function identification is equal to the updated lumped parameter, it regard periodic function mark as target period function identification,
And the synchronous multiple power functions executed in the corresponding periodic function of each target period function identification, to realize time-division operation
Multiple power functions further increase the utilization rate to processor, and then reduce the power consumption of processor.
Further, then Fig. 6 is referred to, is the processor-based data processing dress of another kind provided in an embodiment of the present invention
The structural schematic diagram set, as shown in fig. 6, the processor-based data processing equipment 1000 may include:At least one place
Device 1001, such as CPU are managed, at least one network interface 1004, user interface 1003, memory 1005, at least one communication is always
Line 1002.Wherein, communication bus 1002 is for realizing the connection communication between these components.Wherein, user interface 1003 can be with
Including display screen (Display), keyboard (Keyboard), optional user interface 1003 can also include standard wireline interface,
Wireless interface.Network interface 1004 may include optionally standard wireline interface and wireless interface (such as WI-FI interface).Storage
Device 1005 can be high-speed RAM memory, can also be non-labile memory (non-volatile memory), such as
At least one magnetic disk storage.Memory 1005 optionally can also be at least one and be located remotely from depositing for aforementioned processor 1001
Storage device.As shown in fig. 6, as may include that operating system, network are logical in a kind of memory 1005 of computer storage media
Believe that module, Subscriber Interface Module SIM and equipment control application program;
Wherein, the processor-based data processing equipment 1000 can be applied to smart mobile phone, personal tablet, personal electricity
Brain, mobile internet device, wearable device (such as smartwatch (such as iwatch), Intelligent bracelet) or other can install and answer
With the terminal device of software.
In processor-based data processing equipment 1000 shown in Fig. 6, user interface 1003 is mainly used for as user
The interface of input is provided, the data of user's output are obtained;And what processor 1001 can be used for storing in calling memory 1005
Equipment controls application program, to realize:
Multiple periodic function set are set, and the corresponding execution period is respectively set for each periodic function set, and each
At least one periodic function is set in periodic function set;Each periodic function corresponds to a cycle function identification;It is each to execute the period
It is different;
The current operation duration of processor is obtained, and the current operation duration is compared with each execution period, and
The periodic function set that comparison result is met to preset time conditions is determined as target period function set;
The corresponding lumped parameter of each target period function set is updated, and in each target period function
Periodic function mark identical with updated lumped parameter is obtained in set, as target period function identification;
The synchronous multiple power functions for executing the corresponding periodic function of each target period function identification and being included.
In one embodiment, the processor 1001 is executing the multiple periodic function set of setting, and is each week
The corresponding execution period is respectively set in phase function set, and when at least one periodic function is arranged in each periodic function set,
It is specific to execute following steps:
Multiple periodic function set are set, and the corresponding execution period is respectively set for each periodic function set;
Each power function corresponding preset cycle of operation is obtained, and each function is determined according to each cycle of operation
The running priority grade of function in the processor, and establish each running priority grade and each mapping table executed between the period;
According to the corresponding running priority grade of each power function, each work(is determined in the mapping table
It can the function corresponding execution period;
Have being added to the identical power function for executing the period in the corresponding periodic function set for executing the period, and
At least one periodic function is set in each periodic function set, and the power function in each periodic function set is distributed to institute
In each periodic function belonged to.
In one embodiment, the processor 1001 is executing the current operation duration for obtaining processor, and will
The current operation duration is compared with each execution period, and comparison result is met to the periodic function of preset time conditions
When set is determined as target period function set, following steps are specifically executed:
The current operation duration of processor is obtained, and reads the execution period of each periodic function set;
The current operation duration is compared with each execution period, and is generated corresponding respectively with each execution period
Comparison result;
It is determined as the comparison result that the current operation duration is the integral multiple for executing the period to meet preset timeline
The target comparison result of part;
The execution period corresponding periodic function set that the target comparison result is included is determined as target period letter
Manifold is closed.
In one embodiment, the processor 1001 is described by the current operation duration and each execution period in execution
It is compared, and after generating comparison result corresponding with the current operation duration, also executes following steps:
When detecting that the current operation duration is not up to each integral multiple for executing the period, each comparison result is determined
Preset time conditions are unsatisfactory for, and discharge the memory source corresponding to each periodic function set.
In one embodiment, the processor 1001 is described corresponding to each target period function set in execution
Lumped parameter is updated, and the period identical with updated lumped parameter is obtained in each target period function set
Function identification specifically executes following steps when as target period function identification:
It obtains in the corresponding lumped parameter of each target period function set and each target period function set
Each periodic function corresponding periodic function mark;
Get parms update mode;
If the parameter update mode is parameter incremental manner, according to the parameter incremental manner to each target week
The corresponding lumped parameter of phase function set is incremented by, and in each target period function set obtain be incremented by after
Lumped parameter identical periodic function mark, as target period function identification;
If the parameter update mode is parameter decreasing fashion, according to the parameter decreasing fashion to each target week
The corresponding lumped parameter of phase function set successively decreases, and after obtaining and successively decrease in each target period function set
Lumped parameter identical periodic function mark, as target period function identification.
It can be seen that multiple periodic function set are arranged in the processor-based data processing equipment 1000 first, and
The corresponding execution period is respectively set for each periodic function set, and at least one period letter is set in each periodic function set
Number;Each periodic function corresponds to a cycle function identification;Each execution period is different;Secondly, the current fortune of processor is obtained
Row duration, and the current operation duration is compared with each execution period, and comparison result is met into preset timeline
The periodic function set of part is determined as target period function set;Then, to the corresponding collection of each target period function set
It closes parameter to be updated, and obtains period letter identical with updated lumped parameter in each target period function set
Number mark, as target period function identification;Finally, synchronous to execute the corresponding periodic function of each target period function identification
Including multiple power functions.It can be seen that the processor-based data processing equipment can be in the current operation
When long comparison result corresponding with each execution period meets the time conditions, by the period letter for meeting the time conditions
Manifold conjunction is determined as the target period function set, and the target week is detected in each target period function set
It is synchronous to execute the corresponding periodic function of each target period function identification when phase function identification is equal to updated lumped parameter
Included in multiple power functions, and then improve to the utilization rate of processor, and reduce the power consumption of processor, to avoid processing
The wasting of resources of device.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer read/write memory medium
In, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly
It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.
Claims (10)
1. a kind of processor-based data processing method, which is characterized in that including:
Multiple periodic function set are set, and the corresponding execution period is respectively set for each periodic function set, and in each period
At least one periodic function is set in function set;Each periodic function corresponds to a cycle function identification;It is each to execute the period mutually not
It is identical;
The current operation duration of processor is obtained, and the current operation duration is compared with each execution period, and will be compared
The periodic function set that relatively result meets preset time conditions is determined as target period function set;
The corresponding lumped parameter of each target period function set is updated, and in each target period function set
It is middle to obtain periodic function mark identical with updated lumped parameter, as target period function identification;
The synchronous multiple power functions for executing the corresponding periodic function of each target period function identification and being included.
2. according to the method described in claim 1, it is characterized in that, the multiple periodic function set of the setting, and being each period
The corresponding execution period is respectively set in function set, and at least one periodic function is arranged in each periodic function set, including:
Multiple periodic function set are set, and the corresponding execution period is respectively set for each periodic function set;
Each power function corresponding preset cycle of operation is obtained, and each power function is determined according to each cycle of operation
Running priority grade in the processor, and establish each running priority grade and each mapping table executed between the period;
According to the corresponding running priority grade of each power function, each function letter is determined in the mapping table
The number corresponding execution period;
Have being added to the identical power function for executing the period in the corresponding periodic function set for executing the period, and each
At least one periodic function is set in periodic function set, and the power function in each periodic function set is distributed to affiliated
In each periodic function.
3. according to the method described in claim 1, it is characterized in that, the current operation duration for obtaining processor, and by institute
It states current operation duration to be compared with each execution period, and comparison result is met to the periodic function collection of preset time conditions
Conjunction is determined as target period function set, including:
The current operation duration of processor is obtained, and reads the execution period of each periodic function set;
The current operation duration is compared with each execution period, and generates ratio corresponding with each execution period
Relatively result;
It is determined as the comparison result that the current operation duration is the integral multiple for executing the period to meet preset time conditions
Target comparison result;
The execution period corresponding periodic function set that the target comparison result is included is determined as target period collection of functions
It closes.
4. according to the method described in claim 3, it is characterized in that, described by the current operation duration and each execution period
It is compared, and after generating comparison result corresponding with the current operation duration, further includes:
When detecting that the current operation duration is not up to each integral multiple for executing the period, determine each comparison result not
Meet preset time conditions, and discharges the memory source corresponding to each periodic function set.
5. according to the method described in claim 1, it is characterized in that, described to the corresponding collection of each target period function set
It closes parameter to be updated, and obtains period letter identical with updated lumped parameter in each target period function set
Number mark, as target period function identification, including:
It obtains each in the corresponding lumped parameter of each target period function set and each target period function set
The corresponding periodic function mark of periodic function;
Get parms update mode;
If the parameter update mode is parameter incremental manner, according to the parameter incremental manner to each target period letter
Manifold is closed corresponding lumped parameter and is incremented by, and obtain in each target period function set with incrementally after collection
The identical periodic function mark of parameter is closed, as target period function identification;
If the parameter update mode is parameter decreasing fashion, according to the parameter decreasing fashion to each target period letter
Manifold closes corresponding lumped parameter and successively decreases, and the collection after obtaining and successively decrease in each target period function set
The identical periodic function mark of parameter is closed, as target period function identification.
6. a kind of processor-based data processing equipment, which is characterized in that including:
Corresponding hold is respectively set for multiple periodic function set to be arranged, and for each periodic function set in data setup module
The row period, and at least one periodic function is set in each periodic function set;Each periodic function corresponds to a cycle function mark
Know;Each execution period is different;
Time length comparison module, the current operation duration for obtaining processor, and the current operation duration is executed into week with each
Phase is compared, and the periodic function set that comparison result is met to preset time conditions is determined as target period collection of functions
It closes;
Parameter update module, for being updated to the corresponding lumped parameter of each target period function set, and described
Periodic function mark identical with updated lumped parameter is obtained in each target period function set, as target period function
Mark;
Function execution module, for it is synchronous execute that the corresponding periodic function of each target period function identification included it is multiple
Power function.
7. device according to claim 6, which is characterized in that the data setup module, including:
Correspondence is respectively set for multiple periodic function set to be arranged, and for each periodic function set in function set setting unit
The execution period;
Mapping relations establish unit, for obtaining each power function corresponding preset cycle of operation, and according to each operation
Period determines the running priority grade of each power function in the processor, and establish each running priority grade and each execution period it
Between mapping table;
Period determination unit is executed, for according to the corresponding running priority grade of each power function, in mapping pass
It is that each power function corresponding execution period is determined in table;
Power function allocation unit has the corresponding execution period for will have the identical power function for executing the period to be added to
In periodic function set, and at least one periodic function is set in each periodic function set, and will be in each periodic function set
Power function distribute into affiliated each periodic function.
8. device according to claim 6, which is characterized in that the time length comparison module, including:
Duration acquiring unit, the current operation duration for obtaining processor, and read the execution period of each periodic function set;
Time length comparison unit for the current operation duration to be compared with each execution period, and is generated and is respectively held with described
Row period corresponding comparison result;
Condition meets unit, and the comparison result for by the current operation duration being the integral multiple for executing the period is determined as meeting
The target comparison result of preset time conditions;
Target collection determination unit, the execution period corresponding periodic function set for being included by the target comparison result
It is determined as target period function set.
9. device according to claim 8, which is characterized in that the time length comparison module further includes:
Memory releasing unit, for when detect the current operation duration be not up to it is described it is each execute the period integral multiple when,
It determines that each comparison result is unsatisfactory for preset time conditions, and discharges the money of the memory corresponding to each periodic function set
Source.
10. device according to claim 6, which is characterized in that the parameter update module, including:
Lumped parameter acquiring unit, for obtaining the corresponding lumped parameter of each target period function set and each mesh
Mark the corresponding periodic function mark of each periodic function in periodic function set;
Update mode acquiring unit, for the update mode that gets parms;
It is incremented by updating unit, if being parameter incremental manner for the parameter update mode, according to the parameter incremental manner
The corresponding lumped parameter of each target period function set is incremented by, and in each target period function set
Middle acquisition be incremented by after lumped parameter identical periodic function mark, as target period function identification;
Successively decrease updating unit, if being parameter decreasing fashion for the parameter update mode, according to the parameter decreasing fashion
Successively decrease to the corresponding lumped parameter of each target period function set, and in each target period function set
Middle acquisition with successively decrease after lumped parameter identical periodic function mark, as target period function identification.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2017/100503 WO2019047009A1 (en) | 2017-09-05 | 2017-09-05 | Processor-based data processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108701030A true CN108701030A (en) | 2018-10-23 |
CN108701030B CN108701030B (en) | 2022-05-27 |
Family
ID=63844158
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201780011703.6A Active CN108701030B (en) | 2017-09-05 | 2017-09-05 | Data processing method and device based on processor |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108701030B (en) |
WO (1) | WO2019047009A1 (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080282246A1 (en) * | 2007-05-07 | 2008-11-13 | Danny Dolev | Compiler aided ticket scheduling of tasks in a computing system |
US20090279091A1 (en) * | 2008-05-09 | 2009-11-12 | Kla-Tencor Corporation | Target design and methods for scatterometry overlay determination |
JP2012027831A (en) * | 2010-07-27 | 2012-02-09 | Yokogawa Electric Corp | Sequence controller |
US20130100427A1 (en) * | 2011-10-24 | 2013-04-25 | Asml Netherlands B.V. | Metrology Method and Apparatus, and Device Manufacturing Method |
CN103927180A (en) * | 2014-04-21 | 2014-07-16 | 广州市久邦数码科技有限公司 | Implementation method for functional plug-ins based on Android system and system of functional plug-ins based on Android system |
CN104521276A (en) * | 2012-08-08 | 2015-04-15 | Sk电信有限公司 | Adaptive non-real-time traffic control method and terminal for same |
CN105701004A (en) * | 2014-11-28 | 2016-06-22 | 深圳市腾讯计算机系统有限公司 | Application test method and apparatus |
US20160259642A1 (en) * | 2015-03-03 | 2016-09-08 | Zodiac Aerotechnics | Method of sequencing execution commands, execution method, computer program and integrated circuit |
CN106055075A (en) * | 2016-05-31 | 2016-10-26 | 广东欧珀移动通信有限公司 | Method and device for closing sensors |
CN106911587A (en) * | 2017-03-16 | 2017-06-30 | 恒生电子股份有限公司 | Trading volume control method and device |
CN106970835A (en) * | 2017-03-20 | 2017-07-21 | 华侨大学 | Fixed priority resource limited system level energy consumption optimization method |
CN107124458A (en) * | 2017-04-27 | 2017-09-01 | 大连云动力科技有限公司 | Intellisense equipment and sensory perceptual system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101201594A (en) * | 2007-11-21 | 2008-06-18 | 天津理工大学 | Control method for electric actuating mechanism based on CMX-RTOS built-in real-time operating system |
CN101266556A (en) * | 2008-05-09 | 2008-09-17 | 北京泰得思达科技发展有限公司 | Multitask scheduling system |
US9459890B2 (en) * | 2008-07-10 | 2016-10-04 | Mentor Graphics Corporation | Controlling real time during embedded system development |
CN105204933A (en) * | 2015-09-18 | 2015-12-30 | 上海斐讯数据通信技术有限公司 | Multitask switching execution method based on single process, multitask switching execution system based on single process and processor |
-
2017
- 2017-09-05 CN CN201780011703.6A patent/CN108701030B/en active Active
- 2017-09-05 WO PCT/CN2017/100503 patent/WO2019047009A1/en active Application Filing
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080282246A1 (en) * | 2007-05-07 | 2008-11-13 | Danny Dolev | Compiler aided ticket scheduling of tasks in a computing system |
US20090279091A1 (en) * | 2008-05-09 | 2009-11-12 | Kla-Tencor Corporation | Target design and methods for scatterometry overlay determination |
JP2012027831A (en) * | 2010-07-27 | 2012-02-09 | Yokogawa Electric Corp | Sequence controller |
US20130100427A1 (en) * | 2011-10-24 | 2013-04-25 | Asml Netherlands B.V. | Metrology Method and Apparatus, and Device Manufacturing Method |
CN104521276A (en) * | 2012-08-08 | 2015-04-15 | Sk电信有限公司 | Adaptive non-real-time traffic control method and terminal for same |
CN103927180A (en) * | 2014-04-21 | 2014-07-16 | 广州市久邦数码科技有限公司 | Implementation method for functional plug-ins based on Android system and system of functional plug-ins based on Android system |
CN105701004A (en) * | 2014-11-28 | 2016-06-22 | 深圳市腾讯计算机系统有限公司 | Application test method and apparatus |
US20160259642A1 (en) * | 2015-03-03 | 2016-09-08 | Zodiac Aerotechnics | Method of sequencing execution commands, execution method, computer program and integrated circuit |
CN106055075A (en) * | 2016-05-31 | 2016-10-26 | 广东欧珀移动通信有限公司 | Method and device for closing sensors |
CN106911587A (en) * | 2017-03-16 | 2017-06-30 | 恒生电子股份有限公司 | Trading volume control method and device |
CN106970835A (en) * | 2017-03-20 | 2017-07-21 | 华侨大学 | Fixed priority resource limited system level energy consumption optimization method |
CN107124458A (en) * | 2017-04-27 | 2017-09-01 | 大连云动力科技有限公司 | Intellisense equipment and sensory perceptual system |
Non-Patent Citations (1)
Title |
---|
吴荣华等: "基于中断的实时任务调度策略", 《计算机应用与软件》 * |
Also Published As
Publication number | Publication date |
---|---|
WO2019047009A1 (en) | 2019-03-14 |
CN108701030B (en) | 2022-05-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6104359B2 (en) | Apparatus and method for bandwidth efficient scheduler | |
EP3454210B1 (en) | Prescriptive analytics based activation timetable stack for cloud computing resource scheduling | |
CN104967731B (en) | A kind of terminal notifying method and terminal | |
CN105094826B (en) | The response method and its device of interactive interface view in client terminal system | |
CN109700383A (en) | Clean method, robot and the terminal device of robot | |
CN107729063A (en) | Call method, device and the terminal of SDK | |
US8930965B1 (en) | Event-driven state-machine sequencer | |
CN105843731A (en) | Methods and computer systems for performance monitoring of tasks | |
CN107396445A (en) | A kind of information reporting dispatching method, system, host device and slave devices | |
CN107436839B (en) | Process load acquisition method, electronic terminal and computer readable storage medium | |
CN108701030A (en) | A kind of processor-based data processing method and device | |
CN106775620A (en) | A kind of timing method and device | |
CN106896956B (en) | The implementation method of multi-point touch under one kind " road " system | |
CN110794759B (en) | PLC task scheduling method and device | |
Li et al. | Energy-efficient channel hopping protocol for cognitive radio networks | |
CN103324469A (en) | Timer implementation method and device | |
CN107608723A (en) | One kind application alignment awakening method, terminal and computer-readable recording medium | |
CN109144881A (en) | Monkey test method, device, terminal device and storage medium | |
CN105205723A (en) | Modeling method and device based on social application | |
CN107292142A (en) | Business operation processing method, business operation processing unit and service terminal | |
CN104156180A (en) | Data reading method and terminal equipment | |
CN106488515B (en) | A kind of timer, baseband chip and its sleep state switching method | |
CN111465087B (en) | Task scheduling processing method, device, storage medium, processor and system | |
CN107730845A (en) | Article losing-proof method, apparatus and terminal device | |
CN113055099B (en) | Detection method and device of clock gating module |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |