CN103293967A - Multi-task control method for intelligent meter reading terminal - Google Patents

Multi-task control method for intelligent meter reading terminal Download PDF

Info

Publication number
CN103293967A
CN103293967A CN2012100487865A CN201210048786A CN103293967A CN 103293967 A CN103293967 A CN 103293967A CN 2012100487865 A CN2012100487865 A CN 2012100487865A CN 201210048786 A CN201210048786 A CN 201210048786A CN 103293967 A CN103293967 A CN 103293967A
Authority
CN
China
Prior art keywords
task
intelligent meter
priority
current
enters
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.)
Pending
Application number
CN2012100487865A
Other languages
Chinese (zh)
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.)
SHAANXI REGIONAL ELECTRIC POWER GROUP CO Ltd
Original Assignee
SHAANXI REGIONAL ELECTRIC POWER GROUP 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 SHAANXI REGIONAL ELECTRIC POWER GROUP CO Ltd filed Critical SHAANXI REGIONAL ELECTRIC POWER GROUP CO Ltd
Priority to CN2012100487865A priority Critical patent/CN103293967A/en
Publication of CN103293967A publication Critical patent/CN103293967A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a multi-task control method for an intelligent meter reading terminal. The multi-task control method for the intelligent meter reading terminal comprises a first step of establishing tasks, respectively allocating different priorities to all the tasks, and enabling each task to be independent of other tasks, a second step of dividing the processing process of the tasks into 5 states including a dormant state, a ready state, an operation state, a waiting state and an interrupted state, a third step of detecting the state of each task, enabling the task which has the highest priority and is in the ready state to be a current task, enabling the current task to operate in the operation state, and enabling the current task to enter the dormant state after operation of the current task is finished. According to the multi-task control method for the intelligent meter reading terminal, the priority of each task of the intelligent meter reading terminal is established, tasks are made to conduct the 5 states according to the sequence of the priorities based on the five states, multiple tasks can be processed simultaneously, a CPU is made can be used to the maximum extent, the processing speed is higher, and reliability is higher.

Description

