CN101996100B - Task management method and device used for mobile terminal development system - Google Patents

Task management method and device used for mobile terminal development system Download PDF

Info

Publication number
CN101996100B
CN101996100B CN2010105675683A CN201010567568A CN101996100B CN 101996100 B CN101996100 B CN 101996100B CN 2010105675683 A CN2010105675683 A CN 2010105675683A CN 201010567568 A CN201010567568 A CN 201010567568A CN 101996100 B CN101996100 B CN 101996100B
Authority
CN
China
Prior art keywords
task
time interval
repeating query
timer
pool
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.)
Active
Application number
CN2010105675683A
Other languages
Chinese (zh)
Other versions
CN101996100A (en
Inventor
陈晓辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nantong same Trading Co., Ltd.
Original Assignee
Shenzhen Wuju Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Wuju Technology Co Ltd filed Critical Shenzhen Wuju Technology Co Ltd
Priority to CN2010105675683A priority Critical patent/CN101996100B/en
Publication of CN101996100A publication Critical patent/CN101996100A/en
Application granted granted Critical
Publication of CN101996100B publication Critical patent/CN101996100B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to a task management method and device used for a mobile terminal development system. The task management method comprises the following steps of: firstly, establishing at least two timers with round robin time intervals of different precisions and task pools respectively corresponding to the timers; secondly, sequentially comparing the execution time interval of an application task with the round robin task time interval of the timer for each application task, and distributing to the corresponding task pool according to a comparison result; and thirdly, carrying out round robin on the task pool corresponding to the timer according to the round robin time interval set by the timer, and performing a task reaching the execution time in the task pool. After the task management method and device are utilized, a plurality of development tasks can be effectively managed and called during the development of a mobile terminal application program.

Description

A kind of task management method and device that is used for the portable terminal development system
Technical field
The present invention relates to portable terminal development system field, particularly relate to a kind of task management method and device that is used for the portable terminal development system.
Background technology
At present, along with the continuous development of mobile communication technology, mobile communication terminals such as mobile phone are not only the instrument of user's daily life and business, and in user's daily amusement, occupy an important position.Here, the alleged portable terminal of the present invention is meant that mobile phone, personal digital assistant (PDA, PersonalDigital Assistant) etc. have the small hand-held formula mobile communication equipment of wireless communication function.By mobile Internet business, the user can operate with the amusements that mobile phone carry out on PC, could accomplishing before many, like the website on the view Internet, onlinely watch various audio-video documents, carry out community's friend-making etc.
For the user demand that cooperates people to become increasingly abundant; The various application programs that function are provided for portable terminal are also in continuing exploitation; Development platform on the portable terminal generally comprises MTK, WIN32, spreadtrum, MStar or the like, and the requirement of different platforms system application programs operation is not quite similar.And, in the development system of application program, need a lot of development tasks of management simultaneously.Therefore, need a kind of method and apparatus that can manage and call each task rationally and effectively.
Summary of the invention
To defective that exists in the prior art and deficiency, the present invention proposes a kind of method and apparatus, makes when application program for mobile terminal is developed, can manage effectively each task.
To achieve these goals, the present invention proposes a kind of task management method that is used for the portable terminal development system, and said task management method comprises:
Step 1: set up the timer at least two repeating query time intervals with different accuracy and the task pool corresponding respectively with said timer;
Step 2: for each application task, successively the execution time interval of application task and the repeating query of timer are compared task time at interval,, be dispensed to corresponding task pool according to comparative result;
Step 3:, carry out in the said task pool to the task of execution time according to the corresponding task pool of the said timer of repeating query time interval repeating query that timer is set.
Preferred as technique scheme, said step 2 comprises:
Step 21: the execution time interval that obtains program task;
Step 22:, the said execution time is compared with the repeating query time interval at interval from the repeating query time interval of minimum precision; If the said execution time at interval greater than the said repeating query time interval, is then created this program task in the pairing task pool of timer of said repeating query time interval correspondence; If the said execution time, then the high-precision repeating query time interval compared again with slightly at interval less than the said repeating query time interval.
Preferred as technique scheme if the said execution time at interval less than the repeating query time interval of full accuracy, is then changed the repeating query time interval of this full accuracy, makes the said execution time at interval greater than repeating query time interval of the full accuracy after the change.
Preferred as technique scheme; Said step 2 also comprises the step of setting the task pool task attribute; Said task attribute comprises: the call back function that the call back function that the current state of task ID, each task executions number of times, each task executions time interval, each task, the time interval number of each task, each task are carried out and each task discharge, wherein said time interval number are the said execution time to round gained divided by the repeating query time interval of timer at interval.
Preferred as technique scheme, in the said step 3, the every repeating query task pool of timer one time subtracts 1 with the time interval number of the task in the task pool, and when the said time interval, number reduced to 0, then this task was to the execution time.
The present invention also proposes a kind of task management device that is used for the portable terminal development system, and said task management device comprises:
Set up timer and task pool module, be used to set up the timer at least two repeating query time intervals with different accuracy and the task pool corresponding respectively with said timer;
The creation task module; Be used for beginning from the repeating query time interval of minimum precision; The task executions time interval and the repeating query time interval are compared: if this task greater than the said repeating query time interval, is then created in interval of said execution time in the pairing task pool of timer of said repeating query time interval correspondence; If the said execution time, then the high-precision repeating query time interval compared again with slightly at interval less than the said repeating query time interval;
Processing module is used for the corresponding task pool of the said timer of repeating query time interval repeating query according to the timer setting, carries out in the said task pool to the task of execution time.
Preferred as technique scheme; Also comprise change repeating query time interval unit in the said creation task module; Be used for as if the repeating query time interval of said execution time interval less than full accuracy; Then change the repeating query time interval of this full accuracy, make the repeating query time interval of said execution time interval greater than the full accuracy after changing.
Preferred as technique scheme; Said device also comprises sets task pool task attribute module; Wherein, Said task attribute comprises: the call back function that the call back function that the current state of task ID, each task executions number of times, each task executions time interval, each task, the time interval number of each task, each task are carried out and each task discharge, wherein said time interval number are the said execution time to round gained divided by the repeating query time interval of timer at interval.
Preferred as technique scheme; Said setting task pool task attribute module also is used for working as the every repeating query task pool of said processing module timer one time; The time interval number of the task in the task pool is subtracted 1, and when the said time interval, number reduced to 0, said processing module was carried out this task.
Preferred as technique scheme, said processing module and creation task module while independent operating.
Timer and the corresponding task pool thereof of the method that the present invention proposes through setting up different accuracy; Can the execution time of a plurality of tasks according to them be assigned in the appropriate task pool at interval rationally, effectively, and automatically carry out repeating query and the task of execution time can be carried out by timer.So the present invention has realized when application program for mobile terminal is developed, a plurality of development tasks being managed effectively and being called.
Below in conjunction with accompanying drawing, specific embodiments of the invention is done further to specify.For the person of ordinary skill in the field, from detailed description of the invention, above-mentioned and other purposes of the present invention, feature and advantage will be obvious.
Description of drawings
Fig. 1 is the preferred embodiment synoptic diagram of the task management method of the present invention's proposition;
Fig. 2 is the specific embodiment synoptic diagram of the task management method of the present invention's proposition;
Fig. 3 is the preferred embodiment synoptic diagram of the task management device of the present invention's proposition.
Embodiment
As shown in Figure 1, the preferred embodiment of the task management method that the present invention proposes comprises:
Step 1: set up the timer at least two repeating query time intervals with different accuracy and the task pool corresponding respectively with said timer;
Step 2: for each application task, successively the execution time interval of application task and the repeating query of timer are compared task time at interval, according to comparative result, be dispensed to corresponding task pool, concrete grammar is:
Begin from the repeating query time interval of minimum precision; The task executions time interval and the repeating query time interval are compared: if this task greater than the said repeating query time interval, is then created in interval of said execution time in the pairing task pool of timer of said repeating query time interval correspondence; If the said execution time, then the high-precision repeating query time interval compared again with slightly at interval less than the said repeating query time interval;
Step 3:, carry out in the said task pool to the task of execution time according to the corresponding task pool of the said timer of repeating query time interval repeating query that timer is set.
In above-mentioned steps 2,, make the repeating query time interval of said execution time interval greater than the full accuracy after changing if the said execution time at interval less than the repeating query time interval of full accuracy, is then changed the repeating query time interval of this full accuracy.
Wherein, Said method also comprises the step of setting the task pool task attribute; Said task attribute comprises: the call back function that the call back function that the current state of task ID, each task executions number of times, each task executions time interval, each task, the time interval number of each task, each task are carried out and each task discharge, wherein said time interval number are the said execution time to round gained divided by the repeating query time interval of timer at interval.The for example a certain task executions time interval is 60MS, is assigned to the task pool of low precision 50MS, then 60 divided by 50 1.2, said task time, space-number was 2.
In step 3, the every repeating query task pool of timer one time, the time interval number of the task in the task pool will subtract 1, and when the said time interval, number reduced to 0, then this task then was to the execution time.
In the technique scheme, said step 2 and said step 3 while independent operating.
Shown in Figure 2 is according to a specific embodiment of the present invention:
Step S1: apply for two timers and for each timer distributes the task pool of a correspondence, and timer and task pool are carried out initialization.
In two timers, one is high-resolution timer, and another is low precision timer; Carry out initialization then, initialization can comprise: for timer distributes ID, set the time interval of repeating query task pool; Set the task pool storage space, timer starts sign or the like.
For example: the time of setting high-resolution timer repeating query task pool is 10MS (promptly every separated 10MS repeating query is its corresponding task pool once), and the task pool space is 3 tasks, and the timer startup is designated True and starts, and Fasle closes; The time of setting low precision timer repeating query task pool is 50MS, and the task pool space is 3 tasks, and the timer startup is designated True and starts, and Fasle closes.During initialization, acquiescence is made as startup with the sign of timer.
Step S2: the execution time interval that obtains the application task of user's establishment.
For example; The execution time that gets access to application task 1 is spaced apart 70MS; The execution time of application task 2 is spaced apart 60MS, and the execution time of application program 3 is spaced apart 50MS, and the execution time of application program 4 is spaced apart 30MS; The execution time of application program 5 is spaced apart 20MS, and the execution time of application program 6 is spaced apart 10MS.
Step S3: for each application task, successively the execution time interval of application task and the repeating query of timer are compared task time at interval, according to comparative result, be dispensed to corresponding task pool, and the task attribute of task pool is set.
In the time of relatively, the timer of elder generation and low precision compares, if the execution time of certain application task is at interval greater than the repeating query time interval of hanging down precision; Then in this task pool, create this application task; If less than the repeating query time interval of low precision, then continuation and high-precision timer compare, if the execution time of this application task is at interval greater than high-precision repeating query interval task time; Then in this task pool, create this task; If ineligible, then change the high-precision repeating query time interval, make task executions interval greater than the high-precision repeating query time interval.
The task attribute of task pool comprises the current state of task ID (for example task 1, task 2, task 3 etc.), each task executions number of times, each task executions time interval, task, the time interval number of each task, the call back function of each task execution and the call back function that each task discharges etc.Wherein, the time interval number of said task is the repeating query time interval resulting number of each task executions time interval divided by timer, if aliquant, then rounds.For example the time interval of application task 2 is 60MS, is assigned to the task pool of low precision, then 60 divided by 50 1.2, said task time, space-number was 2.
The every repeating query task pool of timer one time, then the time interval number of the task in the task pool subtracts 1 automatically.
After task was carried out once, that carries out the number of times correspondence subtracted 1.When the execution number of times was 0, then expression task was finished, and was-1 if carry out number of times, and then expression does not limit the execution number of times.
Step S4: the startup sign through timer judges whether to have started this timer, if then if execution in step S5 not, then finishes;
Step S5: the task pool that scanning is corresponding, judge whether this task pool is empty, if, then close corresponding timer, and the startup sign of timer is done corresponding modification, if not, execution in step S6 then;
Step S6: whether the execution number of times of judging the application task scan is 0, if then the call back function that discharges of calling task is deleted this task from task pool, the task of back moves forward one, if deny, and execution in step S7 then;
Step S7: whether judge the application task that scans to the execution time, if, then carry out step S8, if not, then continue the task of scanning back; Wherein, judge the application task scan whether to the concrete mode of execution time be: judge task time, whether interval counter was 0;
Step S8: call the corresponding execution call back function of this application task, carry out this task, and in task list, change the corresponding state of this task.
In above-mentioned steps, the user can add new task, and the time interval of new application task execution and the repeating query of timer are compared task time at interval; According to comparative result; Be dispensed to corresponding task pool, the attribute of this task is set, the position of getting the last place side by side.
Timer and the corresponding task pool thereof of the method that the present invention proposes through setting up different accuracy; Can the execution time of a plurality of tasks according to them be assigned in the appropriate task pool at interval rationally, effectively, and automatically carry out repeating query and the task of execution time can be carried out by timer.So the present invention has realized when application program for mobile terminal is developed, a plurality of development tasks being managed effectively and being called.
Corresponding to said method, the present invention also proposes a kind of task management device that is used for the portable terminal development system, and is as shown in Figure 3, and said task management device comprises:
Set up timer and task pool module 31, be used to set up the timer at least two repeating query time intervals with different accuracy and the task pool corresponding respectively with said timer;
Creation task module 32; Be used for beginning from the repeating query time interval of minimum precision; The task executions time interval and the repeating query time interval are compared: if this task greater than the said repeating query time interval, is then created in interval of said execution time in the pairing task pool of timer of said repeating query time interval correspondence; If the said execution time, then the high-precision repeating query time interval compared again with slightly at interval less than the said repeating query time interval;
Processing module 33 is used for the corresponding task pool of the said timer of repeating query time interval repeating query according to the timer setting, carries out in the said task pool to the task of execution time.
Wherein, Also comprise change repeating query time interval unit in the said creation task module; Be used for as if the repeating query time interval of said execution time interval less than full accuracy; Then change the repeating query time interval of this full accuracy, make the repeating query time interval of said execution time interval greater than the full accuracy after changing.
Wherein, Said device can also comprise sets task pool task attribute module; Wherein, Said task attribute comprises: the call back function that the call back function that the current state of task ID, each task executions number of times, each task executions time interval, each task, the time interval number of each task, each task are carried out and each task discharge, wherein said time interval number are the said execution time to round gained divided by the repeating query time interval of timer at interval.
Said setting task pool task attribute module also is used for when the every repeating query task pool of said processing module timer one time, and the time interval number of the task in the task pool is subtracted 1, and when the said time interval, number reduced to 0, said processing module was carried out this task.
Said processing module and creation task module be independent operating simultaneously.
Though; The present invention clearly demonstrates through above embodiment and accompanying drawing thereof; Yet under the situation that does not deviate from spirit of the present invention and essence thereof; The person of ordinary skill in the field works as can make various corresponding variations and correction according to the present invention, but these corresponding variations and correction all should belong to the protection domain of claim of the present invention.

Claims (7)

1. a task management method that is used for the portable terminal development system is characterized in that, said task management method comprises:
Step 1: set up the timer at least two repeating query time intervals with different accuracy and the task pool corresponding respectively with said timer;
Step 2: for each application task, successively the execution time interval of application task and the repeating query of timer are compared task time at interval,, be dispensed to corresponding task pool according to comparative result;
Said step 2 specifically comprises:
Step 21: the execution time interval that obtains program task;
Step 22:, the said execution time is compared with the repeating query time interval at interval from the repeating query time interval of minimum precision; If the said execution time at interval greater than the said repeating query time interval, is then created this program task in the pairing task pool of timer of said repeating query time interval correspondence; If the said execution time is at interval less than the said repeating query time interval; Then the high-precision repeating query time interval compares again with slightly; If said execution time interval is less than the repeating query time interval of full accuracy; Then change the repeating query time interval of this full accuracy, make the repeating query time interval of said execution time interval greater than the full accuracy after changing;
Step 3:, carry out in the said task pool to the task of execution time according to the corresponding task pool of the said timer of repeating query time interval repeating query that timer is set.
2. task management method according to claim 1; It is characterized in that; Said step 2 also comprises the step of setting the task pool task attribute; Said task attribute comprises: the call back function that the call back function that the current state of task ID, each task executions number of times, each task executions time interval, each task, the time interval number of each task, each task are carried out and each task discharge, wherein said time interval number are the said execution time to round gained divided by the repeating query time interval of timer at interval.
3. according to the said task management method of claim 1, it is characterized in that in the said step 3, the every repeating query task pool of timer one time subtracts 1 with the time interval number of the task in the task pool, when the said time interval, number reduced to 0, then this task was to the execution time.
4. a task management device that is used for the portable terminal development system is characterized in that, said task management device comprises:
Set up timer and task pool module, be used to set up the timer at least two repeating query time intervals with different accuracy and the task pool corresponding respectively with said timer;
The creation task module; Be used for beginning from the repeating query time interval of minimum precision; The task executions time interval and the repeating query time interval are compared: if this task greater than the said repeating query time interval, is then created in interval of said execution time in the pairing task pool of timer of said repeating query time interval correspondence; If the said execution time is at interval less than the said repeating query time interval; Then the high-precision repeating query time interval compares again with slightly; Also comprise change repeating query time interval unit in the said creation task module; Be used for making the repeating query time interval of said execution time interval greater than the full accuracy after changing if the said execution time at interval less than the repeating query time interval of full accuracy, is then changed the repeating query time interval of this full accuracy;
Processing module is used for the corresponding task pool of the said timer of repeating query time interval repeating query according to the timer setting, carries out in the said task pool to the task of execution time.
5. task management device according to claim 4; It is characterized in that; Said device also comprises sets task pool task attribute module; Wherein, Said task attribute comprises: the call back function that the call back function that the current state of task ID, each task executions number of times, each task executions time interval, each task, the time interval number of each task, each task are carried out and each task discharge, wherein said time interval number are the said execution time to round gained divided by the repeating query time interval of timer at interval.
6. according to the said task management device of claim 4; It is characterized in that; Said setting task pool task attribute module also is used for working as the every repeating query task pool of said processing module timer one time; The time interval number of the task in the task pool is subtracted 1, and when the said time interval, number reduced to 0, said processing module was carried out this task.
7. task management device according to claim 4 is characterized in that, said processing module and creation task module be independent operating simultaneously.
CN2010105675683A 2010-11-30 2010-11-30 Task management method and device used for mobile terminal development system Active CN101996100B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105675683A CN101996100B (en) 2010-11-30 2010-11-30 Task management method and device used for mobile terminal development system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105675683A CN101996100B (en) 2010-11-30 2010-11-30 Task management method and device used for mobile terminal development system

Publications (2)

Publication Number Publication Date
CN101996100A CN101996100A (en) 2011-03-30
CN101996100B true CN101996100B (en) 2012-11-07

Family

ID=43786283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105675683A Active CN101996100B (en) 2010-11-30 2010-11-30 Task management method and device used for mobile terminal development system

Country Status (1)

Country Link
CN (1) CN101996100B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104376407A (en) * 2014-11-06 2015-02-25 河南智业科技发展有限公司 Task allocation application system and method
CN105204926B (en) * 2015-09-02 2020-06-02 Tcl移动通信科技(宁波)有限公司 Mobile terminal and multi-background program operation control method and system thereof
CN107688634A (en) * 2017-08-22 2018-02-13 阿里巴巴集团控股有限公司 Method for writing data and device, electronic equipment
CN112882803B (en) * 2021-03-08 2024-05-14 万维云网(北京)数据科技有限公司 Data processing method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1485727A (en) * 2002-09-23 2004-03-31 ��Ϊ�������޹�˾ Device data polling dispatching method
CN1852131A (en) * 2005-07-06 2006-10-25 华为技术有限公司 Timer scheduling method
US7500241B1 (en) * 2003-10-10 2009-03-03 Avaya Inc. Method and apparatus for scheduling tasks

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1485727A (en) * 2002-09-23 2004-03-31 ��Ϊ�������޹�˾ Device data polling dispatching method
US7500241B1 (en) * 2003-10-10 2009-03-03 Avaya Inc. Method and apparatus for scheduling tasks
CN1852131A (en) * 2005-07-06 2006-10-25 华为技术有限公司 Timer scheduling method

Also Published As

Publication number Publication date
CN101996100A (en) 2011-03-30

Similar Documents

Publication Publication Date Title
CN103037064B (en) Individual screen unlocking method and system thereof
CN106569585B (en) A kind of method and terminal managing program process
CN101996100B (en) Task management method and device used for mobile terminal development system
CN101067777A (en) A terminal menu displaying method and terminal equipment
CN100589644C (en) Calling process system and method thereof
US20090298463A1 (en) System and method for searching for most economical call mode
KR101842558B1 (en) Roaming network access method and apparatus
US20120054065A1 (en) System and method for service recommendation
CN101866287A (en) Widget system appearance setting method and device
CN102710864B (en) Method for playing incoming call ringtone
CN201733355U (en) Mobile communication terminal for dialing telephone by utilizing gravity sensor
CN105337844A (en) Method and device for displaying message and electronic equipment
CN101815125A (en) Method, device and mobile terminal for searching contact person
CN106231586A (en) A kind of multi-card terminal and communication means thereof
CN101980452A (en) Method for mounting mobile phone software by Bluetooth
CN101778157A (en) Management method of SP menus of mobile phones
CN101518036B (en) Communication device and communication method
CN103347124B (en) A kind of method, device and terminal equipment preventing by mistake hanging up
CN102890801A (en) Method and device for text prompting
CN102185976A (en) Method and device for quickly invoking intelligent card application program
CN101212505A (en) Quick phone book searching method and device on communication terminal
US9495662B2 (en) Method and apparatus for storing telephone numbers in a portable terminal
CN102110165B (en) Method and system for scheduling interior of browser of mobile terminal
CN101651865B (en) Method and terminal for calling number in multi-mode terminal
CN108182122B (en) Application update reminding method and device, storage medium and server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: NANTONG JIUWUBA TECHNOLOGY BUSINESS INCUBATOR CO.,

Free format text: FORMER OWNER: SHENZHOU WUJU TECHNOLOGY CO., LTD.

Effective date: 20141211

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 518040 SHENZHEN, GUANGDONG PROVINCE TO: 226300 NANTONG, JIANGSU PROVINCE

TR01 Transfer of patent right

Effective date of registration: 20141211

Address after: 226300 Industrial Park, Jinsha Town, Nantong, Jiangsu, Tongzhou District

Patentee after: SUZHOU HENGKANG NEW MATERIAL CO., LTD.

Address before: 518040, Shenzhen, Guangdong, Futian District, Tian An digital city innovation science and Technology Plaza, two west seat, room 1203

Patentee before: Shenzhou Wuju Technology Co., Ltd.

TR01 Transfer of patent right

Effective date of registration: 20170615

Address after: 226300 Jinsha Industrial Zone, Jinsha Town, Nantong, Jiangsu, Tongzhou District

Patentee after: Nantong same Trading Co., Ltd.

Address before: 226300 Industrial Park, Jinsha Town, Nantong, Jiangsu, Tongzhou District

Patentee before: SUZHOU HENGKANG NEW MATERIAL CO., LTD.

TR01 Transfer of patent right