CN102521039B - Method and system for realizing time group of network communication product - Google Patents
Method and system for realizing time group of network communication product Download PDFInfo
- Publication number
- CN102521039B CN102521039B CN201110405737.8A CN201110405737A CN102521039B CN 102521039 B CN102521039 B CN 102521039B CN 201110405737 A CN201110405737 A CN 201110405737A CN 102521039 B CN102521039 B CN 102521039B
- Authority
- CN
- China
- Prior art keywords
- force
- time
- time group
- come
- module
- 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.)
- Expired - Fee Related
Links
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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
Abstract
The invention discloses a method and system for realizing a time group of a network communication product, relating to the technical field of network communication. The method comprises the steps of: S1, judging if the current system time is 00:00 every one minute, if so, performing the step S2, and otherwise, performing the step S4; S2, looking up the time group which can come into effect at current day; S3, inserting the time group into a queue to be processed; S4, judging if the time group of the queue head of the queue to be processed has come into effect or has become invalid, if so, performing the step S5, and otherwise, performing the step S1; S5, removing the time group from the queue to be processed, and sending the state change to the system; and S6, judging if the time group still can come into effect or become invalid at current day, if so, returning to the step S3, and otherwise, performing the step S4. According to the method and system disclosed by the invention, the system can process the time group which can come into effect at current day by the judgment, so that the performance loss of the system is reduced in the presence of large quantities of application time groups.
Description
Technical field
The present invention relates to network communications technology field, particularly group implementation method of a kind of time of network communication product and system.
Background technology
Main more auxiliary functions of time group of network communication product come into force within a certain period of time or lost efficacy operation.The driving mechanism of time group is similar to the mechanism of operating system timer, but it is to trigger overtimely for absolute time or relative time that the key distinction is operating system timer, and time group repeatedly triggers after to be absolute time section combine with multiple relative time section and comes into force and failpoint.Such as operating system timer is to trigger overtimely after 4 hours at 2011-11-112:00 or operating system, and time group is to trigger and come into force and failpoint to the 9:00-10:00 in 2011-12-1 morning and the 13:00-14:00 in afternoon at 2011-11-1.
Prior art one: utilizing the driving precision of time group is 1 minute, the system per minute of the allowing time group that all application are checked in training in rotation, judge that current is in coming into force and failure state, if occurring to change, state just reports, when having in the situation of extensive application time group, defect clearly, can produce the problem large to the performance loss of system.
Prior art two: utilize the existing timer function of operating system, the nearest entry-into-force time in the time group of all application is registered in operating system timer, after the timer expiry of equal time group registration, report the state-transition of this time group, again nearest out-of-service time in this group is registered to time and in timer, waits for next overtime triggering processing, when having in the situation of extensive application time group, first can consume in a large number the resource of operating system timer, can cause very large burden to operating system timer, secondly because the precision of operating system timer is Millisecond, and time group precision prescribed is 1 minute, utilize high-precision timer to go the time group of low accuracy requirement, the reduction of break-in entire system efficiency.
Summary of the invention
(1) technical matters that will solve
The technical problem to be solved in the present invention is: how, having the extensive application time group in the situation that, reduce the performance loss of system.
(2) technical scheme
For solving the problems of the technologies described above, the invention provides a kind of time group implementation method of network communication product, said method comprising the steps of:
S1: judge every one minute whether the current system time is 00:00 integral point, if so, performs step S2, otherwise execution step S4;
S2: find out the time group that can come into force the same day from the time group of all application;
S3: the time order and function order that time group is come into force or lost efficacy according to meeting is inserted in pending queue;
S4: whether first time group that judges team's head of pending queue enters into force or lost efficacy in current time, if so, performs step S5, otherwise, step S1 returned to;
S5: the time group that this is come into force or was lost efficacy removes from pending queue, and state variation is sent to system;
S6: judge whether this time group that comes into force or lost efficacy also can come into force or lose efficacy on the same day, if return to step S3, otherwise, execution step S4.
Preferably, further comprising the steps of before step S1:
S0: by building thread or appointing measuring today per minute execution step S1.
The time group that the invention also discloses a kind of network communication product realizes system, and described system comprises:
Integral point judge module, for judging every one minute whether the current system time is 00:00 integral point, if so, carries out and searches module, otherwise carries out the inefficacy judge module that comes into force;
Search module, find out the time group that can come into force the same day for the time group from all application;
Insertion sort module, is inserted in pending queue for the time order and function order that time group is come into force or lost efficacy according to meeting;
Whether the inefficacy judge module that comes into force, enter into force or lost efficacy in current time for first time group of team's head of judging pending queue, and if so, carry out and remove module, otherwise, return to integral point judge module;
Remove module, remove from pending queue for the time group that this is come into force or was lost efficacy, and state variation is sent to system;
Coming into force lost efficacy sentences module again, for judging whether this time group that comes into force or lost efficacy also can come into force or lose efficacy on the same day, if return to insertion sort module, otherwise, carry out the inefficacy judge module that comes into force.
Preferably, described system also comprises:
Build module, for carrying out integral point judge module by structure thread or a measuring today per minute.
(3) beneficial effect
The present invention makes system only can process the time group that can come into force the same day by judgement, makes, having group in the situation that extensive application time, to have reduced the performance loss of system.
Brief description of the drawings
Fig. 1 is according to the process flow diagram of the time group implementation method of the network communication product of one embodiment of the present invention.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used for illustrating the present invention, but are not used for limiting the scope of the invention.
Fig. 1 is according to the process flow diagram of the time group implementation method of the network communication product of one embodiment of the present invention, in present embodiment, said method comprising the steps of:
S1: judging that every one minute whether the current system time be that (described 00:00 integral point refers to clock and minute is all zero time state 00:00 integral point, mainly for judging whether current system has carried out next 24 hours), if so, perform step S2, otherwise execution step S4;
S2: find out the time group that can come into force the same day from the time group of all application;
S3: the time order and function order that time group is come into force or lost efficacy according to meeting is inserted in pending queue;
S4: whether first time group that judges team's head of pending queue enters into force or lost efficacy in current time, if so, performs step S5, otherwise, step S1 returned to;
S5: the time group that this is come into force or was lost efficacy removes from pending queue, and state variation is sent to system;
S6: judge whether this time group that comes into force or lost efficacy also can come into force or lose efficacy on the same day, if return to step S3, otherwise, execution step S4.
Preferably, further comprising the steps of before step S1:
S0: by building thread or appointing measuring today per minute execution step S1.
The time group that the invention also discloses a kind of network communication product realizes system, and described system comprises:
Integral point judge module, for judging every one minute whether the current system time is 00:00 integral point, if so, carries out and searches module, otherwise carries out the inefficacy judge module that comes into force;
Search module, find out the time group that can come into force the same day for the time group from all application;
Insertion sort module, is inserted in pending queue for the time order and function order that time group is come into force or lost efficacy according to meeting;
Whether the inefficacy judge module that comes into force, enter into force or lost efficacy in current time for first time group of team's head of judging pending queue, and if so, carry out and remove module, otherwise, return to integral point judge module;
Remove module, remove from pending queue for the time group that this is come into force or was lost efficacy, and state variation is sent to system;
Coming into force lost efficacy sentences module again, for judging whether this time group that comes into force or lost efficacy also can come into force or lose efficacy on the same day, if return to insertion sort module, otherwise, carry out the inefficacy judge module that comes into force.
Preferably, described system also comprises:
Build module, for carrying out integral point judge module by structure thread or a measuring today per minute.
The present invention is mainly as follows with respect to the beneficial effect of prior art: one, system is only paid close attention to the time group that can come into force the same day, if under plenty of time group applicable cases, can save like this system resource.The time group that two, can be come into force or be lost efficacy the same day is according to time order and function order sequence judgement, and in a large amount of time on same day group situations, minimizing judges can improve system effectiveness by number of times.Three, regularly process as one minute as benchmark taking time group full accuracy, compare traditional timer mode and can improve entire system efficiency, reduce system performance loss.
Above embodiment is only for illustrating the present invention; and be not limitation of the present invention; the those of ordinary skill in relevant technologies field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.
Claims (4)
1. the time of a network communication product group implementation method, is characterized in that, said method comprising the steps of:
S1: judge every one minute whether the current system time is 00:00 integral point, if so, performs step S2, otherwise execution step S4;
S2: find out the time group that can come into force the same day from the time group of all application;
S3: the time order and function order that time group is come into force or lost efficacy according to meeting is inserted in pending queue;
S4: whether first time group that judges team's head of pending queue enters into force or lost efficacy in current time, if so, performs step S5, otherwise, step S1 returned to;
S5: the time group that this is come into force or was lost efficacy removes from pending queue, and state variation is sent to system;
S6: judge whether this time group that comes into force or lost efficacy also can come into force or lose efficacy on the same day, if return to step S3, otherwise, execution step S4.
2. the method for claim 1, is characterized in that, further comprising the steps of before step S1:
S0: by building thread or appointing measuring today per minute execution step S1.
3. the time group of network communication product realizes a system, it is characterized in that, described system comprises:
Integral point judge module, for judging every one minute whether the current system time is 00:00 integral point, if so, carries out and searches module, otherwise carries out the inefficacy judge module that comes into force;
Search module, find out the time group that can come into force the same day for the time group from all application;
Insertion sort module, is inserted in pending queue for the time order and function order that time group is come into force or lost efficacy according to meeting;
Whether the inefficacy judge module that comes into force, enter into force or lost efficacy in current time for first time group of team's head of judging pending queue, and if so, carry out and remove module, otherwise, return to integral point judge module;
Remove module, remove from pending queue for the time group that this is come into force or was lost efficacy, and state variation is sent to system;
Coming into force lost efficacy sentences module again, for judging whether this time group that comes into force or lost efficacy also can come into force or lose efficacy on the same day, if return to insertion sort module, otherwise, carry out the inefficacy judge module that comes into force.
4. system as claimed in claim 3, is characterized in that, described system also comprises:
Build module, for carrying out integral point judge module by structure thread or a measuring today per minute.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110405737.8A CN102521039B (en) | 2011-12-08 | 2011-12-08 | Method and system for realizing time group of network communication product |
PCT/CN2011/084724 WO2013082841A1 (en) | 2011-12-08 | 2011-12-27 | Network communication product time-group realization method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110405737.8A CN102521039B (en) | 2011-12-08 | 2011-12-08 | Method and system for realizing time group of network communication product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102521039A CN102521039A (en) | 2012-06-27 |
CN102521039B true CN102521039B (en) | 2014-08-13 |
Family
ID=46291974
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110405737.8A Expired - Fee Related CN102521039B (en) | 2011-12-08 | 2011-12-08 | Method and system for realizing time group of network communication product |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN102521039B (en) |
WO (1) | WO2013082841A1 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1494691A (en) * | 2001-03-01 | 2004-05-05 | 印芬龙科技股份有限公司 | Method and system for conducting digital real-time data processing |
CN102236577A (en) * | 2010-04-28 | 2011-11-09 | 长沙踊跃机电技术有限公司 | Dispatching method for operating system |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003015724A (en) * | 2001-07-03 | 2003-01-17 | Toyota Motor Corp | Computer for calculating working time group from use component group |
US8204938B2 (en) * | 2003-02-14 | 2012-06-19 | Devereux Research Ab Llc | System and method for immediate and delayed real-time communication activities using availability data from and communications through an external instant messaging system |
US20070006065A1 (en) * | 2005-07-01 | 2007-01-04 | Microsoft Corporation | Conditional event timing for interactive multimedia presentations |
CN101542442B (en) * | 2007-04-09 | 2012-12-19 | 松下电器产业株式会社 | Multiprocessor control unit, its control method, and integrated circuit |
WO2011046551A1 (en) * | 2009-10-14 | 2011-04-21 | Hewlett-Packard Development Company, L.P. | Content storage management |
CN102147748B (en) * | 2011-03-01 | 2013-04-10 | 汉柏科技有限公司 | Method and system for running interrupt service in user space |
-
2011
- 2011-12-08 CN CN201110405737.8A patent/CN102521039B/en not_active Expired - Fee Related
- 2011-12-27 WO PCT/CN2011/084724 patent/WO2013082841A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1494691A (en) * | 2001-03-01 | 2004-05-05 | 印芬龙科技股份有限公司 | Method and system for conducting digital real-time data processing |
CN102236577A (en) * | 2010-04-28 | 2011-11-09 | 长沙踊跃机电技术有限公司 | Dispatching method for operating system |
Non-Patent Citations (2)
Title |
---|
并行工程中时间约束网络建立及冲突检测研究;徐文胜 等;《系统仿真学报》;20030228;第15卷(第2期);第185-189、197页 * |
徐文胜 等.并行工程中时间约束网络建立及冲突检测研究.《系统仿真学报》.2003,第15卷(第2期),第185-189、197页. |
Also Published As
Publication number | Publication date |
---|---|
WO2013082841A1 (en) | 2013-06-13 |
CN102521039A (en) | 2012-06-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103634150B (en) | A kind of high security CAN communication means of redundancy | |
CN100593776C (en) | Periodic task reliability control method based on watchdog and timer | |
CN101976217B (en) | Anomaly detection method and system for network processing unit | |
CN101957751A (en) | Method and device for realizing state machine | |
CN103092682A (en) | Asynchronous network application program processing method | |
CN101783759B (en) | Bus error recovery processing method | |
CN104038373B (en) | information early warning and self-repairing system and method | |
WO2010043706A3 (en) | Method for the deterministic execution and synchronisation of an information processing system comprising a plurality of processing cores executing system tasks | |
CN102621938A (en) | Triple redundancy control system in process control and method thereof | |
CN105677497A (en) | High availability watchdog circuit | |
CN102636988A (en) | PLC (programmed logic controller)-based redundancy system implementation method | |
CN102222022A (en) | Real-time task scheduling method based on multicore processor | |
CN102799212B (en) | Global clock system for multi-core multi-processor parallel system, and application method thereof | |
CN108259227A (en) | A kind of method of data synchronization of two-node cluster hot backup interlock system | |
CN104407958A (en) | High-reliability system monitoring method and system | |
CN101853191A (en) | Method for detecting task endless loop in operating system and operating system | |
CN102811152A (en) | Method for realizing real-time transaction and data exchange of multiple main bus network communication | |
CN102339029B (en) | Method for realizing timing protection of embedded operating system | |
CN102521039B (en) | Method and system for realizing time group of network communication product | |
CN101324989A (en) | Automatic recognition technique of electrical energy meter in centralized meter reading system | |
CN101295271B (en) | Software watchdog self-restoring method | |
CN109753368B (en) | Real-time data sending method and system | |
CN102152766A (en) | Automotive electric door/window controller and control method thereof as well as automotive electric door/window system | |
CN202153352U (en) | Watchdog device capable of preventing computer control system from failure | |
CN102929714B (en) | uC/OS-II-based hardware task manager |
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 | ||
PP01 | Preservation of patent right |
Effective date of registration: 20180823 Granted publication date: 20140813 |
|
PP01 | Preservation of patent right | ||
PD01 | Discharge of preservation of patent |
Date of cancellation: 20210823 Granted publication date: 20140813 |
|
PD01 | Discharge of preservation of patent | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140813 Termination date: 20191208 |
|
CF01 | Termination of patent right due to non-payment of annual fee |