A kind of multi-task controlling method for the intelligent meter data recording terminal
Technical field:
The present invention relates to electric energy meter control field, specifically is a kind of multi-task controlling method for the intelligent meter data recording terminal.
Background technology:
The intelligent power table is a kind of metering outfit to measure by peak interval of time, and it can also reflect situations such as present load, peak load time of occurrence, phase failure decompression simultaneously.In order to need a kind of intelligent meter data recording terminal to finish this work timely and effectively with these data back power departments.This intelligent meter data recording terminal needs a lot of functions, as: except last form data content, also need some table data are handled, show at the local facilities panel, as, the meter reading that can show zero point every day freezes value, can also show power etc., so needs to handle simultaneously a lot of tasks in the program of this intelligent meter data recording terminal.
At present, the peripheral hardware of controlling in the common electric energy meter and fulfiling of task are few, it generally is the subroutine module (backstage behavior) that adopts a major cycle and several sequence calls in its control program, handle asynchronous event (foreground behavior) by Terminal Service, this control method also becomes the AM/BAM pattern.This method can be handled uncomplicated mini system, and when handling the task of above-mentioned intelligent meter data recording terminal following deficiency is just arranged:
The first, interrupt can not get timely response, the processing time is long, and this is for being unallowed under the occasion of checking meter.
The second, because the task of intelligent meter data recording terminal is too much, therefore the various possibilities that will consider are also more, if therefore the scheduling of the cpu resource of single-chip microcomputer is improper deadlock will take place, and reduce the reliability of software, cause the failure rate of intelligent meter data recording terminal higher.
Therefore, be badly in need of at present a kind of can be according to a kind of multi-task controlling method for the intelligent meter data recording terminal of actual conditions true-time operation multitask.
Summary of the invention:
The technical problem to be solved in the present invention is, overcome existing technological deficiency, provide a kind of Processing tasks speed fast, the cpu resource utilization factor is improved, thereby and make the high a kind of multi-task controlling method for the intelligent meter data recording terminal of application software moduleization reliability.
Technical solution of the present invention is, a kind of multi-task controlling method for the intelligent meter data recording terminal is provided, and it may further comprise the steps:
Step 1 is set up task, and distributes different priority for respectively each task, and is independent of one another between each task;
Step 2 is divided into 5 states with the task handling process: be respectively dormant state, ready attitude, run mode, waiting state and be interrupted attitude;
Step 3, detecting the highest and task that be in ready attitude of state, the priority of each task is current task, enters into the run mode operation, after current task has been moved, enters dormant state.
Above-mentioned a kind of multi-task controlling method for the intelligent meter data recording terminal, described step 3 also comprises: detects in real time and interrupts, if occur interrupting, outage then, current task enters and is interrupted attitude, and after interrupting finishing dealing with, current task continues operation.
Above-mentioned a kind of multi-task controlling method for the intelligent meter data recording terminal, when if described interruption makes a task higher than current task priority enter ready attitude, after interruption is finished dealing with, interrupted task is in waiting state, the task higher than current task priority enters the run mode operation, after operation was finished, interrupted task entered ready attitude.
Above-mentioned a kind of multi-task controlling method for the intelligent meter data recording terminal, when if current task makes the higher task of another priority enter ready attitude when run mode, then current task enters into waiting state, the task that another priority is higher enters the run mode operation, after finishing, current task enters ready attitude.
Above-mentioned a kind of multi-task controlling method for the intelligent meter data recording terminal, setting up in the described step 1 of task according to priority is followed successively by from high to low: desktop task, master menu task, user management task, the task of checking meter, system arrange task, system time task, system tool task, system information task, button task.
After adopting said structure, the present invention has the following advantages:
The present invention is with the various task creation priority of intelligent meter data recording terminal, according to 5 states setting task is carried out according to priority orders then, can handle multitask simultaneously, make the utilization factor of CPU obtain maximum performance, processing speed is faster, and owing to be to set 5 states, therefore program can modularization programming when software programming, the developer can be with the application program levelization of complexity, and convenient programming makes making software be more prone to design and safeguards that reliability is higher.And in the present invention, interruption is handled at first, and after interrupting handling, carries out Processing tasks according to priority once more, and interruption can in time respond, and the task that current priority is the highest also can in time be handled.
Description of drawings:
Fig. 1 is the process flow diagram of a kind of multi-task controlling method embodiment 1 for the intelligent meter data recording terminal of the present invention.
Fig. 2 is the process flow diagram of a kind of multi-task controlling method embodiment 2 for the intelligent meter data recording terminal of the present invention.
Fig. 3 is the process flow diagram of a kind of multi-task controlling method embodiment 3 for the intelligent meter data recording terminal of the present invention.
Embodiment:
The present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
As shown in Figure 1, the invention provides a kind of multi-task controlling method for the intelligent meter data recording terminal, it may further comprise the steps:
Step 1, set up task, and distribute different priority for respectively each task, independent of one another between each task; The foundation of task is to come from the bottom layer driving of meter reading terminal, described bottom layer driving comprises the LCD display driver, UART drives, HC drives, RTC drives, button drives, program distributes different priority for according to actual needs different tasks, the task of Jian Liing is 9 in the method, and its priority is followed successively by from high to low: desktop task, master menu task, user management task, the task of checking meter, system arrange task, system time task, system tool task, system information task, button task.
Step 2, the task handling process is divided into 5 states: be respectively dormant state, ready attitude, run mode, waiting state and be interrupted attitude;
Step 3, detect each task state, to set the highest and task that be in ready attitude of priority this moment be current task, enters into the run mode operation, after current task has been moved, enters dormant state.
On basis embodiment illustrated in fig. 1, further comprise as shown in Figure 2: task detected in real time and interrupts in when operation, if occur interrupting, and preferential outage then, current task entered and was interrupted attitude this moment, and after interrupting handling, current task continues operation.
On basis embodiment illustrated in fig. 2, further comprise as shown in Figure 3: when making a task higher than current task priority enter ready attitude as if interruption, after interrupting handling, interrupted task enters waiting state, the task higher than current task priority enters the run mode operation, after finishing, interrupted task enters ready attitude; Further, when making the higher task of another priority enter ready attitude when run mode as if current task, then current task enters into waiting state, and the task that another priority is higher enters the run mode operation, and after finishing, current task enters ready attitude.
Dormant state refers to that task temporarily can not move in the step (1), and ready attitude refers to task ready can the operation, run mode refers to that task moves, waiting state is the task suspension operation and waits for next instruction, is interrupted attitude and refers to that task is interrupted, the follow-up reforwarding row of End of Interrupt.

