[go: up one dir, main page]

CN1889045A - Cocurrent event processing device and method in multi-task software system - Google Patents

Cocurrent event processing device and method in multi-task software system Download PDF

Info

Publication number
CN1889045A
CN1889045A CN 200510080165 CN200510080165A CN1889045A CN 1889045 A CN1889045 A CN 1889045A CN 200510080165 CN200510080165 CN 200510080165 CN 200510080165 A CN200510080165 A CN 200510080165A CN 1889045 A CN1889045 A CN 1889045A
Authority
CN
China
Prior art keywords
event
concurrency
concurrent
events
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.)
Granted
Application number
CN 200510080165
Other languages
Chinese (zh)
Other versions
CN100530105C (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2005100801655A priority Critical patent/CN100530105C/en
Publication of CN1889045A publication Critical patent/CN1889045A/en
Application granted granted Critical
Publication of CN100530105C publication Critical patent/CN100530105C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明涉及一种多任务软件系统中并发事件的处理装置和方法。所述的装置主要包括:任务模块:用于在多任务软件系统中的可并发事件需要被处理时,向并发处理模块提交该事件,并根据并发处理模块返回的该事件的并发控制信息,对该事件进行相应的处理;并发处理模块:用于维护多任务软件系统中可并发事件类型的并发规则和任务模块提交过来的事件的状态信息,根据该并发规则和状态信息,生成接收到的提交事件的并发控制信息,并将该并发控制信息传递给任务模块。利用本发明所述装置可以使得多任务软件系统中并发事件处理的设计以及实现更加简单,使得多任务软件系统的维护工作更加方便。

Figure 200510080165

The invention relates to a processing device and method for concurrent events in a multi-task software system. The device mainly includes: a task module: used for submitting the event to the concurrent processing module when a concurrent event in the multi-task software system needs to be processed, and according to the concurrency control information of the event returned by the concurrent processing module, The event is processed accordingly; concurrent processing module: used to maintain the concurrency rules of the concurrency event type in the multi-tasking software system and the status information of the events submitted by the task module, and generate the received submission according to the concurrency rules and status information The concurrency control information of the event, and pass the concurrency control information to the task module. The device of the invention can make the design and implementation of concurrent event processing in the multi-task software system simpler, and make the maintenance work of the multi-task software system more convenient.

Figure 200510080165

Description

多任务软件系统中并发事件的处理装置和方法Device and method for processing concurrent events in multi-task software system

技术领域technical field

本发明涉及通讯领域,尤其涉及一种多任务软件系统中并发事件的处理装置和方法。The invention relates to the communication field, in particular to a device and method for processing concurrent events in a multi-task software system.

背景技术Background technique

多任务软件系统是指可以同时处理多个事件的软件系统,在实际应用中,该多个事件并发的情况可能非常复杂。比如:如果一个多任务软件系统有10个可并发事件,则这10个事件的单次并发情况就会有10!/9!+10!/8!+10!/7!+10!/6!+10!/5!+10!/4!+10!/3!+10!/2!+10!/1!=6,235,300种。因此,如果多任务软件系统的实现是按照多个事件的各种并发情况分别进行处理,必将导致多任务软件系统的开发过程是非常艰难而痛苦的,多任务软件系统的实现是非常庞大而复杂的。A multi-tasking software system refers to a software system that can process multiple events at the same time. In practical applications, the concurrency of multiple events may be very complicated. For example: if a multi-tasking software system has 10 concurrent events, then there will be 10 concurrent events of these 10 events! /9! +10! /8! +10! /7! +10! /6! +10! /5! +10! /4! +10! /3! +10! /2! +10! /1! = 6,235,300 species. Therefore, if the realization of the multitasking software system is to deal with the various concurrent situations of multiple events separately, the development process of the multitasking software system will be very difficult and painful, and the realization of the multitasking software system will be very large and expensive. complicated.

由于多任务软件系统同时处理的多个事件的事件类型、事件处理方式等的不同,该多个事件之间可能存在并发冲突,即该多个事件中一种类型的事件在被处理时,另一种类型的事件不能同时被处理。因此,通常需要制定一个多任务软件系统的并发规则,该并发规则根据多任务软件系统中所有可并发事件之间的冲突情况,规定了多任务软件系统如何处理所有可并发事件。Due to the different event types and event processing methods of multiple events processed by the multi-tasking software system at the same time, there may be concurrency conflicts among the multiple events, that is, when one type of event among the multiple events is processed, the other Events of one type cannot be processed at the same time. Therefore, it is usually necessary to formulate a concurrency rule for a multitasking software system, which specifies how the multitasking software system handles all concurrent events according to the conflicts among all concurrent events in the multitasking software system.

现有技术中一种多任务软件系统中并发事件的处理方法为:为每一个多任务软件系统中可并发的事件设置一个状态标志,该状态标志标识该事件是否正在处理中。当某一个事件需要被处理时,根据多任务软件系统的所有可并发事件的状态标志以及多任务软件系统的并发规则,决定该事件是否可以被并发处理,并决定其他事件该如何处理。A method for processing concurrent events in a multitasking software system in the prior art is: setting a status flag for each concurrent event in a multitasking software system, and the status flag identifies whether the event is being processed. When an event needs to be processed, it is determined whether the event can be processed concurrently and how to handle other events according to the status flags of all concurrent events of the multitasking software system and the concurrency rules of the multitasking software system.

该方法的缺点为:该方法只适合于并发事件比较少的多任务软件系统。由于上述的多任务软件系统的并发规则是固化在编码中的,当有新的事件加入或原有的事件需要剔除时,就需要对该并发规则进行调整,因为该并发规则是固化在多任务软件系统的所有事件处理过程的编码中,因此,对该并发规则的调整将涉及到多任务软件系统的所有事件处理过程,使得多任务软件系统的维护工作变得极其繁重。The disadvantage of this method is: this method is only suitable for multi-task software systems with relatively few concurrent events. Since the concurrency rules of the above-mentioned multitasking software system are fixed in the code, when new events are added or the original events need to be removed, the concurrency rules need to be adjusted, because the concurrency rules are fixed in the multitasking In the coding of all event processing processes of the software system, the adjustment of the concurrency rules will involve all event processing processes of the multitasking software system, making the maintenance work of the multitasking software system extremely heavy.

发明内容Contents of the invention

鉴于上述现有技术所存在的问题,本发明的目的是提供一种多任务软件系统中并发事件的调度装置和方法,从而使得多任务软件系统的并发事件处理设计以及实现更加简单,使得多任务软件系统的维护工作更加方便。In view of the problems existing in the above-mentioned prior art, the object of the present invention is to provide a scheduling device and method for concurrent events in a multi-tasking software system, so as to make the design and implementation of concurrent event processing in a multi-tasking software system simpler and make multi-tasking The maintenance work of the software system is more convenient.

本发明的目的是通过以下技术方案实现的:The purpose of the present invention is achieved through the following technical solutions:

一种多任务软件系统中并发事件的处理装置,包括:A device for processing concurrent events in a multitasking software system, comprising:

任务模块:用于在多任务软件系统中的可并发事件需要被处理时,向并发处理模块提交该事件,并根据并发处理模块返回的该事件的并发控制信息,对该事件进行相应的处理;Task module: when a concurrent event in the multitasking software system needs to be processed, submit the event to the concurrent processing module, and process the event accordingly according to the concurrency control information of the event returned by the concurrent processing module;

并发处理模块:用于维护多任务软件系统中可并发事件类型的并发规则和任务模块提交过来的事件的状态信息,根据该并发规则和状态信息,生成接收到的提交事件的并发控制信息,并将该并发控制信息传递给任务模块。Concurrency processing module: used to maintain the concurrency rules of concurrency event types in the multi-task software system and the state information of the events submitted by the task module, according to the concurrency rules and state information, generate the concurrency control information of the received submitted events, and Pass the concurrency control information to the task module.

所述的任务模块具体包括:The task modules specifically include:

事件提交模块:用于当可并发事件需要被处理时,向并发处理模块提交该事件,并接收并发处理模块返回的该事件的并发控制信息,将该并发控制信息传递给事件处理模块,将事件处理模块返回的事件处理状态信息传递给并发处理模块;Event submission module: used to submit the event to the concurrent processing module when a concurrent event needs to be processed, receive the concurrency control information of the event returned by the concurrent processing module, pass the concurrency control information to the event processing module, and send the event The event processing status information returned by the processing module is passed to the concurrent processing module;

事件处理模块:用于根据接收到的并发控制信息,对相应的可并发事件进行相应的事务处理或者将该可并发事件挂起或者将该可并发事件丢弃,并返回事件处理状态信息给事件提交模块。Event processing module: used to perform corresponding transaction processing on the corresponding concurrent event or suspend the concurrent event or discard the concurrent event according to the received concurrency control information, and return the event processing status information to the event submission module.

所述的任务模块还包括:The task modules also include:

事件标识模块:用于当可并发事件需要被处理时,生成在多任务软件系统的整个运行期内唯一标识该事件的事件标识,并将该事件标识传递给事件处理模块和事件提交模块。Event identification module: used to generate an event identification that uniquely identifies the event during the entire operation period of the multi-tasking software system when a concurrent event needs to be processed, and pass the event identification to the event processing module and the event submission module.

所述的并发处理模块具体包括:The concurrent processing module specifically includes:

并发规则模块:用于定义和维护多任务软件系统中所有可并发事件类型的并发规则,并通过接口将该并发规则传递给并发控制和调度模块;Concurrency rule module: used to define and maintain concurrency rules for all concurrency event types in the multi-tasking software system, and pass the concurrency rules to the concurrency control and scheduling module through the interface;

并发控制和调度模块:用于维护所有接收到的提交事件的状态信息,并根据该状态信息和接收到的并发规则,生成接收到的提交事件的并发控制信息,并将该并发控制信息返回给任务模块。Concurrency control and scheduling module: used to maintain the status information of all received submission events, and generate the concurrency control information of the received submission events according to the status information and the received concurrency rules, and return the concurrency control information to task module.

所述的并发规则模块包括:The concurrent rules module includes:

并发规则矩阵模块:用于使用矩阵来集中表示多任务软件系统中所有可并发事件类型的并发规则。Concurrency rule matrix module: used to use matrix to centrally represent concurrency rules of all concurrency event types in a multi-tasking software system.

所述的并发控制和调度模块具体包括:The concurrency control and scheduling module specifically includes:

并发调度模块:用于维护所有正在处理的和所有处于等待处理状态的事件的状态信息,其中包括事件的类型和优先级信息,并将该事件状态信息传递给并发控制模块;Concurrent scheduling module: used to maintain the state information of all events being processed and all events waiting to be processed, including the type and priority information of the event, and pass the event state information to the concurrency control module;

并发控制模块:用于根据接收到的并发规则和并发调度模块传递过来的事件状态信息,确定接收到的提交事件的状态信息,并生成相应的并发控制信息,将该并发控制信息传递给任务模块;Concurrency control module: used to determine the status information of the received submitted event according to the received concurrency rules and the event status information passed by the concurrency scheduling module, and generate corresponding concurrency control information, and pass the concurrency control information to the task module ;

事件处理状态信息接收模块:用于接收任务模块返回的事件处理状态信息,当接收到事件处理完毕的状态信息后,则通知并发调度模块将处于等待处理状态的事件中优先级最高的事件提交给并发控制模块。Event processing status information receiving module: used to receive the event processing status information returned by the task module. After receiving the status information that the event processing is completed, it will notify the concurrent scheduling module to submit the event with the highest priority among the events waiting to be processed to Concurrency control module.

所述的并发调度模块包括:Described concurrent scheduling module includes:

当前正在处理的事件列表:用于按照优先级从高到低排列所有正在处理的事件;List of events currently being processed: used to arrange all events being processed in descending order of priority;

等待处理的事件列表:用于按照优先级从高到低排列所有正处于等待处理状态的事件。List of events waiting to be processed: used to arrange all events that are in the state of waiting to be processed according to the priority from high to low.

所述的并发控制模块具体包括:The concurrency control module specifically includes:

并发判断模块:用于根据接收到的并发规则,判断接收到的提交事件当前能不能并发,如果能并发,则通知并发调度模块将该事件加入当前正在处理的事件列表,生成该事件的并发控制信息,并将该信息传递给任务模块;如果不能并发,则将该事件提交给优先级判断模块;Concurrency Judgment Module: It is used to judge whether the received submission event can be concurrent according to the received concurrency rules. If it can be concurrent, it will notify the concurrent scheduling module to add the event to the list of events currently being processed, and generate the concurrency control of the event information, and pass the information to the task module; if it cannot be concurrent, submit the event to the priority judgment module;

优先级判断模块:用于在当前正在处理的事件列表中找出所有与提交事件存在并发冲突的事件,然后判断提交事件的优先级是否大于所有查找出来的事件的优先级,如果是,则通知并发调度模块将该事件加入当前正在处理的事件列表,将所有查找出来的事件加入等待处理的事件列表或丢弃;否则,将该事件加入等待处理的事件列表,然后生成相应的并发控制信息,并将该信息传递给任务模块。Priority judging module: used to find out all events that have concurrency conflicts with the submission event in the list of events currently being processed, and then judge whether the priority of the submission event is greater than the priority of all found events, and if so, notify The concurrent scheduling module adds the event to the list of events currently being processed, and adds all found events to the list of events waiting to be processed or discards them; otherwise, adds the event to the list of events waiting to be processed, and then generates corresponding concurrency control information, and Pass that information to the task module.

所述的并发控制模块包括:The concurrency control module includes:

当前的并发规则生成模块:用于根据多任务软件系统中所有正在处理的事件类型的并发规则,通过进行与运算得到当前的并发规则列表,并把该表传递给并发判断模块。The current concurrency rule generation module: used for obtaining the current concurrency rule list through AND operation according to the concurrency rules of all types of events being processed in the multi-tasking software system, and passing the list to the concurrency judgment module.

一种多任务软件系统中并发事件的处理方法,包括:A method for processing concurrent events in a multitasking software system, comprising:

A、设置多任务软件系统中可并发事件类型的并发规则和优先级信息;A. Set concurrency rules and priority information of concurrent event types in the multi-tasking software system;

B、根据所述设置的信息,对多任务软件系统中需要被处理的可并发事件进行相应的处理。B. According to the set information, correspondingly process the concurrent events that need to be processed in the multi-tasking software system.

所述的步骤A还包括:Described step A also includes:

根据多任务软件系统中所有正在处理的事件类型的并发规则,通过进行与运算得到当前的并发规则列表。According to the concurrency rules of all event types being processed in the multi-tasking software system, the current concurrency rule list is obtained by performing an AND operation.

所述的步骤B具体包括:Described step B specifically comprises:

B1、根据多任务软件系统中所有正在处理的事件类型的并发规则,判断当前需要被处理的可并发事件能不能并发,如果能,则执行步骤B2;否则,执行步骤B3;B1. According to the concurrency rules of all types of events being processed in the multi-tasking software system, judge whether the concurrent events that need to be processed can be concurrent, and if so, perform step B2; otherwise, perform step B3;

B2、确定当前需要被处理的可并发事件的状态为正在处理状态,对该事件进行相应的事务处理;B2. Determine that the current state of the concurrent event that needs to be processed is the processing state, and perform corresponding transaction processing on the event;

B3、根据所述需要被处理的可并发事件的优先级和存在并发冲突的所有事件的优先级之间的关系,确定该需要被处理的可并发事件能不能并发。B3. According to the relationship between the priorities of the concurrent events that need to be processed and the priorities of all events that have concurrency conflicts, determine whether the concurrent events that need to be processed can be concurrent.

所述的步骤B3具体包括:Described step B3 specifically comprises:

B31、在当前正在处理的事件中找出所有与该需要被处理的可并发事件存在并发冲突的事件,如果该需要被处理的可并发事件的优先级大于所有查找到的事件的优先级,则执行步骤B32;否则,执行步骤B33;B31. Find all events that have concurrency conflicts with the concurrent events that need to be processed in the events that are currently being processed. If the priority of the concurrent events that need to be processed is greater than the priority of all found events, then Execute step B32; otherwise, execute step B33;

B32、确定需要被处理的可并发事件的状态为正在处理状态,对该事件进行相应的事务处理,将查找到的事件的状态更新为等待处理状态并将该事件挂起,或者,将查找到的事件直接丢弃;B32. Determine that the state of the concurrent event that needs to be processed is the processing state, perform corresponding transaction processing on the event, update the state of the found event to the waiting processing state and suspend the event, or, find the event events are discarded directly;

B33、确定该当前需要被处理的可并发事件的状态为等待处理状态,将该事件挂起。B33. Determine that the current state of the concurrent event that needs to be processed is a waiting state, and suspend the event.

所述的步骤B还包括:Described step B also includes:

在多任务软件系统中一个正在处理的事件处理完毕后,则处于等待处理状态的事件中优先级最高的事件成为当前需要被处理的可并发事件。After an event being processed in the multi-tasking software system is processed, the event with the highest priority among the events waiting to be processed becomes a concurrent event that needs to be processed currently.

由上述本发明提供的技术方案可以看出,本发明和现有技术相比具有如下优点:As can be seen from the technical scheme provided by the above-mentioned invention, the present invention has the following advantages compared with the prior art:

1、本发明采用集中的并发控制与并发调度处理策略,使得多任务软件系统的并发事件处理设计以及实现更加简单,使得多任务软件系统的并发事件处理修改以及维护更加方便。1. The present invention adopts a centralized concurrency control and concurrent scheduling processing strategy, which makes the concurrent event processing design and implementation of the multitasking software system easier, and makes the concurrent event processing modification and maintenance of the multitasking software system more convenient.

2、本发明将事件的并发控制、并发调度与事件的具体处理相分离,将事件的并发控制与事件的并发调度相分离,使得多任务软件系统的开发人员可以集中精力在事件并发规则的定义,事件并发调度算法的优化,以及事件的正确处理,而不必关心错综复杂的事件并发情况以及事件并发冲突。2. The present invention separates the concurrency control and scheduling of events from the specific processing of events, and separates the concurrency control of events from the concurrent scheduling of events, so that developers of multi-task software systems can concentrate on the definition of event concurrency rules , the optimization of event concurrency scheduling algorithm, and the correct processing of events, without having to care about the intricate concurrency of events and event concurrency conflicts.

3、在本发明中,任务可以访问处理事件列表,并可以获取当前正在处理的所有事件信息,从而使得任务可以依据当前正在处理的事件信息,对相应事件的处理过程和处理方法进行适当的优化或调整。3. In the present invention, the task can access the processing event list and obtain all event information currently being processed, so that the task can properly optimize the processing process and processing method of the corresponding event according to the event information currently being processed or adjust.

附图说明Description of drawings

图1为本发明所述装置的具体结构图;Fig. 1 is the specific structural diagram of device of the present invention;

图2为本发明所述实施例的基本结构图;Fig. 2 is the basic structural diagram of the embodiment of the present invention;

图3为本发明所述实施例中多个事件并发控制与并发调度装置的结构图;3 is a structural diagram of multiple event concurrency control and concurrency scheduling devices in the embodiment of the present invention;

图4为本发明所述实施例在任务提交事件时的并发控制与并发调度处理流程图;FIG. 4 is a flow chart of concurrency control and concurrent scheduling processing in the event of task submission in the embodiment of the present invention;

图5为本发明所述实施例在收到事件处理完成确认消息后的并发控制与并发调度处理流程图;FIG. 5 is a flow chart of concurrency control and concurrent scheduling processing after receiving an event processing completion confirmation message according to the embodiment of the present invention;

图6为本发明所述方法的具体处理流程图。Fig. 6 is a specific processing flowchart of the method of the present invention.

具体实施方式Detailed ways

本发明提供了一种多任务软件系统中并发事件的调度装置和方法。本发明的核心为:在多任务软件系统中,采用集中的并发控制与并发调度处理策略,将事件的并发控制、并发调度与事件的具体处理相分离,将事件的并发控制与事件的并发调度相分离。The invention provides a scheduling device and method for concurrent events in a multi-task software system. The core of the present invention is: in the multi-task software system, adopt centralized concurrent control and concurrent scheduling processing strategy, separate the concurrent control and concurrent scheduling of events from the specific processing of events, and separate the concurrent control of events from the concurrent scheduling of events phase separation.

下面结合附图来详细描述本发明,本发明所述装置的具体结构图如图1所示,包括如下模块:Describe the present invention in detail below in conjunction with accompanying drawing, the specific structural diagram of device of the present invention is as shown in Figure 1, comprises following module:

任务模块、用于在多任务软件系统中的可并发事件需要被处理时,向并发处理模块提交该事件,并根据并发处理模块返回的该事件的并发控制信息,对该事件进行相应的处理。任务模块包括:事件标识模块、事件提交模块和事件处理模块。The task module is used for submitting the event to the concurrent processing module when a concurrent event in the multi-task software system needs to be processed, and correspondingly processing the event according to the concurrency control information of the event returned by the concurrent processing module. The task module includes: event identification module, event submission module and event processing module.

其中,事件标识模块、用于根据接收到的事件提交模块传递过来的申请,生成一个唯一的事件标识,然后,将该事件标识传递给事件处理模块和事件提交模块。该事件标识由事件标识模块统一分配并管理,在多任务软件系统的整个运行期内唯一标识该事件。Wherein, the event identification module is configured to generate a unique event identification according to the received application delivered by the event submission module, and then transmit the event identification to the event processing module and the event submission module. The event identification is uniformly assigned and managed by the event identification module, and uniquely identifies the event during the entire operation period of the multi-tasking software system.

其中,事件提交模块、用于当接收到事件标识模块传递过来的事件标识后,将该事件标识所标识的事件提交给并发处理模块,并接收并发处理模块返回的该事件的并发控制信息,将该并发控制信息传递给事件处理模块。Wherein, the event submitting module is used for submitting the event identified by the event identification to the concurrent processing module after receiving the event identification passed by the event identification module, and receiving the concurrency control information of the event returned by the concurrent processing module. The concurrency control information is passed to the event processing module.

其中,事件处理模块、用于根据接收到的事件的并发控制信息和事件标识,对该事件进行相应的处理,包括将该事件暂时挂起或丢弃,或者进行其它适当的处理并在处理完毕后返回状态信息给并发处理模块。Wherein, the event processing module is used to process the event correspondingly according to the concurrency control information and event identifier of the received event, including temporarily suspending or discarding the event, or performing other appropriate processing and Return status information to the concurrent processing module.

并发处理模块、用于维护多任务软件系统中所有可并发事件类型的并发规则,根据该并发规则和所有正在处理的事件的类型和优先级信息,生成任务模块提交过来的需要被处理的事件的并发控制信息,并将该并发控制信息返回给任务模块。并发处理模块包括:并发控制和调度模块和并发规则模块。The concurrent processing module is used to maintain the concurrency rules of all concurrency event types in the multi-tasking software system. According to the concurrency rules and the type and priority information of all the events being processed, generate the events that need to be processed submitted by the task module Concurrency control information, and return the concurrency control information to the task module. The concurrent processing module includes: a concurrent control and scheduling module and a concurrent rule module.

其中,并发规则模块、用于定义和维护多任务软件系统中所有可并发事件类型的并发规则,并将该并发规则传递给并发控制和调度模块,该并发规则可以通过矩阵来表示。因此,并发规则模块可以包括并发规则矩阵模块,并发规则矩阵模块用于使用矩阵来集中表示多任务软件系统中所有可并发事件类型的并发规则。Among them, the concurrency rule module is used to define and maintain concurrency rules of all concurrency event types in the multi-task software system, and pass the concurrency rules to the concurrency control and scheduling module, and the concurrency rules can be represented by a matrix. Therefore, the concurrency rule module may include a concurrency rule matrix module, and the concurrency rule matrix module is used to use a matrix to centrally represent concurrency rules of all concurrency event types in the multi-task software system.

其中,并发控制和调度模块、用于根据接收到的并发规则,和任务模块提交过来的需要被处理的事件的类型和优先级信息,以及所有正在处理的事件的类型和优先级信息,生成针对任务模块提交过来的事件的并发控制信息,并将该并发控制信息返回给任务模块。并发控制和调度模块包括:并发控制模块、并发调度模块和事件处理状态信息接收模块。Among them, the concurrency control and scheduling module is used to generate information for The concurrency control information of the event submitted by the task module, and returns the concurrency control information to the task module. The concurrency control and scheduling module includes: a concurrency control module, a concurrency scheduling module and an event processing status information receiving module.

其中,并发调度模块、用于维护所有正在处理的和处于等待处理的事件的类型和优先级信息等事件状态信息,所有正在处理的和处于等待处理的事件按照其优先级从高到低进行排序,分别构成当前正在处理的事件列表和等待处理的事件列表。Among them, the concurrent scheduling module is used to maintain event status information such as the type and priority information of all events being processed and waiting to be processed, and all events being processed and waiting to be processed are sorted according to their priorities from high to low , which respectively constitute the list of events currently being processed and the list of events waiting to be processed.

其中,事件处理状态信息接收模块、用于接收任务模块返回的事件处理状态信息,当接收到事件处理完毕的状态信息后,则通知并发调度模块将处于等待处理状态的事件中优先级最高的事件提交给并发控制模块。Among them, the event processing status information receiving module is used to receive the event processing status information returned by the task module. After receiving the status information that the event processing is completed, the concurrent scheduling module will be notified that the event with the highest priority among the events waiting to be processed Submitted to the concurrency control module.

其中,并发控制模块、用于根据接收到的并发规则和所有正在处理的事件的类型,生成并维护多任务软件系统当前的并发规则列表。根据该当前的并发规则列表和并发调度模块传递过来的事件信息,对提交事件进行相应的处理,生成相应的并发控制信息,并将该并发控制信息返回给任务模块。并发控制模块包括:并发判断模块、优先级判断模块和当前的并发规则生成模块。Wherein, the concurrency control module is used for generating and maintaining the current concurrency rule list of the multi-task software system according to the received concurrency rules and the types of all events being processed. According to the current concurrency rule list and the event information delivered by the concurrency scheduling module, the submission event is processed accordingly, corresponding concurrency control information is generated, and the concurrency control information is returned to the task module. The concurrency control module includes: a concurrency judging module, a priority judging module and a current concurrency rule generating module.

并发判断模块:用于根据接收到的并发规则,判断接收到的提交事件当前能不能并发,如果能并发,则通知并发调度模块将该事件加入当前正在处理的事件列表,通知当前的并发规则生成模块更新当前的并发规则列表,生成该事件的并发控制信息,并将该信息传递给任务模块,该信息可以通知负责处理该提交事件的任务进行相应事件处理;如果不能并发,则将该事件提交给优先级判断模块;Concurrency Judgment Module: It is used to judge whether the received submission event can be concurrent according to the received concurrency rules. If it can be concurrent, it will notify the concurrent scheduling module to add the event to the current event list being processed, and notify the current concurrency rule generation The module updates the current concurrency rule list, generates the concurrency control information of the event, and passes the information to the task module, which can notify the task responsible for processing the submitted event to process the corresponding event; if it cannot be concurrent, submit the event To the priority judgment module;

优先级判断模块:用于在当前正在处理的事件列表中找出所有与提交事件存在并发冲突的事件,然后判断提交事件的优先级是否大于所有查找出来的事件的优先级,如果是,则通知并发调度模块将该事件加入当前正在处理的事件列表,将所有查找出来的事件加入等待处理的事件列表或丢弃,通知当前的并发规则生成模块更新当前的并发规则列表;否则,将该事件加入等待处理的事件列表,然后生成相应的并发控制信息,并将该信息传递给任务模块。Priority judging module: used to find out all events that have concurrency conflicts with the submission event in the list of events currently being processed, and then judge whether the priority of the submission event is greater than the priority of all found events, and if so, notify The concurrent scheduling module adds the event to the list of events currently being processed, adds all found events to the list of events waiting to be processed or discards them, and notifies the current concurrent rule generation module to update the current list of concurrent rules; otherwise, adds the event to the waiting list The list of events processed, and then generate the corresponding concurrency control information, and pass this information to the task module.

当前的并发规则生成模块:用于根据多任务软件系统中所有正在处理的事件类型的并发规则,通过进行与运算得到当前的并发规则列表,并把该表传递给并发判断模块。The current concurrency rule generation module: used for obtaining the current concurrency rule list through AND operation according to the concurrency rules of all types of events being processed in the multi-tasking software system, and passing the list to the concurrency judgment module.

本发明提供了一个上面所述装置的具体实施例,该实施例的基本结构图如图2所示。The present invention provides a specific embodiment of the device described above, and the basic structure diagram of this embodiment is shown in FIG. 2 .

在图2所示的本发明所述实施例的基本结构图中,包括多个事件并发控制与并发调度装置和任务模块。多个事件并发控制与并发调度装置的结构图如图3所示。包括:事件标识模块、基于优先级的多个事件并发调度模块、基于并发规则的多个事件并发控制模块和并发规则模块。该实施例的具体工作过程如下:In the basic structural diagram of the embodiment of the present invention shown in FIG. 2 , multiple event concurrency control and concurrency scheduling devices and task modules are included. The structure diagram of multiple event concurrency control and concurrency scheduling device is shown in FIG. 3 . It includes: an event identification module, a multiple event concurrency scheduling module based on priority, a multiple event concurrency control module and a concurrency rule module based on concurrency rules. The specific working process of this embodiment is as follows:

任务模块由多个子任务模块组成,每一个子任务模块都有一个唯一的任务标识,负责既定事件的处理。The task module is composed of multiple subtask modules, and each subtask module has a unique task identifier, which is responsible for the processing of predetermined events.

为了更好地描述该实施例,我们先介绍一下多任务软件系统的并发规则的概念。In order to better describe this embodiment, we first introduce the concept of concurrency rules of a multi-tasking software system.

假设多任务软件系统共有A,B,C,D,E,F,G等7个可并发事件类型。其中事件类型为A的事件的并发规则如表1所示。则该并发规则定义,事件类型为A的事件发生时,事件类型为A,B,D,F的事件可以被并发处理,事件类型为C,E,G的事件不能被并发处理。其中事件类型为B的事件的并发规则如表2所示。则该并发规则定义,事件类型为B的事件发生时,事件类型为A,C,D的事件可以被并发处理,而事件类型为B,E,F,G的事件不能被并发处理。Assume that the multi-tasking software system has 7 concurrent event types including A, B, C, D, E, F, and G. Table 1 shows the concurrency rules of events whose event type is A. Then the concurrency rule defines that when an event of event type A occurs, events of event type A, B, D, and F can be processed concurrently, and events of event type C, E, and G cannot be processed concurrently. Table 2 shows the concurrency rules for the events whose event type is B. Then the concurrency rule defines that when an event of event type B occurs, events of event type A, C, and D can be processed concurrently, while events of event type B, E, F, and G cannot be processed concurrently.

                        表1  事件类型为A的事件的并发规则   A   B   C   D   E   F   G   A   TRUE   TRUE   FALSE   TRUE   FALSE   TRUE   FALSE Table 1 Concurrency rules for events of event type A A B C D. E. f G A TRUE TRUE FALSE TRUE FALSE TRUE FALSE

                        表2  事件类型为B的事件的并发规则   A   B   C   D   E   F   G   B   TRUE   FALSE   TRUE   TRUE   FALSE   FALSE   FALSE Table 2 Concurrency rules for events of event type B A B C D. E. f G B TRUE FALSE TRUE TRUE FALSE FALSE FALSE

在该实施例中,多个事件并发控制与并发调度装置中的并发规则模块负责定义和维护所有可并发事件类型的并发规则,该并发规则可以通过并发规则矩阵来表示。并发规则模块需要根据该并发规则矩阵,通过并发规则模块接口向基于并发规则的多个事件并发控制模块提供相应事件类型的并发规则。In this embodiment, the concurrency rule module in the multiple event concurrency control and concurrency scheduling device is responsible for defining and maintaining concurrency rules for all concurrency event types, and the concurrency rules can be represented by a concurrency rule matrix. The concurrency rule module needs to provide concurrency rules of corresponding event types to multiple event concurrency control modules based on concurrency rules through the concurrency rule module interface according to the concurrency rule matrix.

比如,假设多任务软件系统共有A,B,C,D,E,F,G等7个可并发事件类型,则该多任务软件系统的所有可并发事件类型的并发规则矩阵可定义为表3的形式,行定义为正在并发的事件类型,列定义为对应该并发事件类型的其他事件类型的并发规则。For example, assuming that the multitasking software system has 7 concurrent event types A, B, C, D, E, F, G, etc., the concurrency rule matrix of all concurrent event types of the multitasking software system can be defined as Table 3 In the form of , the row is defined as the event type being concurrent, and the column is defined as the concurrency rules of other event types corresponding to the concurrent event type.

                       表3  各种事件类型的并发规则矩阵   A   B   C   D   E   F   G   A   TRUE   TRUE   FALSE   TRUE   FALSE   TRUE   FALSE   B   TRUE   FALSE   TRUE   TRUE   FALSE   FALSE   FALSE   C   FALSE   TRUE   FALSE   FALSE   FALSE   FALSE   TRUE   D   TRUE   TRUE   FALSE   TRUE   TRUE   FALSE   TRUE   E   TRUE   FALSE   FALSE   TRUE   FALSE   TRUE   TRUE   F   FALSE   FALSE   TRUE   TRUE   TRUE   FALSE   FALSE   G   TRUE   FALSE   FALSE   TRUE   FALSE   TRUE   TRUE Table 3 Concurrency rule matrix for various event types A B C D. E. f G A TRUE TRUE FALSE TRUE FALSE TRUE FALSE B TRUE FALSE TRUE TRUE FALSE FALSE FALSE C FALSE TRUE FALSE FALSE FALSE FALSE TRUE D. TRUE TRUE FALSE TRUE TRUE FALSE TRUE E. TRUE FALSE FALSE TRUE FALSE TRUE TRUE f FALSE FALSE TRUE TRUE TRUE FALSE FALSE G TRUE FALSE FALSE TRUE FALSE TRUE TRUE

在多任务软件系统初始化或者当前系统没有事件发生时,维护在基于并发规则的多个事件并发控制模块中的多任务软件系统当前的并发规则列表各项全部为真。即此时允许任何一个可并发事件并发。When the multi-task software system is initialized or no event occurs in the current system, all items in the current concurrency rule list of the multi-task software system maintained in the multiple event concurrency control module based on concurrency rules are true. That is, any concurrent event is allowed to be concurrent at this time.

在多任务软件系统中有单一事件类型发生或并发时,则多任务软件系统当前的并发规则列表就是该事件类型的并发规则列表。当有多个事件类型并发时,则基于并发规则的多个事件并发控制模块通过并发规则模块接口获取相应事件类型的并发规则列表,将这些并发规则列表各项进行与运算,就获得当前的并发规则列表。When a single event type occurs or is concurrent in the multitasking software system, the current concurrency rule list of the multitasking software system is the concurrency rule list of the event type. When multiple event types are concurrent, multiple event concurrency control modules based on concurrency rules obtain the concurrency rule list of the corresponding event type through the concurrency rule module interface, and perform an AND operation on these concurrency rule lists to obtain the current concurrency list of rules.

比如,当多任务软件系统中只有事件类型为A的事件发生时,则当前的并发规则列表如表4所示。该并发规则列表表示此时多任务软件系统只允许事件类型为A,B,D,F的事件并发处理,而事件类型为C,E,G的事件不能被并发处理。For example, when only events of event type A occur in the multi-tasking software system, the current list of concurrency rules is shown in Table 4. The concurrency rule list indicates that the multitasking software system only allows events of event types A, B, D, and F to be processed concurrently, while events of event types C, E, and G cannot be processed concurrently.

如果此时事件类型为B的事件又并发(因为根据此时的并发规则列表,事件类型为B的事件可以被并发处理),则基于并发规则的多个事件并发控制模块通过并发规则模块接口获取事件B的并发规则列表,然后,将表1所示的事件A的并发规则列表和表2所示的事件B的并发规则列表各项相与,将得到如表5所示的当前的并发规则列表。该并发规则列表表示此时多任务软件系统只允许事件类型为A,D的事件并发处理,而事件类型为B,C,E,F,G的事件不能被并发处理。If the event of event type B is concurrent at this time (because according to the concurrency rule list at this time, the event of event type B can be processed concurrently), multiple event concurrency control modules based on concurrency rules can be obtained through the concurrency rule module interface The concurrency rule list of event B, and then, the concurrency rule list of event A shown in Table 1 and the concurrency rule list of event B shown in Table 2 are combined, and the current concurrency rules shown in Table 5 will be obtained list. The concurrency rule list indicates that the multitasking software system only allows events of event types A and D to be processed concurrently, while events of event types B, C, E, F, and G cannot be processed concurrently.

如果此时事件类型为A的事件处理完成(此时多任务软件系统只有事件类型为B的事件在被处理),则当前的并发规则列表又会被更新为表6所示。该并发规则列表表示此时多任务软件系统只允许事件类型为A,C,D的事件并发处理,而事件类型为B,E,F,G的事件不能被并发处理。If the processing of the event of event type A is completed at this time (only the event of event type B is being processed in the multi-tasking software system at this time), the current concurrency rule list will be updated as shown in Table 6. The concurrency rule list indicates that the multitasking software system only allows events of event types A, C, and D to be processed concurrently, while events of event types B, E, F, and G cannot be processed concurrently.

                 表4  事件类型为A的事件发生时的并发规则列表   A   B   C   D   E   F   G   TRUE   TRUE   FALSE   TRUE   FALSE   TRUE   FALSE Table 4 List of concurrency rules when an event of event type A occurs A B C D. E. f G TRUE TRUE FALSE TRUE FALSE TRUE FALSE

                表5  事件类型为A与B的事件发生时的并发规则列表   A   B   C   D   E   F   G   TRUE   FALSE   FALSE   TRUE   FALSE   FALSE   FALSE Table 5 List of concurrency rules when events of event type A and B occur A B C D. E. f G TRUE FALSE FALSE TRUE FALSE FALSE FALSE

               表6  事件类型为B的事件发生时的并发规则列表   A   B   C   D   E   F   G   TRUE   FALSE   TRUE   TRUE   FALSE   FALSE   FALSE Table 6 List of concurrency rules when an event of event type B occurs A B C D. E. f G TRUE FALSE TRUE TRUE FALSE FALSE FALSE

多任务软件系统中的每一个可并发事件都有其事件优先级和抢占方式。事件优先级用于标识该事件的优先处理等级,抢占方式用于标识该提交事件正在处理时,如果高优先级事件发生而且该提交事件被抢占后,该提交事件的处理方式,其中包括该提交事件可以被丢弃或者被挂起。Each concurrent event in a multitasking software system has its event priority and preemption method. The event priority is used to identify the priority processing level of the event, and the preemption method is used to identify the processing method of the submission event if a high-priority event occurs and the submission event is preempted when the submission event is being processed, including the submission Events can be discarded or suspended.

当多任务软件系统中的一个可并发事件需要被处理时,负责处理该事件的子任务模块便向多个事件并发控制与并发调度装置申请一个事件标识。该事件标识由多个事件并发控制与并发调度装置中的事件标识模块统一分配并管理,以保证在多任务软件系统的整个运行期内唯一标识该事件。子任务模块获取到多个事件并发控制与并发调度装置返回的事件标识后,便将该事件提交给多个事件并发控制与调度装置。When a concurrent event in the multi-task software system needs to be processed, the subtask module responsible for processing the event applies for an event identifier to multiple event concurrency control and concurrency scheduling devices. The event identification is uniformly assigned and managed by the event identification modules in the multiple event concurrency control and concurrent scheduling devices, so as to ensure that the event is uniquely identified during the entire running period of the multi-task software system. The subtask module submits the event to multiple event concurrency control and scheduling devices after obtaining the event identifiers returned by the multiple event concurrency control and concurrency scheduling devices.

多个事件并发控制与并发调度装置接收到提交事件后,对该提交事件进行并发控制和并发调度处理。具体的处理过程如图4所示,包括如下步骤:Multiple event concurrency control and concurrency scheduling devices perform concurrency control and concurrent scheduling processing on the submission event after receiving the submission event. The specific processing process is shown in Figure 4, including the following steps:

步骤4-1、向多个事件并发控制与并发调度装置提交事件。Step 4-1. Submit events to multiple event concurrency control and concurrency scheduling devices.

当多任务软件系统中的一个可并发事件需要被处理时,子任务模块向多个事件并发控制与并发调度装置获取到事件标识后,便将该事件提交给多个事件并发控制与调度装置。When a concurrent event in the multi-task software system needs to be processed, the subtask module submits the event to multiple event concurrency control and scheduling devices after obtaining the event identifier from multiple event concurrency control and scheduling devices.

步骤4-2、判断该提交事件是否可以并发处理。Step 4-2, judging whether the submission event can be processed concurrently.

多个事件并发控制与并发调度装置接收到提交事件后,基于并发规则的多个事件并发控制模块根据当前的并发规则列表和提交事件的类型信息,判断该提交事件是否可以并发处理。如果是,则执行步骤4-3;否则,执行步骤4-4。After the multiple event concurrency control and concurrency scheduling device receives the submission event, the multiple event concurrency control module based on concurrency rules judges whether the submission event can be processed concurrently according to the current concurrency rule list and the type information of the submission event. If yes, go to step 4-3; otherwise, go to step 4-4.

步骤4-3、将提交事件加入处理事件列表。Step 4-3. Add the submission event to the processing event list.

如果基于并发规则的多个事件并发控制模块依据当前的并发规则列表,判定该提交事件可以并发,即提交事件当前可以被处理,则通知基于优先级的多个事件并发调度模块按照其优先级将该提交事件加入当前正在处理的事件列表,并根据该提交事件的事件类型更新当前的并发规则列表。然后,根据提交事件的任务标识,通知负责处理该提交事件的子任务模块进行相应事件处理。If multiple event concurrency control modules based on concurrency rules determine that the submission event can be concurrent according to the current concurrency rule list, that is, the submission event can be processed currently, then notify the priority-based multiple event concurrency scheduling module according to its priority. The submission event is added to the list of events currently being processed, and the current concurrency rule list is updated according to the event type of the submission event. Then, according to the task identifier of the submitted event, the subtask module responsible for processing the submitted event is notified to process the corresponding event.

步骤4-4、确定正在处理的事件当中与该提交事件存在并发冲突的所有事件。Step 4-4: Determine all events that have concurrency conflicts with the submission event among the events being processed.

如果基于并发规则的多个事件并发控制模块依据当前的并发规则列表,判定该提交事件不可以并发,即依据当前的并发规则,存在当前正在处理的事件与该提交事件的并发冲突。于是,基于并发规则的多个事件并发控制模块查看基于优先级的多个事件并发调度模块中的当前正在处理的事件列表,逐个找出与该提交事件存在并发冲突的事件,然后,执行步骤4-5。If multiple event concurrency control modules based on concurrency rules determine that the submission event cannot be concurrent according to the current concurrency rule list, that is, according to the current concurrency rules, there is a concurrency conflict between the event currently being processed and the submission event. Therefore, the multiple event concurrency control module based on concurrency rules checks the list of events currently being processed in the priority-based multiple event concurrency scheduling module, finds out the events that have concurrency conflicts with the submitted event one by one, and then performs step 4 -5.

步骤4-5、判断提交事件的优先级是否高于存在并发冲突的所有事件。Step 4-5, judging whether the priority of the submission event is higher than all events with concurrency conflicts.

基于并发规则的多个事件并发控制模块判断提交事件的优先级是否高于查找到的存在并发冲突的所有事件,如果是,则执行步骤4-7;否则,执行步骤4-6。The multiple event concurrency control module based on concurrency rules judges whether the priority of the submitted event is higher than all the found concurrency conflicting events, if yes, execute step 4-7; otherwise, execute step 4-6.

步骤4-6、将提交事件加入等待事件列表。Steps 4-6, adding the submission event to the waiting event list.

如果该提交事件的优先级较低,低于存在并发冲突的所有事件中优先级最高的事件,则基于并发规则的多个事件并发控制模块通知基于优先级的多个事件并发调度模块按照其优先级将该提交事件加入等待处理的事件列表。然后,根据提交事件的任务标识,通知负责处理该提交事件的子任务模块将该提交事件暂时挂起。If the priority of the submission event is lower than the highest priority event among all events with concurrency conflicts, the multiple event concurrency control module based on concurrency rules notifies the multiple event concurrency scheduling module based on priority The level adds the submission event to the list of events waiting to be processed. Then, according to the task identifier of the submission event, the subtask module responsible for processing the submission event is notified to temporarily suspend the submission event.

步骤4-7、将提交事件加入处理事件列表,将存在并发冲突的所有事件挂取或放弃。Steps 4-7, adding the submission event to the processing event list, and hooking or abandoning all events with concurrency conflicts.

如果该提交事件的优先级较高,高于存在并发冲突的所有事件的优先级。于是,多个事件并发控制与调度装置就会根据所有当前正在处理的存在并发冲突的所有事件的任务标识,通知负责处理所有这些事件的子任务模块根据所有这些事件的抢占方式,丢弃或者暂时挂起所有这些当前正在处理的存在并发冲突的事件。对于丢弃的事件,基于优先级的多个事件并发调度模块将该事件从当前正在处理的事件列表中去除。对于挂起的事件,基于优先级的多个事件并发调度模块将该事件从当前正在处理的事件列表中去除后,将其按照事件的优先级加入等待处理的事件列表。同时,负责该事件处理的子任务模块对被挂起的事件进行保存相关数据等适当的处理。If the commit event has a higher priority than all events with concurrency violations. Therefore, multiple event concurrency control and scheduling devices will notify the subtask modules responsible for processing all these events to discard or temporarily suspend them according to the preemption mode of all these events according to the task identifiers of all events currently being processed that have concurrency conflicts. All those currently processing events with concurrency violations. For a discarded event, the priority-based multiple event concurrent scheduling module removes the event from the list of currently processing events. For a pending event, after the priority-based multiple event concurrent scheduling module removes the event from the list of events currently being processed, it adds it to the list of events waiting to be processed according to the priority of the event. At the same time, the subtask module responsible for processing the event performs appropriate processing such as saving relevant data for the suspended event.

然后。基于优先级的多个事件并发调度模块按照其优先级将该提交事件加入当前正在处理的事件列表,基于并发规则的多个事件并发控制模块根据该提交事件的事件类型更新当前的并发规则列表。根据提交事件的任务标识,通知负责处理该提交事件的子任务模块进行相应事件处理。Then. The priority-based multiple event concurrency scheduling module adds the submission event to the current event list according to its priority, and the concurrency rule-based multiple event concurrency control module updates the current concurrency rule list according to the event type of the submission event. According to the task identifier of the submitted event, the subtask module responsible for processing the submitted event is notified to process the corresponding event.

在该实施例中,为了让多个事件并发控制与调度装置及时正确地了解各事件的当前状态,任务模块需要向多个事件并发控制与调度装置返回事件调度状态确认信息。任务模块需要返回事件调度状态确认信息的情况如下:In this embodiment, in order for the multiple event concurrency control and scheduling devices to know the current state of each event in a timely and correct manner, the task module needs to return event scheduling status confirmation information to the multiple event concurrency control and scheduling devices. The situations where the task module needs to return event scheduling status confirmation information are as follows:

1、多个事件并发控制与调度装置通知任务处理事件时,任务模块返回确认收到事件处理通知;1. When multiple event concurrency control and scheduling devices notify the task processing event, the task module returns to confirm receipt of the event processing notification;

2、多个事件并发控制与调度装置通知任务挂起事件时,任务模块返回确认收到事件挂起通知;2. When multiple event concurrency control and scheduling devices notify the task suspension event, the task module returns to confirm receipt of the event suspension notification;

3、多个事件并发控制与调度装置通知任务丢弃事件时,任务模块返回确认收到事件丢弃通知;3. When multiple event concurrency control and scheduling devices notify the task discarding event, the task module returns to confirm receipt of the event discarding notification;

4、在任何事件处理完成时,任务模块向多个事件并发控制与调度装置返回确认事件处理完成。4. When any event processing is completed, the task module returns confirmation to the multiple event concurrency control and scheduling devices that the event processing is completed.

在上述的四种情况中,事件处理完成时的状态确认信息上报是必须的,其他情况的事件调度状态确认是可选的。当任务模块向多个事件并发控制与调度装置返回一个确认事件处理完成的状态确认信息后,多个事件并发控制与并发调度装置需要进行相应的并发控制和并发调度处理,具体处理过程如图5所示,包括如下步骤:In the above four cases, it is necessary to report the status confirmation information when the event processing is completed, and the event scheduling status confirmation in other cases is optional. After the task module returns a status confirmation message confirming the completion of event processing to multiple event concurrency control and scheduling devices, multiple event concurrency control and concurrency scheduling devices need to perform corresponding concurrency control and concurrent scheduling processing, the specific processing process is shown in Figure 5 shown, including the following steps:

步骤5-1、向多个事件并发控制与并发调度装置返回事件处理完成状态报告。Step 5-1: Return an event processing completion status report to multiple event concurrency control and concurrency scheduling devices.

当任务模块将正在处理的事件列表中的一个事件处理完成后,便向多个事件并发控制与并发调度装置返回事件处理完成状态报告。After the task module finishes processing an event in the processing event list, it returns an event processing completion status report to multiple event concurrency control and concurrency scheduling devices.

步骤5-2、判断等待列表中最高优先级事件是否可以并发处理。Step 5-2, judging whether the highest priority event in the waiting list can be processed concurrently.

多个事件并发控制与并发调度装置收到事件处理完成状态报告后,基于并发规则的多个事件并发控制模块便根据当前的并发规则列表,判断等待列表中优先级最高的事件当前是否可以并发处理,如果可以,则执行步骤5-3;否则,执行步骤5-4。After the multiple event concurrency control and concurrency scheduling device receives the event processing completion status report, the multiple event concurrency control module based on concurrency rules judges whether the event with the highest priority in the waiting list can be processed concurrently according to the current concurrency rule list , if yes, go to step 5-3; otherwise, go to step 5-4.

步骤5-3、将该等待事件加入处理事件列表。Step 5-3, adding the waiting event to the processing event list.

如果基于并发规则的多个事件并发控制模块依据当前的并发规则列表,判定该等待事件可以并发,即该等待事件当前可以被处理,则通知基于优先级的多个事件并发调度模块按照其优先级将该等待事件加入当前正在处理的事件列表,并根据该等待事件的事件类型更新当前的并发规则列表。然后,根据提交该等待事件的任务标识,通知负责处理该等待事件的子任务模块进行相应事件处理。If multiple event concurrency control modules based on concurrency rules determine that the waiting event can be concurrent according to the current concurrency rule list, that is, the waiting event can be processed currently, then notify the priority-based multiple event concurrency scheduling module according to its priority The waiting event is added to the current event list being processed, and the current concurrency rule list is updated according to the event type of the waiting event. Then, according to the task identifier submitting the waiting event, the subtask module responsible for processing the waiting event is notified to process the corresponding event.

步骤5-4、确定正在处理的事件当中与该等待事件存在并发冲突的所有事件。Step 5-4: Determine all events that have concurrency conflicts with the waiting event among the events being processed.

如果基于并发规则的多个事件并发控制模块依据当前的并发规则列表,判定该等待事件不可以并发,即依据当前的并发规则,存在当前正在处理的事件与该等待事件的并发冲突。于是,基于并发规则的多个事件并发控制模块查看基于优先级的多个事件并发调度模块中的当前正在处理的事件列表,逐个找出所有与该等待事件存在并发冲突的事件,然后,执行步骤5-5。If multiple event concurrency control modules based on concurrency rules determine that the waiting event cannot be concurrent according to the current concurrency rule list, that is, according to the current concurrency rules, there is a concurrency conflict between the event currently being processed and the waiting event. Therefore, the multiple event concurrency control module based on concurrency rules checks the list of events currently being processed in the priority-based multiple event concurrency scheduling module, finds out all events that have concurrency conflicts with the waiting event one by one, and then executes the steps 5-5.

步骤5-5、判断该等待事件的优先级是否高于存在并发冲突的所有事件。Step 5-5, judging whether the priority of the waiting event is higher than all events with concurrency conflicts.

多个事件并发控制与调度装置将该等待事件的优先级和找出的所有与该等待事件存在并发冲突的事件的优先级进行比较,如果该等待事件的优先级较高,高于存在并发冲突的所有事件的优先级。则执行步骤5-7;否则,执行步骤5-6。Multiple event concurrency control and scheduling devices compare the priority of the waiting event with the priorities of all found events that have concurrency conflicts with the waiting event, and if the priority of the waiting event is higher than that of the concurrency conflict The priority of all events for . Then execute step 5-7; otherwise, execute step 5-6.

步骤5-6、将该等待事件保留在等待事件列表。Step 5-6, keep the waiting event in the waiting event list.

如果该等待事件的优先级较低,低于存在并发冲突的所有事件中优先级最高的事件,则基于并发规则的多个事件并发控制模块通知基于优先级的多个事件并发调度模块将该等待事件继续停留在等待处理的事件列表。If the priority of the waiting event is lower than the event with the highest priority among all events with concurrency conflicts, the multiple event concurrency control module based on concurrency rules notifies the priority-based multiple event concurrency scheduling module to wait Events continue to stay on the pending events list.

步骤5-7、将该等待事件加入处理事件列表,将存在并发冲突的所有事件挂取或放弃。Steps 5-7, adding the waiting event to the processing event list, and hooking or giving up all events with concurrency conflicts.

多个事件并发控制与调度装置根据所有当前正在处理的存在并发冲突的所有事件的任务标识,通知负责处理所有这些事件的子任务模块根据所有这些事件的抢占方式,丢弃或者暂时挂起所有这些当前正在处理的存在并发冲突的事件。对于丢弃的事件,基于优先级的多个事件并发调度模块将该事件从当前正在处理的事件列表中去除。对于挂起的事件,基于优先级的多个事件并发调度模块将该事件从当前正在处理的事件列表中去除后,将其按照事件的优先级加入等待处理的事件列表。同时,负责该事件处理的子任务模块对被挂起的事件进行保存相关数据等适当的处理。The multi-event concurrency control and scheduling device notifies the subtask modules responsible for processing all these events according to the task identifications of all the events currently being processed that have concurrency conflicts, and discards or temporarily suspends all these current events according to the preemption mode of all these events. The event being processed with a concurrency violation. For a discarded event, the priority-based multiple event concurrent scheduling module removes the event from the list of currently processing events. For a pending event, after the priority-based multiple event concurrent scheduling module removes the event from the list of events currently being processed, it adds it to the list of events waiting to be processed according to the priority of the event. At the same time, the subtask module responsible for processing the event performs appropriate processing such as saving relevant data for the suspended event.

然后。基于优先级的多个事件并发调度模块按照其优先级将该等待事件加入当前正在处理的事件列表,基于并发规则的多个事件并发控制模块根据该等待事件的事件类型更新当前的并发规则列表。根据等待事件的任务标识,通知负责处理该等待事件的子任务模块进行相应事件处理。Then. The priority-based multiple event concurrency scheduling module adds the waiting event to the current event list according to its priority, and the concurrency rule-based multiple event concurrency control module updates the current concurrency rule list according to the event type of the waiting event. According to the task identifier of the waiting event, the subtask module responsible for processing the waiting event is notified to process the corresponding event.

在现有技术中虽然已经有了根据并发规则,对多任务软件系统中可并发事件进行处理的方法,但现有的处理方法没有采取可并发事件类型的优先级的概念。因此,本发明将可并发事件类型的并发规则和优先级相结合,还提出了一种多任务软件系统中并发事件的处理方法,该方法包括如下步骤:Although there is a method for processing concurrent events in a multi-tasking software system according to concurrency rules in the prior art, the existing processing method does not adopt the concept of priority of concurrent event types. Therefore, the present invention combines concurrency rules and priorities of concurrent event types, and also proposes a processing method for concurrent events in a multitasking software system, which method includes the following steps:

步骤6-1、设置多任务软件系统中可并发事件类型的并发规则和优先级信息。Step 6-1, setting concurrency rules and priority information of concurrency event types in the multitasking software system.

本发明所述方法首先需要在多任务软件系统中,设置所有可并发事件类型的并发规则和优先级信息。所有可并发事件类型的并发规则可以通过并发矩阵来表示。The method of the present invention first needs to set concurrency rules and priority information of all concurrent event types in the multi-task software system. Concurrency rules for all concurrency event types can be represented by a concurrency matrix.

该方法还可以根据多任务软件系统中所有正在处理的事件类型的并发规则,通过进行与运算得到当前的并发规则列表。The method can also obtain the current concurrency rule list by performing an AND operation according to the concurrency rules of all types of events being processed in the multi-task software system.

步骤6-2、根据多任务软件系统中所有正在处理的事件类型的并发规则,判断当前需要被处理的可并发事件能不能并发。Step 6-2. According to the concurrency rules of all types of events being processed in the multitasking software system, it is judged whether concurrent events that need to be processed can be concurrent.

在多任务软件系统中的可并发事件需要被处理时,根据多任务软件系统中所有正在处理的事件类型的并发规则,判断当前需要被处理的可并发事件能不能并发。When concurrent events in the multitasking software system need to be processed, according to the concurrency rules of all types of events being processed in the multitasking software system, it is judged whether the concurrent events that need to be processed currently can be concurrent.

如果已经生成了多任务软件系统当前的并发规则列表,则根据该并发规则列表判断当前需要被处理的可并发事件能不能并发。If the current concurrency rule list of the multi-tasking software system has been generated, it is judged according to the concurrency rule list whether concurrent events that need to be processed can be concurrent.

如果判断当前需要被处理的可并发事件能够并发,则执行步骤6-3;否则,执行步骤6-4。If it is judged that the concurrent events that need to be processed can be concurrent, execute step 6-3; otherwise, execute step 6-4.

步骤6-3、确定当前需要被处理的可并发事件的状态为正在处理状态,对该事件进行相应的事务处理。Step 6-3: Determine that the current state of the concurrent event that needs to be processed is the processing state, and perform corresponding transaction processing on the event.

如果根据多任务软件系统中所有正在处理的事件类型的并发规则或当前的并发规则列表,判定该事件可以并发,即该事件当前可以被处理,则将该当前需要被处理的可并发事件按照其优先级加入正在处理状态,对该事件进行相应的事务处理。并根据所有正在处理的事件类型的并发规则更新当前的并发规则列表。If it is determined that the event can be concurrent according to the concurrency rules of all types of events being processed in the multi-tasking software system or the current list of concurrency rules, that is, the event can be processed currently, then the current concurrency event that needs to be processed will be processed according to its The priority is added to the processing state, and the event is processed accordingly. And update the current list of concurrency rules according to the concurrency rules of all event types being processed.

在多任务软件系统中一个正在处理的事件处理完毕后,则处于等待处理状态的事件中优先级最高的事件成为当前需要被处理的可并发事件。After an event being processed in the multi-tasking software system is processed, the event with the highest priority among the events waiting to be processed becomes a concurrent event that needs to be processed currently.

步骤6-4、根据所述需要被处理的可并发事件的优先级和存在并发冲突的所有事件的优先级之间的关系,确定该需要被处理的可并发事件能不能并发。Step 6-4: According to the relationship between the priority of the concurrent event that needs to be processed and the priority of all events with concurrency conflicts, determine whether the concurrent event that needs to be processed can be concurrent.

如果根据多任务软件系统中所有当前正在处理的事件类型的并发规则或当前的并发规则列表,判定该事件不能并发,则在多任务软件系统当前正在处理的事件中找出所有与该事件存在并发冲突的事件,并判断查找出来的事件和该事件的优先级的关系。If it is judged that the event cannot be concurrent according to the concurrency rules of all event types currently being processed in the multitasking software system or the current concurrency rule list, then find out all the events that are currently being processed by the multitasking software system. Conflicting events, and judge the relationship between the found event and the priority of the event.

如果该需要被处理的可并发事件的优先级大于所有查找到的事件的优先级,则执行步骤6-5;否则,执行步骤6-6。If the priority of the concurrent event that needs to be processed is greater than the priorities of all found events, execute step 6-5; otherwise, execute step 6-6.

步骤6-5、确定需要被处理的可并发事件的状态为正在处理状态,对该事件进行相应的事务处理。Step 6-5: Determine that the state of the concurrent event that needs to be processed is the processing state, and perform corresponding transaction processing on the event.

将该当前需要被处理的可并发事件按照其优先级加入正在处理状态,对该事件进行相应的事务处理。将查找到的事件的状态更新为等待处理状态并将该事件挂起,或者,将查找到的事件直接丢弃。Add the current concurrent event that needs to be processed to the processing state according to its priority, and perform corresponding transaction processing on the event. Update the status of the found event to the pending processing state and suspend the event, or directly discard the found event.

根据多任务软件系统中所有正在处理的事件类型的并发规则更新当前的并发规则列表。The current concurrency rule list is updated according to the concurrency rules of all event types being processed in the multitasking software system.

步骤6-6、确定该当前需要被处理的可并发事件的状态为等待处理状态,将该事件挂起。Step 6-6. Determine that the state of the current concurrent event that needs to be processed is the state of waiting for processing, and suspend the event.

确定该当前需要被处理的可并发事件的状态为等待处理状态,将该事件按照其优先级加入等待处理状态,将该事件挂起。It is determined that the state of the current concurrent event that needs to be processed is the state of waiting for processing, adding the event to the state of waiting for processing according to its priority, and suspending the event.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求书的保护范围为准。The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present invention can easily think of changes or Replacement should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (14)

1、一种多任务软件系统中并发事件的处理装置,其特征在于,包括:1. A processing device for concurrent events in a multitasking software system, characterized in that it comprises: 任务模块:用于在多任务软件系统中的可并发事件需要被处理时,向并发处理模块提交该事件,并根据并发处理模块返回的该事件的并发控制信息,对该事件进行相应的处理;Task module: when a concurrent event in the multitasking software system needs to be processed, submit the event to the concurrent processing module, and process the event accordingly according to the concurrency control information of the event returned by the concurrent processing module; 并发处理模块:用于维护多任务软件系统中可并发事件类型的并发规则和任务模块提交过来的事件的状态信息,根据该并发规则和状态信息,生成接收到的提交事件的并发控制信息,并将该并发控制信息传递给任务模块。Concurrency processing module: used to maintain the concurrency rules of concurrency event types in the multi-task software system and the state information of the events submitted by the task module, according to the concurrency rules and state information, generate the concurrency control information of the received submitted events, and Pass the concurrency control information to the task module. 2、根据权利要求1所述多任务软件系统中并发事件的处理装置,其特征在于,所述的任务模块具体包括:2. The device for processing concurrent events in the multi-task software system according to claim 1, wherein the task module specifically includes: 事件提交模块:用于当可并发事件需要被处理时,向并发处理模块提交该事件,并接收并发处理模块返回的该事件的并发控制信息,将该并发控制信息传递给事件处理模块,将事件处理模块返回的事件处理状态信息传递给并发处理模块;Event submission module: used to submit the event to the concurrent processing module when a concurrent event needs to be processed, receive the concurrency control information of the event returned by the concurrent processing module, pass the concurrency control information to the event processing module, and send the event The event processing status information returned by the processing module is passed to the concurrent processing module; 事件处理模块:用于根据接收到的并发控制信息,对相应的可并发事件进行相应的事务处理或者将该可并发事件挂起或者将该可并发事件丢弃,并返回事件处理状态信息给事件提交模块。Event processing module: used to perform corresponding transaction processing on the corresponding concurrent event or suspend the concurrent event or discard the concurrent event according to the received concurrency control information, and return the event processing status information to the event submission module. 3、根据权利要求2所述多任务软件系统中并发事件的处理装置,其特征在于,所述的任务模块还包括:3. The device for processing concurrent events in the multi-task software system according to claim 2, wherein the task module further comprises: 事件标识模块:用于当可并发事件需要被处理时,生成在多任务软件系统的整个运行期内唯一标识该事件的事件标识,并将该事件标识传递给事件处理模块和事件提交模块。Event identification module: used to generate an event identification that uniquely identifies the event during the entire operation period of the multi-tasking software system when a concurrent event needs to be processed, and pass the event identification to the event processing module and the event submission module. 4、根据权利要求1、2或3所述多任务软件系统中并发事件的处理装置,其特征在于,所述的并发处理模块具体包括:4. The device for processing concurrent events in the multi-tasking software system according to claim 1, 2 or 3, wherein the concurrent processing module specifically includes: 并发规则模块:用于定义和维护多任务软件系统中所有可并发事件类型的并发规则,并通过接口将该并发规则传递给并发控制和调度模块;Concurrency rule module: used to define and maintain concurrency rules for all concurrency event types in the multi-tasking software system, and pass the concurrency rules to the concurrency control and scheduling module through the interface; 并发控制和调度模块:用于维护所有接收到的提交事件的状态信息,并根据该状态信息和接收到的并发规则,生成接收到的提交事件的并发控制信息,并将该并发控制信息返回给任务模块。Concurrency control and scheduling module: used to maintain the status information of all received submission events, and generate the concurrency control information of the received submission events according to the status information and the received concurrency rules, and return the concurrency control information to task module. 5、根据权利要求4所述多任务软件系统中并发事件的处理装置,其特征在于,所述的并发规则模块包括:5. The device for processing concurrent events in the multi-tasking software system according to claim 4, wherein the concurrent rule module includes: 并发规则矩阵模块:用于使用矩阵来集中表示多任务软件系统中所有可并发事件类型的并发规则。Concurrency rule matrix module: used to use matrix to centrally represent concurrency rules of all concurrency event types in a multi-tasking software system. 6、根据权利要求5所述多任务软件系统中并发事件的处理装置,其特征在于,所述的并发控制和调度模块具体包括:6. The device for processing concurrent events in the multi-tasking software system according to claim 5, wherein the concurrent control and scheduling module specifically includes: 并发调度模块:用于维护所有正在处理的和所有处于等待处理状态的事件的状态信息,其中包括事件的类型和优先级信息,并将该事件状态信息传递给并发控制模块;Concurrent scheduling module: used to maintain the state information of all events being processed and all events waiting to be processed, including the type and priority information of the event, and pass the event state information to the concurrency control module; 并发控制模块:用于根据接收到的并发规则和并发调度模块传递过来的事件状态信息,确定接收到的提交事件的状态信息,并生成相应的并发控制信息,将该并发控制信息传递给任务模块;Concurrency control module: used to determine the status information of the received submitted event according to the received concurrency rules and the event status information passed by the concurrency scheduling module, and generate corresponding concurrency control information, and pass the concurrency control information to the task module ; 事件处理状态信息接收模块:用于接收任务模块返回的事件处理状态信息,当接收到事件处理完毕的状态信息后,则通知并发调度模块将处于等待处理状态的事件中优先级最高的事件提交给并发控制模块。Event processing status information receiving module: used to receive the event processing status information returned by the task module. After receiving the status information that the event processing is completed, it will notify the concurrent scheduling module to submit the event with the highest priority among the events waiting to be processed to Concurrency control module. 7、根据权利要求6所述多任务软件系统中并发事件的处理装置,其特征在于,所述的并发调度模块包括:7. The device for processing concurrent events in the multi-task software system according to claim 6, wherein the concurrent scheduling module includes: 当前正在处理的事件列表:用于按照优先级从高到低排列所有正在处理的事件;List of events currently being processed: used to arrange all events being processed in descending order of priority; 等待处理的事件列表:用于按照优先级从高到低排列所有正处于等待处理状态的事件。List of events waiting to be processed: used to arrange all events that are in the state of waiting to be processed according to the priority from high to low. 8、根据权利要求7所述多任务软件系统中并发事件的处理装置,其特征在于,所述的并发控制模块具体包括:8. The device for processing concurrent events in the multi-tasking software system according to claim 7, wherein the concurrent control module specifically includes: 并发判断模块:用于根据接收到的并发规则,判断接收到的提交事件当前能不能并发,如果能并发,则通知并发调度模块将该事件加入当前正在处理的事件列表,生成该事件的并发控制信息,并将该信息传递给任务模块;如果不能并发,则将该事件提交给优先级判断模块;Concurrency Judgment Module: It is used to judge whether the received submission event can be concurrent according to the received concurrency rules. If it can be concurrent, it will notify the Concurrency Scheduling Module to add the event to the list of events currently being processed, and generate the concurrency control of the event information, and pass the information to the task module; if it cannot be concurrent, submit the event to the priority judgment module; 优先级判断模块:用于在当前正在处理的事件列表中找出所有与提交事件存在并发冲突的事件,然后判断提交事件的优先级是否大于所有查找出来的事件的优先级,如果是,则通知并发调度模块将该事件加入当前正在处理的事件列表,将所有查找出来的事件加入等待处理的事件列表或丢弃;否则,将该事件加入等待处理的事件列表,然后生成相应的并发控制信息,并将该信息传递给任务模块。Priority judging module: used to find out all events that have concurrent conflicts with the submitted event in the list of events currently being processed, and then judge whether the priority of the submitted event is greater than the priority of all found events, and if so, notify The concurrent scheduling module adds the event to the list of events currently being processed, and adds all found events to the list of events waiting to be processed or discards them; otherwise, adds the event to the list of events waiting to be processed, and then generates corresponding concurrency control information, and Pass that information to the task module. 9、根据权利要求8所述多任务软件系统中并发事件的处理装置,其特征在于,所述的并发控制模块包括:9. The device for processing concurrent events in the multi-tasking software system according to claim 8, wherein the concurrent control module includes: 当前的并发规则生成模块:用于根据多任务软件系统中所有正在处理的事件类型的并发规则,通过进行与运算得到当前的并发规则列表,并把该表传递给并发判断模块。The current concurrency rule generation module: used for obtaining the current concurrency rule list through AND operation according to the concurrency rules of all types of events being processed in the multi-tasking software system, and passing the list to the concurrency judgment module. 10、一种多任务软件系统中并发事件的处理方法,其特征在于,包括:10. A method for processing concurrent events in a multitasking software system, comprising: A、设置多任务软件系统中可并发事件类型的并发规则和优先级信息;A. Set concurrency rules and priority information of concurrent event types in the multi-tasking software system; B、根据所述设置的信息,对多任务软件系统中需要被处理的可并发事件进行相应的处理。B. According to the set information, correspondingly process the concurrent events that need to be processed in the multi-tasking software system. 11、根据权利要求10所述多任务软件系统中并发事件的处理方法,其特征在于,所述的步骤A还包括:11. The method for processing concurrent events in the multi-tasking software system according to claim 10, wherein said step A further comprises: 根据多任务软件系统中所有正在处理的事件类型的并发规则,通过进行与运算得到当前的并发规则列表。According to the concurrency rules of all event types being processed in the multi-tasking software system, the current concurrency rule list is obtained by performing an AND operation. 12、根据权利要求10或11所述多任务软件系统中并发事件的处理方法,其特征在于,所述的步骤B具体包括:12. The method for processing concurrent events in the multi-tasking software system according to claim 10 or 11, wherein the step B specifically includes: B1、根据多任务软件系统中所有正在处理的事件类型的并发规则,判断当前需要被处理的可并发事件能不能并发,如果能,则执行步骤B2;否则,执行步骤B3;B1. According to the concurrency rules of all types of events being processed in the multi-tasking software system, judge whether the concurrent events that need to be processed can be concurrent, and if so, perform step B2; otherwise, perform step B3; B2、确定当前需要被处理的可并发事件的状态为正在处理状态,对该事件进行相应的事务处理;B2. Determine that the current state of the concurrent event that needs to be processed is the processing state, and perform corresponding transaction processing on the event; B3、根据所述需要被处理的可并发事件的优先级和存在并发冲突的所有事件的优先级之间的关系,确定该需要被处理的可并发事件能不能并发。B3. According to the relationship between the priorities of the concurrent events that need to be processed and the priorities of all events that have concurrency conflicts, determine whether the concurrent events that need to be processed can be concurrent. 13、根据权利要求12所述多任务软件系统中并发事件的处理方法,其特征在于,所述的步骤B3具体包括:13. The method for processing concurrent events in the multi-tasking software system according to claim 12, wherein said step B3 specifically comprises: B31、在当前正在处理的事件中找出所有与该需要被处理的可并发事件存在并发冲突的事件,如果该需要被处理的可并发事件的优先级大于所有查找到的事件的优先级,则执行步骤B32;否则,执行步骤B33;B31. Find all events that have concurrency conflicts with the concurrent events that need to be processed in the events that are currently being processed. If the priority of the concurrent events that need to be processed is greater than the priority of all found events, then Execute step B32; otherwise, execute step B33; B32、确定需要被处理的可并发事件的状态为正在处理状态,对该事件进行相应的事务处理,将查找到的事件的状态更新为等待处理状态并将该事件挂起,或者,将查找到的事件直接丢弃;B32. Determine that the state of the concurrent event that needs to be processed is the processing state, perform corresponding transaction processing on the event, update the state of the found event to the waiting processing state and suspend the event, or, find the event events are discarded directly; B33、确定该当前需要被处理的可并发事件的状态为等待处理状态,将该事件挂起。B33. Determine that the current state of the concurrent event that needs to be processed is a waiting state, and suspend the event. 14、根据权利要求13所述多任务软件系统中并发事件的处理方法,其特征在于,所述的步骤B还包括:14. The method for processing concurrent events in the multi-tasking software system according to claim 13, wherein said step B further comprises: 在多任务软件系统中一个正在处理的事件处理完毕后,则处于等待处理状态的事件中优先级最高的事件成为当前需要被处理的可并发事件。After an event being processed in the multi-tasking software system is processed, the event with the highest priority among the events waiting to be processed becomes a concurrent event that needs to be processed currently.
CNB2005100801655A 2005-06-30 2005-06-30 Cocurrent event processing device and method in multi-task software system Expired - Fee Related CN100530105C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100801655A CN100530105C (en) 2005-06-30 2005-06-30 Cocurrent event processing device and method in multi-task software system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100801655A CN100530105C (en) 2005-06-30 2005-06-30 Cocurrent event processing device and method in multi-task software system

Publications (2)

Publication Number Publication Date
CN1889045A true CN1889045A (en) 2007-01-03
CN100530105C CN100530105C (en) 2009-08-19

Family

ID=37578323

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100801655A Expired - Fee Related CN100530105C (en) 2005-06-30 2005-06-30 Cocurrent event processing device and method in multi-task software system

Country Status (1)

Country Link
CN (1) CN100530105C (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867647A (en) * 2010-04-30 2010-10-20 中兴通讯股份有限公司 Method and device for processing concurrency conflicts in mobile terminal
WO2010130131A1 (en) * 2009-05-13 2010-11-18 中兴通讯股份有限公司 System and method for parallel processing of equipment management tasks
CN101741850B (en) * 2009-12-25 2012-05-30 北京邮电大学 Multitask concurrent executive system and method for hybrid network service
CN101567873B (en) * 2008-04-25 2013-05-15 锐迪科微电子(上海)有限公司 Multitask Parallel processing method and multitask parallel processing system
CN103530173A (en) * 2012-07-06 2014-01-22 上海宝信软件股份有限公司 Dynamic weighted event processing system and method
US9641669B2 (en) 2012-12-14 2017-05-02 Apple Inc. Automatically modifying a do not disturb function in response to device motion
CN107728785A (en) * 2017-10-16 2018-02-23 南京阿凡达机器人科技有限公司 Robot interactive method and its system
US10447844B2 (en) 2012-12-14 2019-10-15 Apple Inc. Method and apparatus for automatically setting alarms and notifications
US10854066B2 (en) 2018-04-12 2020-12-01 Apple Inc. Methods and systems for disabling sleep alarm based on automated wake detection

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5247677A (en) 1992-05-22 1993-09-21 Apple Computer, Inc. Stochastic priority-based task scheduler
US6567839B1 (en) * 1997-10-23 2003-05-20 International Business Machines Corporation Thread switch control in a multithreaded processor system
US6411982B2 (en) * 1998-05-28 2002-06-25 Hewlett-Packard Company Thread based governor for time scheduled process execution
US6918006B1 (en) * 2000-10-30 2005-07-12 International Business Machines Corporation System and method to coordinate data storage device management operations in a data storage subsystem

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567873B (en) * 2008-04-25 2013-05-15 锐迪科微电子(上海)有限公司 Multitask Parallel processing method and multitask parallel processing system
WO2010130131A1 (en) * 2009-05-13 2010-11-18 中兴通讯股份有限公司 System and method for parallel processing of equipment management tasks
CN101741850B (en) * 2009-12-25 2012-05-30 北京邮电大学 Multitask concurrent executive system and method for hybrid network service
CN101867647A (en) * 2010-04-30 2010-10-20 中兴通讯股份有限公司 Method and device for processing concurrency conflicts in mobile terminal
CN101867647B (en) * 2010-04-30 2013-10-16 中兴通讯股份有限公司 Method and device for processing concurrency conflict in mobile terminal
CN103530173B (en) * 2012-07-06 2018-07-17 上海宝信软件股份有限公司 Changeable weight event handling system and method
CN103530173A (en) * 2012-07-06 2014-01-22 上海宝信软件股份有限公司 Dynamic weighted event processing system and method
US9641669B2 (en) 2012-12-14 2017-05-02 Apple Inc. Automatically modifying a do not disturb function in response to device motion
US10447844B2 (en) 2012-12-14 2019-10-15 Apple Inc. Method and apparatus for automatically setting alarms and notifications
US10742797B2 (en) 2012-12-14 2020-08-11 Apple Inc. Method and apparatus for automatically setting alarms and notifications
US11039004B1 (en) 2012-12-14 2021-06-15 Apple Inc. Method and apparatus for automatically setting alarms and notifications
US11553076B1 (en) 2012-12-14 2023-01-10 Apple Inc. Method and apparatus for automatically setting alarms and notifications
US11889016B1 (en) 2012-12-14 2024-01-30 Apple Inc. Method and apparatus for automatically setting alarms and notifications
US12166915B1 (en) 2012-12-14 2024-12-10 Apple Inc. Method and apparatus for automatically setting alarms and notifications
CN107728785A (en) * 2017-10-16 2018-02-23 南京阿凡达机器人科技有限公司 Robot interactive method and its system
US10854066B2 (en) 2018-04-12 2020-12-01 Apple Inc. Methods and systems for disabling sleep alarm based on automated wake detection
US11189159B2 (en) 2018-04-12 2021-11-30 Apple Inc. Methods and systems for disabling sleep alarm based on automated wake detection
US11862004B2 (en) 2018-04-12 2024-01-02 Apple Inc. Methods and systems for disabling sleep alarm based on automated wake detection

Also Published As

Publication number Publication date
CN100530105C (en) 2009-08-19

Similar Documents

Publication Publication Date Title
CN1270239C (en) Processing system or tast control method on computer system and and computer program
CN1783123A (en) Process execution management based on resource requirements and business impacts
CN1152304C (en) Method and device for parallel data processing
CN1149479C (en) Data management system for real-time system
CN1908903A (en) System and method for executing job step, and computer product
CN1906575A (en) Dynamic software update system, method and program product
CN1680959A (en) Process editing device and method and process management device and method
CN1889045A (en) Cocurrent event processing device and method in multi-task software system
CN1643498A (en) Task management device and method, operation judgment device and method, and program to be judged
CN101052040A (en) Network interoperation system based on virtual layer and plug-in part technology
CN1698051A (en) Program, data processing method and data processing device
CN1538702A (en) Home network device and system for collaborative work service and method thereof
CN1917504A (en) Method for preventing deadlock caused by accessing shared data of resources
CN1711523A (en) Method and apparatus for managing resource contention in a multisystem cluster
CN1701320A (en) Reconfigurable signal processing module
CN1591339A (en) System and method for providing shared web modules
CN1787459A (en) Method and system for transmitting order to lower levels
CN1637712A (en) Apparatus and method for interrupt control
CN1101573C (en) Computer system
CN1202473C (en) Information processing method and information processing apparatus having interrupt control function with priority orders
CN100351793C (en) Task scheduling method for embedded real-time operation system supporting OSEK standard
CN1920878A (en) Image processing apparatus
CN1906598A (en) Information processing apparatus, memory area management method, and computer program
CN1889048A (en) Package realizing method and system
CN1755661A (en) Information processing apparatus and method and program

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090819

CF01 Termination of patent right due to non-payment of annual fee