Claims (5)

1. multi-task controlling method that is used for the intelligent meter data recording terminal is characterized in that:
Step 1 is set up task, and distributes different priority for respectively each task, and is independent of one another between each task;
Step 2 is divided into 5 states with the task handling process: be respectively dormant state, ready attitude, run mode, waiting state and be interrupted attitude;
Step 3, detecting the highest and task that be in ready attitude of state, the priority of each task is current task, enters into the run mode operation, after current task has been moved, enters dormant state.
2. a kind of multi-task controlling method for the intelligent meter data recording terminal according to claim 1, it is characterized in that: described step 3 also comprises: detect in real time and interrupt, interrupt if occur, outage then, current task enters and is interrupted attitude, and after interrupting finishing dealing with, current task continues operation.
3. a kind of multi-task controlling method for the intelligent meter data recording terminal according to claim 2, it is characterized in that: when making a task higher than current task priority enter ready attitude as if interruption, after interruption is finished dealing with, interrupted task is in waiting state, the task higher than current task priority enters the run mode operation, after operation was finished, interrupted task entered ready attitude.
4. according to the arbitrary described a kind of multi-task controlling method for the intelligent meter data recording terminal of claim 1-3, it is characterized in that: when when run mode, making the higher task of another priority enter ready attitude as if current task, then current task enters into waiting state, the task that another priority is higher enters the run mode operation, after finishing, current task enters ready attitude.
5. according to the arbitrary described a kind of multi-task controlling method for the intelligent meter data recording terminal of claim 1-3, it is characterized in that: setting up in the described step 1 of task according to priority is followed successively by from high to low: desktop task, master menu task, user management task, the task of checking meter, system arrange task, system time task, system tool task, system information task, button task.
CN2012100487865A 2012-02-29 2012-02-29 Multi-task control method for intelligent meter reading terminal Pending CN103293967A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012100487865A CN103293967A (en) 2012-02-29 2012-02-29 Multi-task control method for intelligent meter reading terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012100487865A CN103293967A (en) 2012-02-29 2012-02-29 Multi-task control method for intelligent meter reading terminal

Publications (1)

Publication Number Publication Date
CN103293967A true CN103293967A (en) 2013-09-11

Family

ID=49095039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012100487865A Pending CN103293967A (en) 2012-02-29 2012-02-29 Multi-task control method for intelligent meter reading terminal

Country Status (1)

Country Link
CN (1) CN103293967A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106054723A (en) * 2016-06-28 2016-10-26 厦门宏发开关设备有限公司 Intelligent comprehensive protection switch task scheduling system
CN106980536A (en) * 2017-03-24 2017-07-25 中南大学 The program scheduler method of data acquisition monitor
CN107146395A (en) * 2017-06-13 2017-09-08 珠海慧信微电子有限公司 The kilowatt meter reading-out system and meter register method communicated based on bandwidth carrier
CN108108236A (en) * 2017-12-19 2018-06-01 宁波三星医疗电气股份有限公司 A kind of efficient meter register method for electric power acquisition terminal
CN109240813A (en) * 2018-08-21 2019-01-18 广东工业大学 Task schedule and task immigration method in a kind of mobile cloud computing
CN111784288A (en) * 2020-06-29 2020-10-16 广州华多网络科技有限公司 Task management method, device, system, storage medium and equipment
CN112261509A (en) * 2020-09-08 2021-01-22 宁波三星医疗电气股份有限公司 Meter reading scheduling method for electricity consumption information acquisition terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1038712A (en) * 1988-03-10 1990-01-10 霍尼韦尔有限公司 The operating system that is used for the multi-job operation environment
CN1409209A (en) * 2001-09-24 2003-04-09 深圳市中兴通讯股份有限公司上海第二研究所 Realizing method for multiple task real-time operation system
CN1713138A (en) * 2004-06-15 2005-12-28 中兴通讯股份有限公司 Deadlock solution in multi-task operating system
JP2010044703A (en) * 2008-08-18 2010-02-25 Fujitsu Ltd Method and program for switching task in multi task os
US20110252429A1 (en) * 2010-04-07 2011-10-13 Apple Inc. Opportunistic Multitasking

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1038712A (en) * 1988-03-10 1990-01-10 霍尼韦尔有限公司 The operating system that is used for the multi-job operation environment
CN1409209A (en) * 2001-09-24 2003-04-09 深圳市中兴通讯股份有限公司上海第二研究所 Realizing method for multiple task real-time operation system
CN1713138A (en) * 2004-06-15 2005-12-28 中兴通讯股份有限公司 Deadlock solution in multi-task operating system
JP2010044703A (en) * 2008-08-18 2010-02-25 Fujitsu Ltd Method and program for switching task in multi task os
US20110252429A1 (en) * 2010-04-07 2011-10-13 Apple Inc. Opportunistic Multitasking

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王磊: "基于GPRS的嵌入式远程抄表监控系统的研究", 《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106054723A (en) * 2016-06-28 2016-10-26 厦门宏发开关设备有限公司 Intelligent comprehensive protection switch task scheduling system
CN106054723B (en) * 2016-06-28 2019-03-08 厦门宏发开关设备有限公司 A kind of intelligent comprehensive protective switch task scheduling system
CN106980536A (en) * 2017-03-24 2017-07-25 中南大学 The program scheduler method of data acquisition monitor
CN106980536B (en) * 2017-03-24 2018-07-31 中南大学 Data acquire the program scheduler method of monitor
CN107146395A (en) * 2017-06-13 2017-09-08 珠海慧信微电子有限公司 The kilowatt meter reading-out system and meter register method communicated based on bandwidth carrier
CN108108236A (en) * 2017-12-19 2018-06-01 宁波三星医疗电气股份有限公司 A kind of efficient meter register method for electric power acquisition terminal
CN109240813A (en) * 2018-08-21 2019-01-18 广东工业大学 Task schedule and task immigration method in a kind of mobile cloud computing
CN109240813B (en) * 2018-08-21 2021-12-24 广东工业大学 Task scheduling and task migration method in mobile cloud computing
CN111784288A (en) * 2020-06-29 2020-10-16 广州华多网络科技有限公司 Task management method, device, system, storage medium and equipment
CN112261509A (en) * 2020-09-08 2021-01-22 宁波三星医疗电气股份有限公司 Meter reading scheduling method for electricity consumption information acquisition terminal
CN112261509B (en) * 2020-09-08 2023-04-28 宁波三星医疗电气股份有限公司 Meter reading scheduling method of electricity consumption information acquisition terminal

Similar Documents

Publication Publication Date Title
CN103293967A (en) Multi-task control method for intelligent meter reading terminal
EP3467651B1 (en) Method, device and terminal for allocating computational resources of processor
US7930574B2 (en) Thread migration to improve power efficiency in a parallel processing environment
CN102779075A (en) Method, device and system for scheduling in multiprocessor nuclear system
CN1308746A (en) Method and apparatus for power mode transition in a multi-theread processor
CN103941649A (en) Control method of multi-axis motion card control system
CN105608049A (en) Method and device for controlling CPU of intelligent terminal
US20150378782A1 (en) Scheduling of tasks on idle processors without context switching
CN103473129A (en) Multi-task queue scheduling system with scalable number of threads and implementation method thereof
US10802998B2 (en) Technologies for processor core soft-offlining
US20240160474A1 (en) Multi-core processor task scheduling method, and device and storage medium
CN104516747A (en) System switching method and electronic device
CN109992366A (en) Method for scheduling task and dispatching device
CN103782269A (en) Efficient frequency boost operation
CN109343960A (en) A kind of method for scheduling task of linux system, system and relevant apparatus
US20180253313A1 (en) Operation instruction response control method and terminal for human-machine interface
CN103346902A (en) Method and system for data collection and scheduling
CN105892629A (en) Multicore-based screen awakening method and device as well as mobile terminal
EP2691830B1 (en) Dynamic allocation of processor cores running an operating system
CN103543982B (en) A kind of clock frequency management method and mobile device
CN106412088A (en) Data synchronization method and terminal
CN107197013B (en) Energy-saving system for enhancing cloud computing environment
US20050172287A1 (en) Bus management techniques
CN102681650A (en) Power supply control energy-saving method and corresponding storage system thereof
CN111274667A (en) Cross-scale material calculation software integrated calculation system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130911