WO2011131079A1 - Event processing method and system for distributed control system - Google Patents

Event processing method and system for distributed control system Download PDF

Info

Publication number
WO2011131079A1
WO2011131079A1 PCT/CN2011/072337 CN2011072337W WO2011131079A1 WO 2011131079 A1 WO2011131079 A1 WO 2011131079A1 CN 2011072337 W CN2011072337 W CN 2011072337W WO 2011131079 A1 WO2011131079 A1 WO 2011131079A1
Authority
WO
WIPO (PCT)
Prior art keywords
event
processing
data
dcs server
dcs
Prior art date
Application number
PCT/CN2011/072337
Other languages
French (fr)
Chinese (zh)
Inventor
王常力
施波
宋晓玉
马建新
罗斌
Original Assignee
杭州和利时自动化有限公司
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 杭州和利时自动化有限公司 filed Critical 杭州和利时自动化有限公司
Publication of WO2011131079A1 publication Critical patent/WO2011131079A1/en

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM]
    • G05B19/4185Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM] characterised by the network communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • DCS Distributed Control System
  • the high-efficiency, stable and well-functioning event processing technology is the central link of real-time processing of data and events in the DCS system.
  • the technical indicators and operational effects that can be achieved play an important role in the safety of the industrial control site.
  • the event processing technology mainly determines the type of event generated based on the field acquisition data, algorithm operation results and engineering data uploaded by the control station, such as: alarm or displacement of the switch quantity, limit alarm of the analog quantity, field module and channel
  • the instrument is faulty.
  • functions such as storage of events, queried and alarms are also provided.
  • FIG. 1 The implementation scheme similar to the present invention is shown in FIG. 1.
  • the DCS control station program During the generation and processing of the event, the DCS control station program generates corresponding events according to the collected field data and engineering data, and then the event number and the variable. The data is sent to the real-time DCS server. After receiving the event number, the real-time DCS server calls the event handler to generate and log the event, while responding to the operator station's access and operation of the event.
  • the control station shall upload the collected field data, algorithm operation result and event number to the DCS real-time processing task. Although the processing speed of the control station is high, it is undoubtedly judged at the control station. Reduced the processing efficiency. At the same time, the upload of the event number increases the network data packet, which inevitably increases the network load and improves the communication error rate. In addition, after receiving the uploaded data, the real-time processing task needs to process the variable data and update it to the database on the one hand, and process and store the event on the other hand. At the same time, real-time processing tasks also respond to operator requests for real-time data and events. This design pattern that combines data management and event processing seriously affects the performance of the system and cannot meet the performance requirements of the DCS system for real-time processing, stable operation, and efficient throughput.
  • the embodiments of the present invention provide an event processing method and system for a distributed control system, so as to improve the efficiency of the distributed control system for event processing.
  • An embodiment of the present invention provides an event processing method for a distributed control system, where the method includes: a distributed control system DCS server receives variable data uploaded by a control station;
  • the DCS server determines whether the variable data generates a new event, and if so, the DCS server processes the event according to the preset event processing rule.
  • the method further includes:
  • the DCS server stores real-time data generated when the event is processed.
  • the DCS server determines whether the variable data generates a new event, and the method includes: comparing, by the DCS server, whether a current item value corresponding to the variable data is the same as a stored item value, and if not, determining to generate a new one. event.
  • the DCS server processes the event according to a preset event processing rule, including:
  • the DCS server obtains identification information corresponding to the current event
  • the DCS server obtains, according to the identifier information, a processing rule corresponding to the identifier information in a preset event processing rule;
  • the DCS server performs corresponding processing on the current data according to the processing rule.
  • the preset event processing rule is set in a configuration file manner.
  • the method further includes:
  • the DCS server detects whether there is a duplicate write in the stored real-time data for the same event The entered data, if yes, deletes the repeated written history data.
  • An event processing system for a distributed control system comprising a DCS server and a control station, the control station for uploading variable data to the DCS server, the DCS server comprising: a receiving module, configured to receive a control station Uploaded variable data;
  • a determining module configured to determine whether the variable data generates a new event
  • the event processing module is configured to: if it is determined that a new event is generated, process the event according to the preset event processing rule.
  • the DCS server further includes:
  • the real-time data storage module is configured to store real-time data generated when the event is processed after the event is processed correspondingly.
  • the determining module further includes:
  • a current item value obtaining submodule configured to acquire a current item value corresponding to the variable data
  • the comparison submodule is configured to determine whether a new event is generated by comparing whether the current item value is the same as the stored item value, and if not.
  • the event processing module further includes:
  • An identifier information obtaining submodule configured to obtain identifier information corresponding to the current event
  • a rule obtaining sub-module configured to obtain, according to the identifier information, a processing rule corresponding to the identifier information in a preset event processing rule
  • the processing sub-module is configured to perform corresponding processing on the current data according to the processing rule.
  • the system further includes:
  • a verification module configured to detect whether there is repeatedly written data in the stored data for the same event
  • And deleting a module configured to delete the repeatedly written data when it is determined that there is data of repeated writing.
  • the technical solution provided by the present invention can reduce the network data packet uploaded by the control station and improve the network transmission by migrating the process of determining the event from the traditional control station to the upper DCS server in the DCS.
  • the DCS server rationally divides the real-time variable data management and event processing functions, which can reduce the coupling between modules and improve system performance.
  • FIG. 1 is a schematic diagram of a DCS system event processing process provided in the prior art
  • FIG. 2 is a schematic flowchart of a DCS event processing method according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of an embodiment of the present invention. Schematic diagram of the overall process of event generation and event processing;
  • FIG. 4 is a schematic structural diagram of a DCS system event processing system according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of another DCS system event processing system according to an embodiment of the present invention
  • the control station uploads the collected field data, the algorithm operation result and the event number to the DCS real-time processing task.
  • the processing speed of the control station is very high, the event judgment on the control station undoubtedly reduces its processing efficiency.
  • the upload of the event number increases the network packet, which inevitably increases the network load and improves the communication error rate.
  • the real-time processing task needs to process the variable data and update it to the database on the one hand, and process and store the event on the other hand.
  • real-time processing tasks also respond to operator requests for real-time data and events. This design pattern that combines data management and event processing seriously affects the performance of the system and does not meet the performance requirements of the DCS system for real-time processing, stable operation, and high throughput.
  • the present invention transplants the process of determining an event to an upper layer DCS server, thereby reducing network data packets uploaded by the control station and improving network transmission.
  • Efficiency At the same time, the DCS server rationally divides the real-time variable data management and event processing functions in order to reduce the coupling between modules and improve system performance.
  • FIG. 2 it is a schematic flowchart of the steps of the method, which mainly includes the following steps:
  • Step 201 The DCS server receives variable data uploaded by the control station.
  • the control station after receiving the real-time variable data, the control station does not perform the judgment processing of whether to generate a new event, but directly transmits the variable data to the DCS server, so that the network data uploaded by the control station can be greatly reduced.
  • the package improves the efficiency of network transmission, so the time for processing variable data can be shortened.
  • Step 202 The DCS server determines whether the variable data generates a new event. If yes, the DCS server processes the event according to the preset event processing rule.
  • the real-time variable data determines whether a new event is generated by the DCS server.
  • the server automatically performs the correct event processing according to the preset event processing rule. Since in the process of judging whether a new event is generated, it is necessary to combine specific variable data, and the real-time variable data is stored in the DCS server, so that the variable between the DCS server and the control station in the prior art can be avoided. Data access, and thus, based on the principle of high cohesion and low coupling, not only can reduce communication between processes, but also, event processing efficiency is greatly improved.
  • the historical data generated by the event processing may be stored by the DCS server according to the specific application scenario.
  • the storage mode may be in the form of a common log.
  • the DCS server is able to respond to external requests for query data.
  • the DCS server determines whether the variable data generates a new event: the DCS server compares whether the current item value corresponding to the variable data is the same as the stored item value, and if not, determines to generate New event.
  • variable data in the system running process is usually defined. Different variable data belong to different variable types and correspond to different item values, and different item values correspond to different events. Therefore, after receiving the variable data uploaded by the control station, the DCS server can obtain the corresponding current item value according to the variable data, and compare whether the current item value is the same as the stored item value, and if the two are different, it can be determined that the data is generated. New event.
  • the implementation manner of the corresponding processing of the event by the DCS server according to the preset event processing rule may be:
  • the DCS server obtains identification information corresponding to the current event
  • the DCS server obtains, according to the identifier information, a processing rule corresponding to the identifier information in the preset event processing rule;
  • the DCS server performs corresponding processing on the current data according to the processing rule.
  • the identification information described herein is preset to distinguish different events, and may have different representation manners, for example, a conventional event number, which is not specifically limited in the present invention.
  • the processing rule of the corresponding identification information in the rule may be processed according to the preset event, so that the current event is processed accordingly.
  • the event processing rule in the embodiment of the present invention mainly adopts a configuration file manner, and can write a configuration file according to unnecessary project requirements, thereby avoiding program modification. This way, the good performance of the software reflects the platform, openness and scalability of the software.
  • a corresponding detection mechanism may be set, when it is determined that there is a history of repeated writing.
  • the historical data repeatedly written is automatically deleted, thereby avoiding waste of redundant data on the DCS server memory resources.
  • variable types such as digital input/output type, analog input/output type, etc.
  • Each variable type contains multiple items, and the item also has multiple data types, such as:
  • the current value item of the switch quantity is the bool type
  • the current value item of the analog quantity is the float type
  • the alarm item of the switch quantity is the bool type
  • the simulation The amount of alarm items is BYTE type.
  • a variable point defined as a variable type may represent a field device, and an item at that point may represent a digital signal or attribute of the device (such as temperature, alarm properties, etc.).
  • Table 1 shows the variable types of AVI4 and the included items.
  • the DCS server is responsible for receiving the variable data uploaded by the control station, updating the variable data to the database, and determining whether the new item value corresponding to the current variable data is the same as the existing original item value. If the item value has changed, it is determined that a new event is generated.
  • the process of determining the event will refer to different item name event tables: For example: BOOL type item name event table and BYTE type item name event table.
  • Table 2 shows an example of an event with an item value type of BOOL. The event defined by this table is an event whose item value changes between 0 and 1.
  • the DCS server determines that the item value is a BOOL type, first find the type of the variable point to which the item belongs in the BOOL type item name event table. If it exists, it is determined whether the variable point type is configured with the event of this item. If configured, the corresponding event number is obtained according to the new item value. For example: The DCS server determines that the type of the received variable point is DVI2 type, and the item name is DVJLDV value.
  • the comparison table 2 can get the event number 21 (switch 0->1 displacement event); if the DV value is
  • TypeName DVI2 ; DVI2 variable type
  • TypeNo 6; type number
  • ItemNum 8; the number of items. Indicates that 8 items in the DVI2 type change will generate an event.
  • Iteml_0 22; item name. This item is the current value output of the switch
  • Iteml_l 21 ; the value of this item changes, and the event number generated by 1->0 is 22
  • Item2 ALM ; the value of this item changes, and the event number generated by 0->1
  • Item2_l 3 ; item name. This item is a police status item
  • Table 3 shows an example of an event with an item value of BYTE.
  • ItemName ASS; item name. This item is an analog alarm status word, BYTE class
  • ValNum 8 type (8 digits)
  • Val2_ —0 16 ; this bit changes, the event number generated by 1->0 is 16
  • Val2_ —1 15 ; this bit changes, the event number generated by 0->1 is 15
  • Val3: 0x4 ; the last three bits of the ASS value change
  • Val3_ —0 12 ; this bit changes, the event number generated by 1->0 is 12
  • Val3_ —1 11 ; this bit changes, the event number generated by 0->1 is 11
  • Both the BOOL type item name event table and the BYTE type item name event table are provided in the form of a configuration file. Since the variable types of each project are different, and the change of each item represents different meanings, each project can configure the item name event table according to its own needs without modifying the program code.
  • the event definition list defines the preconditions for each type of event, the output content and format of the event description, the identifier of the event entry/table, and the event special handling identifier.
  • the event entry log/table identifier and the event special handling identifier are used by the event processing task in processing the event.
  • the precondition for the occurrence of an event can specify the range of conditions triggered by such an event. For example: The alarm event of the switch quantity does not need to be generated without the alarm level. By judging this precondition, the alarm event can be shielded and restricted during the process of generating the event;
  • the output content and format of the event description is to make the content of the event uniform and convenient, so that the operator can clearly and clearly view the event content.
  • the output format includes output offset, output length, and output mode.
  • the output offset specifies that the content begins to be output at the first digit of the event description.
  • the output length specifies how many bytes of content the content is.
  • the output mode is programmatic, and all specified formats have been processed in advance in the program;
  • the identification of the event entry log/table can facilitate the event processing task to write which type of event and table to which type of event; here, both the log and the table are used to record the data generated during the event processing.
  • EventName Digital Alarm Begin; event definition 3
  • EventNo 3; event name
  • Item_l ItemName: DAT, OutOffset: 0, OutWidth: 0, OutForma; number of items processed t: 26, ShowCondition: -l; alarm level limit
  • Item_2 ItemName: KAPN, OutOffset: 0, OutWidth: 32, OutFor;
  • the output of the KA point name is set to mat: 8, ShowCondition: - 1
  • AlarmLevelIName DAT ; alarm level item name
  • ItemName ALM ; the item name corresponding to the event
  • ItemNum 3 ; the number of items processed
  • Item_l ItemName: INLOG, OutOffset: 0, OutWidth: 0, OutFor; generate log limit mat: 36, ShowCondition: -l; jitter limit for events
  • Item— 2 ItemName: BC, OutOffset: 0, OutWidth: 0, OutFormat:
  • Item_3 ItemName: El, OutOffset: 0, OutWidth: 8, OutFormat: ; Description of the output
  • the list of event definitions is also provided as a configuration file.
  • Step 1 Find the event with event number 3 in the event definition list, and write event number 3, variable point name, item name (ALM) and time into the record;
  • Step 2 Determine whether the number of database items to be processed (ItemNum) is not 0. If it is not 0, process it item by item. The value of each item is first read from the database and then processed according to the output format (OutFormat). The output offset and length of the first alarm level DAT are both 0, indicating that the content of the item does not need to be displayed in the event description.
  • the output mode 26 has been processed in the program. The processing of the 26 output mode means that this event is automatically discarded when the value of the item read from the database is zero. Other items are treated similarly.
  • the second KA point name KAPN has an output offset of 0 and an output length of 32, indicating the item. The content starts at bit 0 of the event description (Format) and is 32 bytes long.
  • the output mode 8 is also processed in the program. The processing meaning of the 8 output mode is that the read item value is output in the format of a string;
  • Step 3 Since the event defines the alarm level item AlarmLevellName , the value of the alarm level DAT is read and written into the event record;
  • Step 4 Read the information that should be included in each event from the database according to the variable point name: point description, point type, process system name, area number, station number, etc. This completes a complete event record (the format of the event record is shown in Table 5).
  • the events can be spliced and sorted according to the specifications defined by this event, and finally a complete event information record is obtained.
  • the main function of the DCS real-time server is real-time data management and event processing.
  • an event is generated in the real-time data management task, in the process of sending the event to the event processing task, the shared memory mode of the convenient single is discarded and the network is adopted.
  • the purpose of transmission is to reduce the coupling between modules, improve the independence of the module, and reduce the risk of mutual interference.
  • the event processing task supports a variety of logs and tables.
  • the type and number of logs/alarms and the maximum number of information for each log/alarm can be configured according to the actual needs of the project. See Table 6 for details.
  • the full log uses the hash index algorithm to detect whether a write event already exists to prevent repeated writes, which greatly improves the processing power of the system (the system stipulates that 1500 events can be processed in one second).
  • the alarm table adopts double index structure: time series index and point name index, which is convenient for alarm Timing reading of writes and alarms.
  • Both the log and alarm tables support cyclic write events, and when full capacity is reached, the new event record will overwrite the old record.
  • the alarm table write can be configured in another way: When the table is full, new events will be discarded.
  • the event processing task processes the event after receiving the event data.
  • the log/table identifier and the special handling identifier are obtained in the event definition list.
  • FIG. 3 is the overall flow chart of the above event generation and event processing, including:
  • Step 301 The control station uploads real-time variable data to the DCS server.
  • Step 302 The DCS server acquires an item value corresponding to the variable data.
  • Step 303 the DCS server determines whether the item value corresponding to the variable data is the same as the stored history item value, and if no, proceeds to step 304;
  • Step 304 The DCS server searches for an item name event table according to the item value.
  • Step 305 The DCS server determines whether a new event is generated. If yes, proceed to step 306.
  • Step 306 The DCS server determines, according to the event definition list, which event is generated.
  • Step 307 The DCS server performs event recording.
  • Step 308 The DCS server obtains the identifier of the entry/form and the special processing identifier from the event definition list according to the corresponding event record.
  • Step 309 The DCS server writes the event into a prepared log/table;
  • Step 310 The DCS server determines, according to the special processing identifier, whether the event needs to be specially processed, if yes, proceed to step 311; if not, proceed to step 312;
  • Step 311 The DCS server performs specific special processing on the event.
  • Step 312 The DCS server processes the event accordingly.
  • the judgment of the event generated in the embodiment of the present invention is completed in the DCS server, instead of being in the controller, so that the control station does not need to upload the event number, thereby reducing the data packet transmitted between the control station and the server, thereby reducing the number of packets.
  • the data communication between the control station and the server reduces the network load. Since the real-time variable data is read into the database during the event generation process, the processing of the event is performed in the DCS server, which also reduces the data access between the modules, reduces the complexity of the task processing, and reduces the inter-module space. Coupling degree.
  • the event generation mechanism mainly adopts a configuration file method, and can write a configuration file according to unnecessary project requirements, without having to rewrite a processing program for each project, thereby avoiding program modification, which improves the reusability of the code.
  • the development cycle is reduced, which is a good example of the platform, openness and scalability of the software.
  • the embodiment provides an event processing system of the distributed control system, as shown in FIG. 4, which is a schematic structural diagram of the system, and the system mainly includes: DCS The server 40 and the control station 41, the control station 41 is configured to upload variable data to the DCS server 40, wherein the DCS server 40 includes:
  • the receiving module 401 is configured to receive variable data uploaded by the control station 41.
  • the determining module 402 is configured to determine whether the variable data generates a new event
  • the event processing module 403 is configured to process the event according to the preset event processing rule if the new event is determined to be generated.
  • the real-time variable data determines whether a new event is generated by the DCS server.
  • the server automatically performs the correct event processing according to the preset event processing rule. Since in the process of judging whether a new event is generated, specific variable data needs to be combined, and the real-time variable data is stored in the DCS real-time database in the DCS server, so that the DCS server in the prior art can be avoided.
  • Variable data access between stations thus, based on the principle of high cohesion and low coupling, not only can reduce communication between processes, but also the event processing efficiency is greatly improved.
  • the determining module further includes: a current item value obtaining submodule, configured to acquire a current item value corresponding to the variable data; a comparison submodule, configured to compare whether the current item value is the same as the stored item value, and if not, determine to generate a new one event.
  • a current item value obtaining submodule configured to acquire a current item value corresponding to the variable data
  • a comparison submodule configured to compare whether the current item value is the same as the stored item value, and if not, determine to generate a new one event.
  • the DCS server determines whether the variable data generates a new event: the DCS server compares whether the current item value corresponding to the variable data is the same as the stored item value, and if not, determines to generate New event.
  • variable data in the system running process is usually defined. Different variable data corresponds to different item values, and different item values correspond to different events. Therefore, after receiving the variable data uploaded by the control station, the DCS server can obtain the corresponding current item value according to the variable data, and compare whether the current item value is the same as the stored history item value. If the two are different, the DCS server can determine the generation. New events.
  • the event processing module further includes:
  • An identifier information obtaining submodule configured to obtain identifier information corresponding to the current event
  • a rule obtaining sub-module configured to obtain, according to the identifier information, a processing rule corresponding to the identifier information in a preset event processing rule
  • the processing sub-module is configured to perform corresponding processing on the current data according to the processing rule.
  • the processing rule may be processed according to the preset event, so that the current event is processed accordingly.
  • the DCS server may further include: a real-time data storage module 404, configured to store the event after performing corresponding processing on the event Real-time data generated when processing.
  • a real-time data storage module 404 configured to store the event after performing corresponding processing on the event Real-time data generated when processing.
  • the historical data storage module in the DCS server stores the historical data generated in the event processing process according to the specific application scenario.
  • the storage mode may be in a common log format. .
  • system may further include:
  • the verification module 405 is configured to detect, in the stored real-time data, whether there is repeated writing of data for the same event;
  • the deleting module 406 is configured to delete the repeatedly written data when it is determined that there is repeatedly written data.
  • a corresponding detection mechanism may be set, and when it is determined that there is repeatedly written data, The repeatedly written data is automatically deleted, thereby avoiding waste of redundant data resources of the DCS server.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, ie may be located One place, or it can be distributed to multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without any creative effort.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Abstract

An event processing method and system for a distributed control system (DCS) are provided. The method involves: distributed control system(DCS) server receives variable data transmitted by a control station, said DCS server judges whether the variable data generates new events, if yes, said DCS server performs corresponding process for the event according to a predetermined event processing rule. By using the invention, the event processing efficiency of DCS can be increased.

Description

一种分布式控制系统的事件处理方法及系统  Event processing method and system for distributed control system
本申请要求于 2010 年 4 月 20 日提交中国专利局、 申请号为 201010153089.7、 发明名称为 "一种分布式控制系统的事件处理方法及系统" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 本发明涉及工业自动化控制技术领域, 更具体地说, 涉及一种分布式控制 系统的事件处理方法及系统。  This application claims priority to Chinese Patent Application No. 201010153089.7, entitled "Event Processing Method and System for Distributed Control System", filed on April 20, 2010, the entire contents of which are hereby incorporated by reference. Combined in this application. TECHNICAL FIELD The present invention relates to the field of industrial automation control technologies, and more particularly to an event processing method and system for a distributed control system.
背景技术 Background technique
目前, DCS ( Distributed Control System , 分布式控制系统) 已经广泛应 用于核电、 火电、 化工等领域, 在这些领域中, 实时、 准确地上4艮"¾警事件能 及时通知工作人员赶到现场处理问题、排除隐患,避免安全事故的发生。同时, 详细、 规范地记录各种事件, 可以有利于操作员清晰、 明了地监视系统的运行 情况, 快速分辨各种事件。 诸如此类, 不难看出, 提供实时、 高效、 稳定、 功 能完善的事件处理技术是 DCS系统中数据和事件实时处理的中心环节,其所能 达到的技术指标和运行效果对工控现场安全具有举足轻重的作用。  At present, DCS (Distributed Control System) has been widely used in nuclear power, thermal power, chemical industry, etc. In these fields, real-time and accurate on-the-spot "3⁄4 police incidents can promptly notify staff to rush to the scene to deal with problems. Eliminate hidden dangers and avoid accidents. At the same time, detailed and standardized recording of various events can help the operator to clearly and clearly monitor the operation of the system and quickly resolve various events. The high-efficiency, stable and well-functioning event processing technology is the central link of real-time processing of data and events in the DCS system. The technical indicators and operational effects that can be achieved play an important role in the safety of the industrial control site.
事件处理技术主要是根据控制站上传的现场采集数据、算法运算结果以及 工程组态数据来判断产生的事件类型, 比如: 开关量的报警或变位、模拟量的 限值报警、 现场模块和通道的仪控故障。 同时, 也将提供事件的存储、 查询和 报警的确认等功能。  The event processing technology mainly determines the type of event generated based on the field acquisition data, algorithm operation results and engineering data uploaded by the control station, such as: alarm or displacement of the switch quantity, limit alarm of the analog quantity, field module and channel The instrument is faulty. At the same time, functions such as storage of events, queried and alarms are also provided.
目前国内外大多 DCS系统都具有事件处理过程,但是其实现机制和达到的 技术指标各不相同。 和本发明比较相近的实现方案如图 1所示, 在事件的产生 和处理过程中, DCS控制站程序根据采集到的现场数据以及工程组态数据, 产 生相应的事件, 之后将事件号和变量数据发送给实时 DCS服务器。 实时 DCS服 务器在接收到事件号之后,调用事件处理函数产生并记录事件, 同时响应操作 员站对事件的访问和操作。  At present, most DCS systems at home and abroad have event processing procedures, but their implementation mechanisms and technical indicators are different. The implementation scheme similar to the present invention is shown in FIG. 1. During the generation and processing of the event, the DCS control station program generates corresponding events according to the collected field data and engineering data, and then the event number and the variable. The data is sent to the real-time DCS server. After receiving the event number, the real-time DCS server calls the event handler to generate and log the event, while responding to the operator station's access and operation of the event.
控制站要将采集的现场数据、算法运算结果和事件号一起上传给 DCS实时 处理任务。 虽然控制站的处理速度^艮高, 但是在控制站上进行事件判断, 无疑 降^ 了其处理效率。 同时, 事件号的上传增大了网络数据包, 这必然增加网络 负荷、 提高通信出错率。 此外, 实时处理任务在接收到上传数据后, 一方面要 处理变量数据并将其更新到数据库中,另一方面要对事件进行处理和存储等操 作。 同时, 实时处理任务还要响应操作员对实时数据和事件等请求。 这种将数 据管理和事件处理合二为一的设计模式严重影响系统的性能, 无法满足 DCS 系统对实时处理、 稳定运行、 吞吐高效等性能要求。 The control station shall upload the collected field data, algorithm operation result and event number to the DCS real-time processing task. Although the processing speed of the control station is high, it is undoubtedly judged at the control station. Reduced the processing efficiency. At the same time, the upload of the event number increases the network data packet, which inevitably increases the network load and improves the communication error rate. In addition, after receiving the uploaded data, the real-time processing task needs to process the variable data and update it to the database on the one hand, and process and store the event on the other hand. At the same time, real-time processing tasks also respond to operator requests for real-time data and events. This design pattern that combines data management and event processing seriously affects the performance of the system and cannot meet the performance requirements of the DCS system for real-time processing, stable operation, and efficient throughput.
发明内容 Summary of the invention
有鉴于此, 本发明实施例提供一种分布式控制系统的事件处理方法及系统, 以 便提高分布式控制系统对于事件处理的效率。 In view of this, the embodiments of the present invention provide an event processing method and system for a distributed control system, so as to improve the efficiency of the distributed control system for event processing.
本发明实施例提供一种分布式控制系统的事件处理方法, 所述方法包括: 分布式控制系统 DCS服务器接收控制站上传的变量数据;  An embodiment of the present invention provides an event processing method for a distributed control system, where the method includes: a distributed control system DCS server receives variable data uploaded by a control station;
所述 DCS服务器判断所述变量数据是否产生新的事件, 如果是, 则 DCS 服务器根据预置事件处理规则, 对所述事件进行相应处理。  The DCS server determines whether the variable data generates a new event, and if so, the DCS server processes the event according to the preset event processing rule.
优选的, 所述 DCS服务器在对所述事件进行相应处理之后, 所述方法还 包括:  Preferably, after the DCS server performs corresponding processing on the event, the method further includes:
所述 DCS服务器存储对所述事件进行处理时所产生的实时数据。  The DCS server stores real-time data generated when the event is processed.
优选的, 所述 DCS服务器判断所述变量数据是否产生新的事件, 包括: 所述 DCS服务器比较所述变量数据对应的当前项值与已存储的项值是否 相同, 如果否, 则确定产生新的事件。  Preferably, the DCS server determines whether the variable data generates a new event, and the method includes: comparing, by the DCS server, whether a current item value corresponding to the variable data is the same as a stored item value, and if not, determining to generate a new one. event.
优选的, 所述 DCS服务器根据预置事件处理规则, 对所述事件进行相应 处理, 包括:  Preferably, the DCS server processes the event according to a preset event processing rule, including:
所述 DCS服务器获得当前事件对应的标识信息;  The DCS server obtains identification information corresponding to the current event;
所述 DCS服务器根据所述标识信息, 获得预置的事件处理规则中对应所 述标识信息的处理规则;  The DCS server obtains, according to the identifier information, a processing rule corresponding to the identifier information in a preset event processing rule;
所述 DCS服务器根据所述处理规则, 对当前数据进行相应处理。  The DCS server performs corresponding processing on the current data according to the processing rule.
优选的, 所述预置的事件处理规则以配置文件的方式进行设置。  Preferably, the preset event processing rule is set in a configuration file manner.
优选的, 所述方法还包括:  Preferably, the method further includes:
所述 DCS服务器检测已存储的实时数据中对于同一事件是否存在重复写 入的数据, 如果是, 则将所述重复写入的历史数据进行删除。 The DCS server detects whether there is a duplicate write in the stored real-time data for the same event The entered data, if yes, deletes the repeated written history data.
一种分布式控制系统的事件处理系统, 所述系统包括 DCS服务器和控制 站,所述控制站用于向所述 DCS服务器上传变量数据,所述 DCS服务器包括: 接收模块, 用于接收控制站上传的变量数据;  An event processing system for a distributed control system, the system comprising a DCS server and a control station, the control station for uploading variable data to the DCS server, the DCS server comprising: a receiving module, configured to receive a control station Uploaded variable data;
判断模块, 用于判断所述变量数据是否产生新的事件;  a determining module, configured to determine whether the variable data generates a new event;
事件处理模块, 用于如果确定产生新的事件, 则根据预置事件处理规则, 对所述事件进行相应处理。  The event processing module is configured to: if it is determined that a new event is generated, process the event according to the preset event processing rule.
优选的, 所述 DCS服务器还包括:  Preferably, the DCS server further includes:
实时数据存储模块, 用于在对所述事件进行相应处理之后,存储对所述事 件进行处理时所产生的实时数据。  The real-time data storage module is configured to store real-time data generated when the event is processed after the event is processed correspondingly.
优选的, 所述判断模块进一步包括:  Preferably, the determining module further includes:
当前项值获取子模块, 用于获取所述变量数据对应的当前项值;  a current item value obtaining submodule, configured to acquire a current item value corresponding to the variable data;
比较子模块, 用于通过比较所述当前项值与已存储的项值是否相同,如果 否, 则确定产生新的事件。  The comparison submodule is configured to determine whether a new event is generated by comparing whether the current item value is the same as the stored item value, and if not.
优选的, 所述事件处理模块进一步包括:  Preferably, the event processing module further includes:
标识信息获取子模块, 用于获得当前事件对应的标识信息;  An identifier information obtaining submodule, configured to obtain identifier information corresponding to the current event;
规则获取子模块, 用于根据所述标识信息, 获得预置的事件处理规则中对 应所述标识信息的处理规则;  a rule obtaining sub-module, configured to obtain, according to the identifier information, a processing rule corresponding to the identifier information in a preset event processing rule;
执行处理子模块, 用于根据所述处理规则, 对当前数据进行相应处理。 优选的, 所述系统还包括:  The processing sub-module is configured to perform corresponding processing on the current data according to the processing rule. Preferably, the system further includes:
检验模块,用于检测所述已存储的数据中对于同一事件是否存在重复写入 的数据;  a verification module, configured to detect whether there is repeatedly written data in the stored data for the same event;
删除模块, 用于当确定存在重复写入的数据时,将所述重复写入的数据进 行删除。  And deleting a module, configured to delete the repeatedly written data when it is determined that there is data of repeated writing.
同现有技术相比,本发明提供的技术方案通过将判断事件的过程由传统的 控制站中移植到 DCS中的上层 DCS服务器中,从而能够减小控制站上传的网 络数据包, 提高网络传输的效率; 此外, DCS 服务器将实时变量数据管理和 事件处理功能进行合理划分,能够达到降低模块间耦合、提高系统性能的目的。 附图说明 为了更清楚地说明本发明实施例的技术方案 ,下面将对实施例或现有技术 描述中所需要使用的附图作筒单地介绍,显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动 的前提下, 还可以根据这些附图获得其他的附图。 Compared with the prior art, the technical solution provided by the present invention can reduce the network data packet uploaded by the control station and improve the network transmission by migrating the process of determining the event from the traditional control station to the upper DCS server in the DCS. In addition, the DCS server rationally divides the real-time variable data management and event processing functions, which can reduce the coupling between modules and improve system performance. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are merely Some embodiments of the present invention may also be used to obtain other drawings based on these drawings without departing from the prior art.
图 1为现有技术中的提供的一种 DCS系统事件处理示过程示意图; 图 2为本发明实施例提供的一种 DCS的事件处理方法流程示意图; 图 3 为本发明实施例提供的一种事件产生以及事件处理的整体流程示意 图;  1 is a schematic diagram of a DCS system event processing process provided in the prior art; FIG. 2 is a schematic flowchart of a DCS event processing method according to an embodiment of the present invention; FIG. 3 is a schematic diagram of an embodiment of the present invention. Schematic diagram of the overall process of event generation and event processing;
图 4为本发明实施例提供的一种 DCS系统事件处理系统结构示意图; 图 5为本发明实施例提供的另一种 DCS系统事件处理系统结构示意图; 图 6为本发明实施例提供的又一种 DCS系统事件处理系统结构示意图。  4 is a schematic structural diagram of a DCS system event processing system according to an embodiment of the present invention; FIG. 5 is a schematic structural diagram of another DCS system event processing system according to an embodiment of the present invention; A schematic diagram of the structure of a DCS system event processing system.
具体实施方式 下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有做出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。 The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. example. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without the creative work are all within the scope of the present invention.
现有技术中所述的事件处理实现流程中,控制站要将采集的现场数据、算 法运算结果和事件号一起上传给 DCS实时处理任务。虽然控制站的处理速度很 高, 但是在控制站上进行事件判断, 无疑降低了其处理效率。 同时, 事件号的 上传增大了网络数据包, 这必然增加网络负荷、 提高通信出错率。 此外, 实时 处理任务在接收到上传数据后, 一方面要处理变量数据并将其更新到数据库 中, 另一方面要对事件进行处理和存储等操作。 同时, 实时处理任务还要响应 操作员对实时数据和事件等请求。这种将数据管理和事件处理合二为一的设计 模式严重影响系统的性能, 无法满足 DCS系统对实时处理、 稳定运行、 吞吐高 效等性能要求。  In the event processing implementation process described in the prior art, the control station uploads the collected field data, the algorithm operation result and the event number to the DCS real-time processing task. Although the processing speed of the control station is very high, the event judgment on the control station undoubtedly reduces its processing efficiency. At the same time, the upload of the event number increases the network packet, which inevitably increases the network load and improves the communication error rate. In addition, after receiving the uploaded data, the real-time processing task needs to process the variable data and update it to the database on the one hand, and process and store the event on the other hand. At the same time, real-time processing tasks also respond to operator requests for real-time data and events. This design pattern that combines data management and event processing seriously affects the performance of the system and does not meet the performance requirements of the DCS system for real-time processing, stable operation, and high throughput.
为了解决现有技术中存在的上述缺陷,本发明将判断事件的过程移植到上 层 DCS服务器处理, 这样可以减小控制站上传的网络数据包,提高网络传输的 效率; 同时, DCS服务器将实时变量数据管理和事件处理功能合理划分, 以求 达到降低模块间耦合、 提高系统性能的目的。 In order to solve the above-mentioned defects existing in the prior art, the present invention transplants the process of determining an event to an upper layer DCS server, thereby reducing network data packets uploaded by the control station and improving network transmission. Efficiency; At the same time, the DCS server rationally divides the real-time variable data management and event processing functions in order to reduce the coupling between modules and improve system performance.
下面首先对本发明提供的 DCS的事件处理方法进行说明, 参照图 2所示, 为该方法的步骤流程示意图, 主要包括以下步骤:  The following describes the event processing method of the DCS provided by the present invention. Referring to FIG. 2, it is a schematic flowchart of the steps of the method, which mainly includes the following steps:
步骤 201、 DCS服务器接收控制站上传的变量数据;  Step 201: The DCS server receives variable data uploaded by the control station.
本发明技术方案中,控制站接收到实时的变量数据后, 并不进行是否产生 新事件的判断处理, 而是将变量数据直接发送至 DCS服务器, 这样, 可以大 大减小控制站上传的网络数据包, 提高网络传输的效率, 因此, 能够缩短对变 量数据进行处理的时间。  In the technical solution of the present invention, after receiving the real-time variable data, the control station does not perform the judgment processing of whether to generate a new event, but directly transmits the variable data to the DCS server, so that the network data uploaded by the control station can be greatly reduced. The package improves the efficiency of network transmission, so the time for processing variable data can be shortened.
步骤 202、所述 DCS服务器判断所述变量数据是否产生新的事件, 如果是, 则 DCS服务器根据预置事件处理规则, 对所述事件进行相应处理。  Step 202: The DCS server determines whether the variable data generates a new event. If yes, the DCS server processes the event according to the preset event processing rule.
可见, 根据实时的变量数据判断是否产生新的事件由 DCS服务器处理, 当 产生新的事件时,服务器会自动根据预置的事件处理规则, 进行正确的事件处 理。 由于在判断是否产生新的事件的过程中, 需要结合具体的变量数据, 而实 时的变量数据正是存储在 DCS服务器中, 因此, 可以避免现有技术中的 DCS服 务器同控制站之间的变量数据访问, 从而, 依据高内聚低耦合的原则, 不仅能 减少进程间的通信, 而且, 事件处理效率大大提高。  It can be seen that the real-time variable data determines whether a new event is generated by the DCS server. When a new event is generated, the server automatically performs the correct event processing according to the preset event processing rule. Since in the process of judging whether a new event is generated, it is necessary to combine specific variable data, and the real-time variable data is stored in the DCS server, so that the variable between the DCS server and the control station in the prior art can be avoided. Data access, and thus, based on the principle of high cohesion and low coupling, not only can reduce communication between processes, but also, event processing efficiency is greatly improved.
在 DCS服务器在对所述事件进行相应处理之后,可以根据具体应用场景需 要, 由 DCS服务器存储在所述事件处理过程中产生的历史数据,存储方式可以 采用常用的日志形式。同时, DCS服务器能够响应外界对事件数据的查询请求。  After the DCS server processes the event, the historical data generated by the event processing may be stored by the DCS server according to the specific application scenario. The storage mode may be in the form of a common log. At the same time, the DCS server is able to respond to external requests for query data.
本发明实施例中, DCS 服务器判断所述变量数据是否产生新的事件的实 现方式为: DCS 服务器比较所述变量数据对应的当前项值与已存储的项值是 否相同, 如果否, 则确定产生新的事件。  In the embodiment of the present invention, the DCS server determines whether the variable data generates a new event: the DCS server compares whether the current item value corresponding to the variable data is the same as the stored item value, and if not, determines to generate New event.
为了便于系统数据管理,通常对系统运行过程中的变量数据进行定义, 不 同变量数据属于不同的变量类型且对应不同的项值, 不同项值对应不同的事 件。 因此, DCS服务器接收到控制站上传的变量数据后, 能够根据变量数据获 得其对应的当前项值, 同时比较当前项值与已存储的项值是否相同,如果两者 不同, 则可以确定产生了新的事件。 此外, DCS服务器根据预置事件处理规则, 对所述事件进行相应处理的实 现方式可以为: In order to facilitate system data management, variable data in the system running process is usually defined. Different variable data belong to different variable types and correspond to different item values, and different item values correspond to different events. Therefore, after receiving the variable data uploaded by the control station, the DCS server can obtain the corresponding current item value according to the variable data, and compare whether the current item value is the same as the stored item value, and if the two are different, it can be determined that the data is generated. New event. In addition, the implementation manner of the corresponding processing of the event by the DCS server according to the preset event processing rule may be:
DCS服务器获得当前事件对应的标识信息;  The DCS server obtains identification information corresponding to the current event;
DCS 服务器根据所述标识信息, 获得预置的事件处理规则中对应所述标 识信息的处理规则;  The DCS server obtains, according to the identifier information, a processing rule corresponding to the identifier information in the preset event processing rule;
DCS服务器根据所述处理规则, 对当前数据进行相应处理。  The DCS server performs corresponding processing on the current data according to the processing rule.
这里所述的标识信息是为了区分不同的事件而预置的,可以有不同的表示 方式, 例如: 传统的事件号, 对此, 本发明不做具体限定。  The identification information described herein is preset to distinguish different events, and may have different representation manners, for example, a conventional event number, which is not specifically limited in the present invention.
通常, 对应不同的事件, 具有不同的事件处理规则。 当 DCS服务器获得事 件的标识信息之后,便可根据预置的事件处理规则中相应该标识信息的处理规 贝' J , 从而对当前事件进行相应的处理。  Usually, there are different event processing rules for different events. After the DCS server obtains the identification information of the event, the processing rule of the corresponding identification information in the rule may be processed according to the preset event, so that the current event is processed accordingly.
本发明实施例中的事件处理规则主要采用配置文件的方式,可根据不用的 项目需求编写配置文件,避免程序的改动。这种方式 4艮好的体现了软件的平台 性、 开放性、 扩展性。  The event processing rule in the embodiment of the present invention mainly adopts a configuration file manner, and can write a configuration file according to unnecessary project requirements, thereby avoiding program modification. This way, the good performance of the software reflects the platform, openness and scalability of the software.
当然, 在由 DCS服务器存储在所述事件处理过程中产生的实时数据过程 中, 为了避免 DCS服务器对同一事件进行重复的历史数据记录, 可以设置相应 的检测机制, 当确定存在重复写入的历史数据时,将所述重复写入的历史数据 进行自动删除, 从而避免重复数据对 DCS服务器内存资源的浪费。  Of course, in the process of storing the real-time data generated by the DCS server in the event processing process, in order to prevent the DCS server from performing repeated historical data records on the same event, a corresponding detection mechanism may be set, when it is determined that there is a history of repeated writing. In the case of data, the historical data repeatedly written is automatically deleted, thereby avoiding waste of redundant data on the DCS server memory resources.
为了便于对本发明进一步的理解,下面结合本发明的具体实施方式对本发 明进行详细描述。  The present invention will be described in detail below in conjunction with the specific embodiments of the invention.
根据采集信号的不同, 需要设定不同的变量类型 (比如开关量输入 /输出 类型、 模拟量输入 /输出类型等) 。 每一种变量类型包含多个项, 项也具有多 种数据类型, 比如: 开关量的当前值项为 bool类型、 模拟量的当前值项为 float 类型、 开关量的报警项为 bool类型、 模拟量的报警项为 BYTE类型。 定义为某 一变量类型的变量点可能代表一个现场设备,该点的某一项可能代表设备的某 个数字信号或属性(比如温度、 报警属性等)。 表 1给出了 AVI4的变量类型以 及包含的部分项。  Depending on the acquired signal, different variable types (such as digital input/output type, analog input/output type, etc.) need to be set. Each variable type contains multiple items, and the item also has multiple data types, such as: The current value item of the switch quantity is the bool type, the current value item of the analog quantity is the float type, the alarm item of the switch quantity is the bool type, and the simulation The amount of alarm items is BYTE type. A variable point defined as a variable type may represent a field device, and an item at that point may represent a digital signal or attribute of the device (such as temperature, alarm properties, etc.). Table 1 shows the variable types of AVI4 and the included items.
表 1 、 AVI4的变量类型  Table 1, variable types of AVI4
变量类 项名 数据类型 项说明 型 Variable class item name data type item description Type
PN string 点名 PN string name
SN BYTE 站号 SN BYTE station number
DS string 点说明 DS string point description
AV float 当前值 AV float current value
MU float 量程上限 MU float range limit
MD float 量程下限 MD float range lower limit
AVI4 类  AVI4 class
H2L float 高 2限值  H2L float height 2 limit
型(模拟  Type
H1L float 高 1限值  H1L float height 1 limit
量 4 限  Quantity 4 limit
L1L float 低 1限值  L1L float low 1 limit
值输入  Value input
L2L float 低 2限值  L2L float low 2 limit
类型)  Types of)
H2 BYTE 高 2限报警级  H2 BYTE high 2 limit alarm level
HI BYTE 高 1限报警级 HI BYTE high 1 limit alarm level
L1 BYTE 低 1限报警级 L1 BYTE low 1 limit alarm level
L2 BYTE 低 2限报警级 L2 BYTE low 2 limit alarm level
ASS BYTE 限值报警状态 ASS BYTE limit alarm status
, , , , , , , , ,  , , , , , , , , ,
DCS服务器负责接收控制站上传的变量数据, 将变量数据更新到数据库 中, 同时判断当前变量数据对应的新项值和已有的原项值是否相同。如果项值 发生了变化, 则确定产生新的事件。  The DCS server is responsible for receiving the variable data uploaded by the control station, updating the variable data to the database, and determining whether the new item value corresponding to the current variable data is the same as the existing original item value. If the item value has changed, it is determined that a new event is generated.
针对项值类型的不同, 判断事件产生的过程中将参照不同的项名事件表: 例如: BOOL类型项名事件表和 BYTE类型项名事件表。 表 2给出了项值类型为 BOOL的事件示例, 此表定义的事件是项值在 0和 1 之间变化的事件。 如果 DCS服务器判断项值是 BOOL类型, 首先在 BOOL类型 项名事件表中查找该项所属变量点的类型。如果存在, 判断该变量点类型是否 配置了此项的事件。 如果配置了, 则根据新项值获得对应的事件号。 比如: DCS服务器判断接收到的变量点的类型为 DVI2类型、 项名为 DVJLDV值由For different types of item values, the process of determining the event will refer to different item name event tables: For example: BOOL type item name event table and BYTE type item name event table. Table 2 shows an example of an event with an item value type of BOOL. The event defined by this table is an event whose item value changes between 0 and 1. If the DCS server determines that the item value is a BOOL type, first find the type of the variable point to which the item belongs in the BOOL type item name event table. If it exists, it is determined whether the variable point type is configured with the event of this item. If configured, the corresponding event number is obtained according to the new item value. For example: The DCS server determines that the type of the received variable point is DVI2 type, and the item name is DVJLDV value.
0- >1 , 对照表 2即可以获得事件号为 21 (开关量 0->1变位事件); 如果 DV值由0->1, the comparison table 2 can get the event number 21 (switch 0->1 displacement event); if the DV value is
1- >0, 对照表 1即可以获得事件号为 22 (开关量 1->0变位事件) 。 如果是 DVI2 类型的点的项 ALM由 0->1 ,对照表 2即可以获得事件号为 3 (开关量报警事件); 如果 ALM值由 1->0, 对照表 2即可以获得事件号为 4 (开关量报警恢复事件) 表 2 、 BOOL类型项名事件表示例 1- >0, compare table 1 to get event number 22 (switch 1->0 displacement event). If the item ALM of the DVI2 type point is 0->1, the event number 3 can be obtained according to Table 2 (switch alarm event); if the ALM value is 1->0, the event number can be obtained according to Table 2. 4 (switching alarm recovery event) Table 2, BOOL type item name event example
示例 说明  Example Description
[Type_l]  [Type_l]
TypeName=DVI2 ; DVI2变量类型 TypeName=DVI2 ; DVI2 variable type
TypeNo=6 ;类型号 TypeNo=6; type number
ItemNum=8 ;项个数。 表示 DVI2类型有 8个项发生变化会产 生事件 ItemNum=8; the number of items. Indicates that 8 items in the DVI2 type change will generate an event.
Iteml=DV Iteml=DV
Iteml_0=22 ;项名。 该项是开关量的当前值输出项 Iteml_0=22; item name. This item is the current value output of the switch
Iteml_l=21 ;该项值发生变化, 并且由 1->0 时产生的事件号 为 22 Iteml_l=21 ; the value of this item changes, and the event number generated by 1->0 is 22
Item2=ALM ;该项值发生变化, 并且由 0->1 时产生的事件号 Item2=ALM ; the value of this item changes, and the event number generated by 0->1
Item2_0=4 为 21 Item2_0=4 is 21
Item2_l=3 ;项名。 该项是 警状态字项 Item2_l=3 ; item name. This item is a police status item
• . . ;该项值由 1->0时产生的事件号为 4 • . . ; The event number generated by 1->0 is 4
;该项值由 0->1时产生的事件号为 3 ; the event number generated by 0->1 is 3
表 3给出了项值类型为 BYTE的事件示例。 项的 BYTE数据中的每一位变化 ( 0和1 )都可以代表一类事件。 如果实时库管理任务判断项值是 BYTE类型, 首先在 BYTE类型项名事件表中查找是否配置了此项的事件。 如果配置了, 判 断 BYTE数据中的哪几位发生了变化, 然后根据变化位所对应的十六进制数和 变化值(0->1或 1->0 )获得事件号。 比如: 项 ASS是模拟量报警的状态字项, Vall=0xl表示 ASS的最低位发生变化, 当最低位由 0变为 1时, 将触发 19号事件 (模拟量低 4限报警) ; 当最低位由 1变为 0时, 将触发 20号事件 (模拟量低 4 限报警恢复) 。 Table 3 shows an example of an event with an item value of BYTE. Each change (0 and 1) in the item's BYTE data can represent a type of event. If the real-time library management task determines that the item value is BYTE type, first find the event of whether this item is configured in the BYTE type item name event table. If configured, it is determined which bits in the BYTE data have changed, and then the event number is obtained according to the hexadecimal number and the change value (0->1 or 1->0) corresponding to the change bit. For example: the item ASS is the status word of the analog alarm, Vall=0xl indicates that the lowest bit of the ASS changes, when the lowest bit changes from 0 to 1, the event No. 19 (simulation low 4 limit alarm) will be triggered; When the bit changes from 1 to 0, event number 20 (simulation low 4 limit alarm recovery) will be triggered.
BYTE类型项名事件表示例  BYTE type item name event example
示例 说明  Example Description
[Item_l]  [Item_l]
ItemName=ASS ;项名。 该项是模拟量报警状态字项, BYTE类 ItemName=ASS; item name. This item is an analog alarm status word, BYTE class
ValNum=8 型 (8位) ValNum=8 type (8 digits)
;项值个数。 表示 ASS项可以产生 8个事件 ; the number of items. Indicates that an ASS item can generate 8 events.
Vall=0xl Vall=0xl
Vall_0=20 ; ASS项值的最低一位发生变化 Vall_0=20 ; the lowest bit of the ASS item value changes
Vall」=19 ;该位发生变化, 由 1->0时产生的事件号为 20 Vall"=19; this bit changes, the event number generated by 1->0 is 20
;该位发生变化, 由 0->1时产生的事件号为 19 \Ά\2-- =0x2 ; ASS项值的末二 -位发生变化 ; The bit changes, the event number generated by 0->1 is 19 \Ά\2-- =0x2 ; the last two bits of the ASS item value change
Val2_ —0=16 ;该位发生变化, 由 1->0时产生的事件号为 16Val2_ —0=16 ; this bit changes, the event number generated by 1->0 is 16
Val2_ —1=15 ;该位发生变化, 由 0->1时产生的事件号为 15 Val2_ —1=15 ; this bit changes, the event number generated by 0->1 is 15
Val3: =0x4 ; ASS项值的末三 -位发生变化 Val3: =0x4 ; the last three bits of the ASS value change
Val3_ —0=12 ;该位发生变化, 由 1->0时产生的事件号为 12Val3_ —0=12 ; this bit changes, the event number generated by 1->0 is 12
Val3_ —1=11 ;该位发生变化, 由 0->1时产生的事件号为 11 Val3_ —1=11 ; this bit changes, the event number generated by 0->1 is 11
BOOL类型项名事件表和 BYTE类型项名事件表都以配置文件的形式提 供。 由于各个项目的变量类型不同, 以及每一项的变化所代表的含义不同, 因 此每一个项目都可以根据自己的需求对项名事件表进行配置,而不用修改程序 代码。 Both the BOOL type item name event table and the BYTE type item name event table are provided in the form of a configuration file. Since the variable types of each project are different, and the change of each item represents different meanings, each project can configure the item name event table according to its own needs without modifying the program code.
在获得事件号后, 需要在事件定义列表中查找对应的事件定义。 事件定义 列表定义了每一类事件的产生前提条件、事件描述的输出内容及格式、事件进 入曰志 /表格的标识以及事件特殊处理标识等。 事件进入日志 /表格的标识以及 事件特殊处理标识是事件处理任务在处理事件中所用到的。  After obtaining the event number, you need to find the corresponding event definition in the event definition list. The event definition list defines the preconditions for each type of event, the output content and format of the event description, the identifier of the event entry/table, and the event special handling identifier. The event entry log/table identifier and the event special handling identifier are used by the event processing task in processing the event.
表 4列出了开关量报警事件的定义和开关量变位事件的定义。 其中: 事件的产生前提条件可以规定此类事件触发的条件范围。 比如: 开关量的 报警事件在没有报警级的情况下是不需要产生的,通过判断这个前提条件, 在 生成事件的过程中就可以对报警事件起到屏蔽限制作用;  Table 4 lists the definition of the digital alarm event and the definition of the switching displacement event. Where: The precondition for the occurrence of an event can specify the range of conditions triggered by such an event. For example: The alarm event of the switch quantity does not need to be generated without the alarm level. By judging this precondition, the alarm event can be shielded and restricted during the process of generating the event;
事件描述的输出内容和格式是为了使事件的内容统一规范,方便操作员清 晰明了地查看事件内容。 输出格式包括输出偏移、 输出长度以及输出方式。 输 出偏移规定了内容在事件描述的第几位开始输出,输出长度规定了内容占多少 字节长度,输出方式是程序化的,程序中已事先对所有规定的格式做好了处理; 事件进入日志 /表格的标识可以方便事件处理任务将该类事件写入哪类曰 志和表格的; 此处, 日志和表格均是用于记录事件处理过程中产生的数据。 The output content and format of the event description is to make the content of the event uniform and convenient, so that the operator can clearly and clearly view the event content. The output format includes output offset, output length, and output mode. The output offset specifies that the content begins to be output at the first digit of the event description. The output length specifies how many bytes of content the content is. The output mode is programmatic, and all specified formats have been processed in advance in the program; The identification of the event entry log/table can facilitate the event processing task to write which type of event and table to which type of event; here, both the log and the table are used to record the data generated during the event processing.
由于一些事件可能需要特殊处理,所以在事件规范中加入特殊处理标识可 以为处理事件提供极大的方便。  Since some events may require special handling, adding special handling identifiers to the event specification can provide great convenience for handling events.
表 4 事件定义列表示例  Table 4 Example of event definition list
示例 说明  Example Description
[EVENT_3]  [EVENT_3]
EventName=Digital Alarm Begin ;3号事件定义 EventName=Digital Alarm Begin; event definition 3
EventNo=3 ;事件名 EventNo=3; event name
ItemNum=2 ;事件号 ItemNum=2; event number
Item_l=ItemName:DAT,OutOffset:0,OutWidth:0,OutForma ;处理的项个数 t:26,ShowCondition:-l ;报警级限制 Item_l=ItemName: DAT, OutOffset: 0, OutWidth: 0, OutForma; number of items processed t: 26, ShowCondition: -l; alarm level limit
Item_2=ItemName:KAPN,OutOffset:0,OutWidth:32,OutFor ; KA点名的输出定 mat: 8,ShowCondition:- 1 义 Item_2=ItemName: KAPN, OutOffset: 0, OutWidth: 32, OutFor; The output of the KA point name is set to mat: 8, ShowCondition: - 1
Format— ******************************** 才艮^^ ;描述的输出 Format— ******************************** 艮^^ ; Description of the output
EnterLog=0x8200 ;进入日志的标识 EnterLog=0x8200; enter the log identifier
EnterTable=0x4000 ;进入表格的标识 EnterTable=0x4000 ; enter the identity of the form
SpecProc=0 ;特殊处理标志 SpecProc=0; special handling flag
AlarmLevelIName=DAT ;报警级项名 AlarmLevelIName=DAT ; alarm level item name
ItemName=ALM ;事件对应的项名 ItemName=ALM ; the item name corresponding to the event
[EVENT_21] ;21号事件定义 [EVENT_21]; event definition 21
EventName=Digital Change 0->l ;事件名 EventNo=21 ;事件号 EventName=Digital Change 0->l; event name EventNo=21; event number
ItemNum=3 ;处理的项个数 ItemNum=3 ; the number of items processed
Item_l=ItemName:INLOG,OutOffset:0,OutWidth:0,OutFor ;产生日志限制 mat:36,ShowCondition:-l ;抖动对事件的限 Item_l=ItemName: INLOG, OutOffset: 0, OutWidth: 0, OutFor; generate log limit mat: 36, ShowCondition: -l; jitter limit for events
Item— 2=ItemName:BC,OutOffset:0,OutWidth:0,OutFormat: 制 Item— 2=ItemName: BC, OutOffset: 0, OutWidth: 0, OutFormat:
27,ShowCondition:- 1 ;描述的内容、格式 27, ShowCondition: - 1 ; description of the content, format
Item_3=ItemName:El,OutOffset:0,OutWidth:8,OutFormat: ;描述的输出 Item_3=ItemName: El, OutOffset: 0, OutWidth: 8, OutFormat: ; Description of the output
8,ShowCondition:-l ;进入日志的标识 8, ShowCondition: -l; enter the log ID
Format^** ****** ;进入表格的标识 Format^** ****** ; enter the identity of the form
EnterLog=0x8000 ;特殊处理标志 EnterLog=0x8000; special handling flag
EnterTable=0 ;事件对应的项名 EnterTable=0; the item name corresponding to the event
SpecProc=0 • . . SpecProc=0 • . .
ItemName=DV ItemName=DV
事件定义列表也是以配置文件的形式提供的。 The list of event definitions is also provided as a configuration file.
现以表 3中的示例说明该表的使用方法。 假如: 当获得了事件号 3后, 步骤 1 : 在事件定义列表中查找事件号为 3的事件, 将事件号 3、 变量点名、 项名 (ALM ) 以及时间写入记录中;  The use of this table is illustrated by the example in Table 3. If: After obtaining event number 3, Step 1: Find the event with event number 3 in the event definition list, and write event number 3, variable point name, item name (ALM) and time into the record;
步骤 2: 判断需要处理的数据库项的个数(ItemNum )是否不为 0, 如果不 为 0 , 逐项处理。 首先从数据库中读取每一项的值, 之后根据输出格式 ( OutFormat )进行处理。 第一项报警级 DAT的输出偏移和长度都为 0, 表示该 项的内容是不需要在事件描述中显示的。 输出方式 26在程序中已经做了处理, 26输出方式的处理含义是当从数据库读取的项值为 0时自动丟弃此事件。 其他 项处理类似。 第二项 KA点名 KAPN的输出偏移为 0、 输出长度为 32, 表示该项 的内容在事件描述(Format ) 的第 0位开始输出且占 32个字节的长度。 输出方 式 8也在程序中做了处理, 8输出方式的处理含义是读取的项值以字符串的格式 输出; Step 2: Determine whether the number of database items to be processed (ItemNum) is not 0. If it is not 0, process it item by item. The value of each item is first read from the database and then processed according to the output format (OutFormat). The output offset and length of the first alarm level DAT are both 0, indicating that the content of the item does not need to be displayed in the event description. The output mode 26 has been processed in the program. The processing of the 26 output mode means that this event is automatically discarded when the value of the item read from the database is zero. Other items are treated similarly. The second KA point name KAPN has an output offset of 0 and an output length of 32, indicating the item. The content starts at bit 0 of the event description (Format) and is 32 bytes long. The output mode 8 is also processed in the program. The processing meaning of the 8 output mode is that the read item value is output in the format of a string;
步骤 3: 由于该事件定义了报警级项 AlarmLevellName , 因此读取报警级 DAT的值, 将其写入事件记录中;  Step 3: Since the event defines the alarm level item AlarmLevellName , the value of the alarm level DAT is read and written into the event record;
步骤 4: 根据变量点名从数据库中读取每一个事件都应包括的信息: 点说 明、 点类型、 工艺系统名、 区域号、 站号等。 到此就产生了一条完整的事件记 录(事件记录的格式如表 5所示) 。  Step 4: Read the information that should be included in each event from the database according to the variable point name: point description, point type, process system name, area number, station number, etc. This completes a complete event record (the format of the event record is shown in Table 5).
根据实际需要, 可以按照此事件定义的规范对事件进行拼接、 整理, 最后 得出一条完整的事件信息记录。  According to the actual needs, the events can be spliced and sorted according to the specifications defined by this event, and finally a complete event information record is obtained.
表 5 事件记录结构  Table 5 event record structure
Figure imgf000015_0001
Figure imgf000015_0001
DCS实时服务器的主要功能在于实时数据管理和事件处理, 当实时数据管 理任务中产生事件后, 在将事件发送给事件处理任务的过程中, , 舍弃了方便 筒单的共享内存方式而采用了网络传输方式, 目的是减小模块间的耦合、提高 模块的独立性、 降低相互干扰的风险。  The main function of the DCS real-time server is real-time data management and event processing. When an event is generated in the real-time data management task, in the process of sending the event to the event processing task, the shared memory mode of the convenient single is discarded and the network is adopted. The purpose of transmission is to reduce the coupling between modules, improve the independence of the module, and reduce the risk of mutual interference.
事件处理任务支持多种日志和表格, 根据项目的实际需求可配置日志 /报 警的种类、 数量以及每种日志 /报警的最大信息条数, 详见表 6。 在日志的种类 中必须存在一种类型一一 "全日志" 类型, 所有的事件必须进入此日志。 全日 志采用了 hash索引算法检测写入事件是否已经存在以防止重复写入,这大大提 高了系统的处理能力(系统规定 1秒可处理 1500个事件)。 由于报警的特殊性: 只能记录点的一个同类事件(一个点的报警和报警恢复就是同类事件), 新事 件将替换该点的同类事件,因此报警表采用双索引结构:时序索引和点名索引, 有利于报警的快速写入和报警的时序读取。 日志和报警表都支持循环写入事 件, 当达到满容量时, 新的事件记录将覆盖老的记录。 此外报警表写入还可以 配置成另一种方式: 表满容量时, 新事件将被丟弃。 The event processing task supports a variety of logs and tables. The type and number of logs/alarms and the maximum number of information for each log/alarm can be configured according to the actual needs of the project. See Table 6 for details. There must be a type of "full log" type in the type of log, all events must enter this log. The full log uses the hash index algorithm to detect whether a write event already exists to prevent repeated writes, which greatly improves the processing power of the system (the system stipulates that 1500 events can be processed in one second). Due to the special nature of the alarm: Only one kind of event of the same point can be recorded (one point of alarm and alarm recovery is the same kind of event), the new event will replace the same kind of event at that point, so the alarm table adopts double index structure: time series index and point name index, which is convenient for alarm Timing reading of writes and alarms. Both the log and alarm tables support cyclic write events, and when full capacity is reached, the new event record will overwrite the old record. In addition, the alarm table write can be configured in another way: When the table is full, new events will be discarded.
表 6 日志和表格配置表  Table 6 Log and Table Configuration Table
示例 说明  Example Description
[fix]  [fix]
lognum=6 ;曰志个数 tablenum=8 ;表格个数  Lognum=6; number of records tablenum=8; number of tables
[log_l] [log_l]
logno=l ;曰志号 logname=CompleteLog ;日志名 (全日志) logrecnum=30000 ;曰志条数  Logno=l ;曰志号 logname=CompleteLog ;log name (full log) logrecnum=30000 ;
[log_2] [log_2]
logno=2  Logno=2
logname=SOE日志 logrecnum=4000  Logname=SOE log logrecnum=4000
[table_l] [table_l]
tableno=l ;表格号 tablename=艮警总列表 ;表格名 (报警总列表) tablerecnum=4000 ;表格条数 Tableno=l ; table number Tablename=艮 police total list; table name (alarm total list) tablerecnum=4000; table number
[table_2] [table_2]
tableno=2  Tableno=2
tablename^ 验报警列表 tablerecnum=600  Tablename^ check alarm list tablerecnum=600
事件处理任务在接收到事件数据后,对事件进行处理。 首先根据事件记录 中的事件号, 在事件定义列表中获得进入日志 /表格的标识以及特殊处理的标 识。 进入日志 /表格的标识是十六进制数, 从高位开始判断, 如果此位为 1表示 事件将进入第几号日志 /表格。 比如: EnterLog=0x8200 , 从高位开始, 第 1位 和第 7位不为 0, 则事件将进入 1号和 7号日志。 在将事件写入日志 /表格后,事件 处理任务将对此事件的特殊要求做特殊处理。 The event processing task processes the event after receiving the event data. First, based on the event number in the event record, the log/table identifier and the special handling identifier are obtained in the event definition list. The log/table identifier is a hexadecimal number, which is judged from the high position. If this bit is 1, the event will enter the log/table. For example: EnterLog=0x8200, starting from the high position, the first and seventh digits are not 0, then the event will enter the 1st and 7th logs. After the event is written to the log/table, the event processing task will specifically handle the special requirements of this event.
图 3即是上述事件产生以及事件处理的整体流程图, 主要包括:  Figure 3 is the overall flow chart of the above event generation and event processing, including:
步骤 301、 控制站向 DCS服务器上传实时变量数据;  Step 301: The control station uploads real-time variable data to the DCS server.
步骤 302、 DCS服务器获取所述变量数据对应的项值;  Step 302: The DCS server acquires an item value corresponding to the variable data.
步骤 303、 DCS服务器判断所述变量数据对应的项值是否与已存储的历史 项值相同, 如果否, 则继续步骤 304;  Step 303, the DCS server determines whether the item value corresponding to the variable data is the same as the stored history item value, and if no, proceeds to step 304;
步骤 304、 DCS服务器根据所述项值查找项名事件表;  Step 304: The DCS server searches for an item name event table according to the item value.
步骤 305、 DCS服务器判断是否产生新的事件, 如果是, 则继续步骤 306; 步骤 306、 DCS服务器根据事件定义列表确定产生何事件;  Step 305: The DCS server determines whether a new event is generated. If yes, proceed to step 306. Step 306: The DCS server determines, according to the event definition list, which event is generated.
步骤 307、 DCS服务器进行事件记录;  Step 307: The DCS server performs event recording.
步骤 308、 DCS服务器根据相应事件记录, 从事件定义列表中获得进入曰 志 /表格的标识和特殊处理标识;  Step 308: The DCS server obtains the identifier of the entry/form and the special processing identifier from the event definition list according to the corresponding event record.
步骤 309、 DCS服务器将所述事件写入制定的日志 /表格; 步骤 310、 DCS服务器根据特殊处理标识判断是否需要对所述事件进行特 殊处理, 如果是, 则继续步骤 311 ; 如果否, 则继续步骤 312; Step 309: The DCS server writes the event into a prepared log/table; Step 310: The DCS server determines, according to the special processing identifier, whether the event needs to be specially processed, if yes, proceed to step 311; if not, proceed to step 312;
步骤 311、 DCS服务器对所述事件进行特定的特殊处理;  Step 311: The DCS server performs specific special processing on the event.
步骤 312、 DCS服务器对所述事件进行相应处理。  Step 312: The DCS server processes the event accordingly.
可见, 本发明实施例中的事件产生的判断在 DCS服务器中完成, 而不是在 控制器中,使得控制站不用上传事件号, 减小了控制站和服务器间传输的数据 包, 因此, 减少了控制站和服务器的数据通信, 降低了网络负荷。 由于在事件 产生过程中要向数据库读取实时变量数据, 因此将事件产生的处理放在 DCS 服务器中完成, 也减少了模块间的数据访问, 降低任务处理的复杂度, 同时也 降低了模块间的耦合度。 此外, 事件产生机制主要采用配置文件的方式, 可根 据不用的项目需求编写配置文件, 而不必对每一个项目都重写一个处理程序, 避免程序的改动, 这种方式提高了代码的重用性, 减小了开发周期, 很好的体 现了软件的平台性、 开放性、 扩展性。 相应本发明上述分布式控制系统的事件处理方法实施例,该实施例提供了 一种分布式控制系统的事件处理系统, 如图 4所示, 为该系统的结构示意图, 该系统主要包括: DCS服务器 40和控制站 41 ,所述控制站 41用于向所述 DCS 服务器 40上传变量数据, 其特征在于, 所述 DCS服务器 40包括:  It can be seen that the judgment of the event generated in the embodiment of the present invention is completed in the DCS server, instead of being in the controller, so that the control station does not need to upload the event number, thereby reducing the data packet transmitted between the control station and the server, thereby reducing the number of packets. The data communication between the control station and the server reduces the network load. Since the real-time variable data is read into the database during the event generation process, the processing of the event is performed in the DCS server, which also reduces the data access between the modules, reduces the complexity of the task processing, and reduces the inter-module space. Coupling degree. In addition, the event generation mechanism mainly adopts a configuration file method, and can write a configuration file according to unnecessary project requirements, without having to rewrite a processing program for each project, thereby avoiding program modification, which improves the reusability of the code. The development cycle is reduced, which is a good example of the platform, openness and scalability of the software. Corresponding to the event processing method embodiment of the distributed control system of the present invention, the embodiment provides an event processing system of the distributed control system, as shown in FIG. 4, which is a schematic structural diagram of the system, and the system mainly includes: DCS The server 40 and the control station 41, the control station 41 is configured to upload variable data to the DCS server 40, wherein the DCS server 40 includes:
接收模块 401 , 用于接收控制站 41上传的变量数据;  The receiving module 401 is configured to receive variable data uploaded by the control station 41.
判断模块 402, 用于判断所述变量数据是否产生新的事件;  The determining module 402 is configured to determine whether the variable data generates a new event;
事件处理模块 403 , 用于如果确定产生新的事件, 则根据预置事件处理规 贝' J , 对所述事件进行相应处理。  The event processing module 403 is configured to process the event according to the preset event processing rule if the new event is determined to be generated.
可见, 根据实时的变量数据判断是否产生新的事件由 DCS服务器处理, 当产生新的事件时,服务器会自动根据预置的事件处理规则, 进行正确的事件 处理。 由于在判断是否产生新的事件的过程中, 需要结合具体的变量数据, 而 实时的变量数据正是存储在 DCS服务器中的 DCS实时数据库中, 因此, 可以 避免现有技术中的 DCS服务器同控制站之间的变量数据访问, 从而, 依据高 内聚低耦合的原则,不仅能减少进程间的通信,而且,事件处理效率大大提高。  It can be seen that the real-time variable data determines whether a new event is generated by the DCS server. When a new event is generated, the server automatically performs the correct event processing according to the preset event processing rule. Since in the process of judging whether a new event is generated, specific variable data needs to be combined, and the real-time variable data is stored in the DCS real-time database in the DCS server, so that the DCS server in the prior art can be avoided. Variable data access between stations, thus, based on the principle of high cohesion and low coupling, not only can reduce communication between processes, but also the event processing efficiency is greatly improved.
优选的, 所述判断模块进一步包括: 当前项值获取子模块, 用于获取所述变量数据对应的当前项值; 比较子模块, 用于通过比较所述当前项值与已存储的项值是否相同,如果 否, 则确定产生新的事件。 Preferably, the determining module further includes: a current item value obtaining submodule, configured to acquire a current item value corresponding to the variable data; a comparison submodule, configured to compare whether the current item value is the same as the stored item value, and if not, determine to generate a new one event.
本发明实施例中, DCS 服务器判断所述变量数据是否产生新的事件的实 现方式为: DCS 服务器比较所述变量数据对应的当前项值与已存储的项值是 否相同, 如果否, 则确定产生新的事件。  In the embodiment of the present invention, the DCS server determines whether the variable data generates a new event: the DCS server compares whether the current item value corresponding to the variable data is the same as the stored item value, and if not, determines to generate New event.
为了便于系统数据管理,通常对系统运行过程中的变量数据进行定义, 不 同变量数据对应不同的项值, 不同项值对应不同的事件。 因此, DCS服务器接 收到控制站上传的变量数据后, 能够根据变量数据获得其对应的当前项值, 同 时比较当前项值与已存储的历史项值是否相同,如果两者不同, 则可以确定产 生了新的事件。  In order to facilitate system data management, the variable data in the system running process is usually defined. Different variable data corresponds to different item values, and different item values correspond to different events. Therefore, after receiving the variable data uploaded by the control station, the DCS server can obtain the corresponding current item value according to the variable data, and compare whether the current item value is the same as the stored history item value. If the two are different, the DCS server can determine the generation. New events.
所述事件处理模块进一步包括:  The event processing module further includes:
标识信息获取子模块, 用于获得当前事件对应的标识信息;  An identifier information obtaining submodule, configured to obtain identifier information corresponding to the current event;
规则获取子模块, 用于根据所述标识信息, 获得预置的事件处理规则中对 应所述标识信息的处理规则;  a rule obtaining sub-module, configured to obtain, according to the identifier information, a processing rule corresponding to the identifier information in a preset event processing rule;
执行处理子模块, 用于根据所述处理规则, 对当前数据进行相应处理。 通常, 对应不同的事件, 具有不同的事件处理规则。 当 DCS服务器获得事 件的标识信息之后,便可根据预置的事件处理规则中相应该标识信息的处理规 贝' J , 从而对当前事件进行相应的处理。  The processing sub-module is configured to perform corresponding processing on the current data according to the processing rule. Usually, there are different event processing rules for different events. After the DCS server obtains the identification information of the event, the processing rule of the corresponding identification information in the rule may be processed according to the preset event, so that the current event is processed accordingly.
优选的, 在本发明的另一个实施例中, 如图 5所示, 所述 DCS服务器还 可以包括: 实时数据存储模块 404, 用于在对所述事件进行相应处理之后, 存 储对所述事件进行处理时所产生的实时数据。  Preferably, in another embodiment of the present invention, as shown in FIG. 5, the DCS server may further include: a real-time data storage module 404, configured to store the event after performing corresponding processing on the event Real-time data generated when processing.
在 DCS服务器在对所述事件进行相应处理之后,可以根据具体应用场景需 要,由 DCS服务器中的历史数据存储模块存储在所述事件处理过程中产生的历 史数据, 存储方式可以采用常用的日志形式。  After the DCS server processes the event, the historical data storage module in the DCS server stores the historical data generated in the event processing process according to the specific application scenario. The storage mode may be in a common log format. .
除此之外, 如图 6所示, 所述系统还可以包括:  In addition, as shown in FIG. 6, the system may further include:
检验模块 405 , 用于检测已存储的实时数据中对于同一事件是否存在重复 写入的数据; 删除模块 406, 用于当确定存在重复写入的数据时, 将所述重复写入的数 据进行删除。 The verification module 405 is configured to detect, in the stored real-time data, whether there is repeated writing of data for the same event; The deleting module 406 is configured to delete the repeatedly written data when it is determined that there is repeatedly written data.
在由 DCS服务器存储在所述事件处理过程中产生的实时数据过程中,为了 避免 DCS服务器对同一事件进行重复的数据记录, 可以设置相应的检测机制, 当确定存在重复写入的数据时,将所述重复写入的数据进行自动删除,从而避 免重复数据对 DCS服务器内存资源的浪费。 对于系统实施例而言, 由于其基本相应于方法实施例, 所以描述得比较筒 单,相关之处参见方法实施例的部分说明即可。 以上所描述的装置实施例仅仅 是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上 分开的,作为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一 个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的 部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出 创造性劳动的情况下, 即可以理解并实施。  In the process of storing the real-time data generated by the DCS server in the event processing process, in order to prevent the DCS server from performing repeated data recording on the same event, a corresponding detection mechanism may be set, and when it is determined that there is repeatedly written data, The repeatedly written data is automatically deleted, thereby avoiding waste of redundant data resources of the DCS server. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, ie may be located One place, or it can be distributed to multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without any creative effort.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机 可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施例的流程。 其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM )或随机存储记忆体(Random Access Memory, RAM )等。  A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本 发明。 对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见 的,本文中所定义的一般原理可以在不脱离本发明实施例的精神或范围的情况 下, 在其它实施例中实现。 因此, 本发明实施例将不会被限制于本文所示的这 些实施例, 而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。  The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the embodiments of the invention. . Therefore, the present embodiments of the invention are not to be limited to the embodiments shown herein, but are to be accorded to the broadest scope of the principles and novel features disclosed herein.

Claims

权 利 要 求 Rights request
1、 一种分布式控制系统的事件处理方法, 其特征在于, 所述方法包括: 分布式控制系统 DCS服务器接收控制站上传的变量数据;  An event processing method for a distributed control system, the method comprising: a distributed control system: a DCS server receives variable data uploaded by a control station;
所述 DCS服务器判断所述变量数据是否产生新的事件, 如果是, 则 DCS 服务器根据预置事件处理规则, 对所述事件进行相应处理。  The DCS server determines whether the variable data generates a new event, and if so, the DCS server processes the event according to the preset event processing rule.
2、根据权利要求 1所述的分布式控制系统的事件处理方法, 其特征在于, 所述 DCS服务器在对所述事件进行相应处理之后, 所述方法还包括:  The event processing method of the distributed control system according to claim 1, wherein after the DCS server performs corresponding processing on the event, the method further includes:
所述 DCS服务器存储对所述事件进行处理时所产生的实时数据。  The DCS server stores real-time data generated when the event is processed.
3、根据权利要求 1所述的分布式控制系统的事件处理方法, 其特征在于, 所述 DCS服务器判断所述变量数据是否产生新的事件, 包括:  The event processing method of the distributed control system according to claim 1, wherein the DCS server determines whether the variable data generates a new event, including:
所述 DCS服务器比较所述变量数据对应的当前项值与已存储的项值是否 相同, 如果否, 则确定产生新的事件。  The DCS server compares whether the current item value corresponding to the variable data is the same as the stored item value, and if not, determines to generate a new event.
4、根据权利要求 1所述的分布式控制系统的事件处理方法, 其特征在于, 所述 DCS服务器根据预置事件处理规则, 对所述事件进行相应处理, 包括: 所述 DCS服务器获得当前事件对应的标识信息;  The event processing method of the distributed control system according to claim 1, wherein the DCS server performs corresponding processing on the event according to the preset event processing rule, and the method includes: the DCS server obtaining the current event Corresponding identification information;
所述 DCS服务器根据所述标识信息, 获得预置的事件处理规则中对应所 述标识信息的处理规则;  The DCS server obtains, according to the identifier information, a processing rule corresponding to the identifier information in a preset event processing rule;
所述 DCS服务器根据所述处理规则, 对当前数据进行相应处理。  The DCS server performs corresponding processing on the current data according to the processing rule.
5、根据权利要求 4所述的分布式控制系统的事件处理方法, 其特征在于, 所述预置的事件处理规则以配置文件的方式进行设置。  The event processing method of the distributed control system according to claim 4, wherein the preset event processing rule is set in a configuration file manner.
6、 根据权利要求 2-5 中任一项所述的分布式控制系统的事件处理方法, 其特征在于, 所述方法还包括:  The event processing method of the distributed control system according to any one of claims 2 to 5, wherein the method further comprises:
所述 DCS服务器检测已存储的实时数据中对于同一事件是否存在重复写 入的数据, 如果是, 则将所述重复写入的数据进行删除。  The DCS server detects whether there is duplicate written data for the same event in the stored real-time data, and if so, deletes the repeatedly written data.
7、 一种分布式控制系统的事件处理系统, 所述系统包括 DCS服务器和控 制站, 所述控制站用于向所述 DCS服务器上传变量数据, 其特征在于, 所述 DCS服务器包括:  An event processing system of a distributed control system, the system comprising a DCS server and a control station, wherein the control station is configured to upload variable data to the DCS server, wherein the DCS server comprises:
接收模块, 用于接收控制站上传的变量数据; 判断模块, 用于判断所述变量数据是否产生新的事件; a receiving module, configured to receive variable data uploaded by the control station; a determining module, configured to determine whether the variable data generates a new event;
事件处理模块, 用于如果确定产生新的事件, 则根据预置事件处理规则, 对所述事件进行相应处理。  The event processing module is configured to: if it is determined that a new event is generated, process the event according to the preset event processing rule.
8、根据权利要求 7所述的分布式控制系统的事件处理系统, 其特征在于, 所述 DCS服务器还包括:  The event processing system of the distributed control system according to claim 7, wherein the DCS server further comprises:
实时数据存储模块, 用于在对所述事件进行相应处理之后,存储对所述事 件进行处理时所产生的实时数据。  The real-time data storage module is configured to store real-time data generated when the event is processed after the event is processed correspondingly.
9、根据权利要求 7所述的分布式控制系统的事件处理系统, 其特征在于, 所述判断模块进一步包括:  The event processing system of the distributed control system according to claim 7, wherein the determining module further comprises:
当前项值获取子模块, 用于获取所述变量数据对应的当前项值;  a current item value obtaining submodule, configured to acquire a current item value corresponding to the variable data;
比较子模块, 用于通过比较所述当前项值与已存储的项值是否相同,如果 否, 则确定产生新的事件。  The comparison submodule is configured to determine whether a new event is generated by comparing whether the current item value is the same as the stored item value, and if not.
10、根据权利要求 7所述的分布式控制系统的事件处理系统,其特征在于, 所述事件处理模块进一步包括:  The event processing system of the distributed control system according to claim 7, wherein the event processing module further comprises:
标识信息获取子模块, 用于获得当前事件对应的标识信息;  An identifier information obtaining submodule, configured to obtain identifier information corresponding to the current event;
规则获取子模块, 用于根据所述标识信息, 获得预置的事件处理规则中对 应所述标识信息的处理规则;  a rule obtaining sub-module, configured to obtain, according to the identifier information, a processing rule corresponding to the identifier information in a preset event processing rule;
执行处理子模块, 用于根据所述处理规则, 对当前数据进行相应处理。 The processing sub-module is configured to perform corresponding processing on the current data according to the processing rule.
11、根据权利要求 8-10中任一项所述的分布式控制系统的事件处理系统, 其特征在于, 所述系统还包括: The event processing system of the distributed control system according to any one of claims 8 to 10, wherein the system further comprises:
检验模块,用于检测已存储的实时数据中对于同一事件是否存在重复写入 的数据;  a verification module, configured to detect whether there is repeatedly written data in the stored real-time data for the same event;
删除模块, 用于当确定存在重复写入的数据时,将所述重复写入的数据进 行删除。  And deleting a module, configured to delete the repeatedly written data when it is determined that there is data of repeated writing.
PCT/CN2011/072337 2010-04-20 2011-03-31 Event processing method and system for distributed control system WO2011131079A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010153089A CN101799684A (en) 2010-04-20 2010-04-20 Event-handling method and system of distributed control system
CN201010153089.7 2010-04-20

Publications (1)

Publication Number Publication Date
WO2011131079A1 true WO2011131079A1 (en) 2011-10-27

Family

ID=42595389

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/072337 WO2011131079A1 (en) 2010-04-20 2011-03-31 Event processing method and system for distributed control system

Country Status (2)

Country Link
CN (1) CN101799684A (en)
WO (1) WO2011131079A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8024077B2 (en) 2010-10-06 2011-09-20 San Diego Gas & Electric Company Smart transformer
CN102455698B (en) * 2011-04-20 2013-06-19 北京化工大学 Automatic control rate and stable rate monitoring system and monitoring method based on tree structure
CN102375449B (en) * 2011-10-18 2014-02-19 北京化工大学 Database optimized storage and query method based on industrial control field
CN107209511B (en) * 2015-02-24 2020-06-09 东芝三菱电机产业系统株式会社 Monitoring control device
CN105159178B (en) * 2015-10-19 2017-12-05 南京国电南自轨道交通工程有限公司 A kind of object-based definite value area order switching programmed control method
CN109521702B (en) * 2017-09-19 2020-11-27 蓝星(北京)技术中心有限公司 Method and server for monitoring running state of distributed control system
CN109582476B (en) * 2018-11-29 2024-01-16 创新先进技术有限公司 Data processing method, device and system
CN111308974A (en) * 2020-02-27 2020-06-19 杭州和利时自动化有限公司 Method, system and equipment for controlling DCS simulation system
CN113433908A (en) * 2021-06-24 2021-09-24 储信(北京)科技发展有限公司 Method for reporting and processing distributed events

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002007166A (en) * 2000-06-20 2002-01-11 Yokogawa Electric Corp Field equipment communication device
US20030225936A1 (en) * 2002-05-30 2003-12-04 Felske Kris R. Application program interface to collect alarm/event data
CN1694025A (en) * 2005-04-28 2005-11-09 南京科远控制工程有限公司 Automatic control system based on artificial intelligence for heat-engine plant
CN201017232Y (en) * 2006-11-23 2008-02-06 浙江大学 Industry process non-linearity failure diagnosis device based on fisher
CN101634851A (en) * 2009-08-25 2010-01-27 西安交通大学 Method based on cause-and-effect relation of variables for diagnosing failures in process industry

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6618628B1 (en) * 2000-10-05 2003-09-09 Karl A. Davlin Distributed input/output control systems and methods
JP2004046475A (en) * 2002-07-11 2004-02-12 Yokogawa Electric Corp Distributed control system
CN200971792Y (en) * 2006-11-10 2007-11-07 东北电力大学 On-line monitoring device for change of through-flow gap of steam turbine
CN100470417C (en) * 2006-12-22 2009-03-18 浙江大学 Fault diagnostic system and method for under industrial producing process small sample condition
CN101424550B (en) * 2008-09-03 2010-06-23 中国海洋石油总公司 Instrument meter freezing fault rapid detecting method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002007166A (en) * 2000-06-20 2002-01-11 Yokogawa Electric Corp Field equipment communication device
US20030225936A1 (en) * 2002-05-30 2003-12-04 Felske Kris R. Application program interface to collect alarm/event data
CN1694025A (en) * 2005-04-28 2005-11-09 南京科远控制工程有限公司 Automatic control system based on artificial intelligence for heat-engine plant
CN201017232Y (en) * 2006-11-23 2008-02-06 浙江大学 Industry process non-linearity failure diagnosis device based on fisher
CN101634851A (en) * 2009-08-25 2010-01-27 西安交通大学 Method based on cause-and-effect relation of variables for diagnosing failures in process industry

Also Published As

Publication number Publication date
CN101799684A (en) 2010-08-11

Similar Documents

Publication Publication Date Title
WO2011131079A1 (en) Event processing method and system for distributed control system
TWI663511B (en) Reducing probabilistic filter query latency
WO2020062211A1 (en) Method and system for mimicry storage tamper-proof log fused with blockchain technology
US7805416B1 (en) File system query and method of use
US7783615B1 (en) Apparatus and method for building a file system index
US7702640B1 (en) Stratified unbalanced trees for indexing of data items within a computer system
CN108595664B (en) Agricultural data monitoring method in hadoop environment
EP3446440B1 (en) Multi-stage network discovery
US8135763B1 (en) Apparatus and method for maintaining a file system index
WO2014101445A1 (en) Data query method and system
US11176173B2 (en) Arrangement for enriching data stream in a communications network and related method
US11210277B2 (en) Distributing and processing streams over one or more networks for on-the-fly schema evolution
CN104601471B (en) The reading/writing method and network processing unit of a kind of forwarding information table
CN102937964A (en) Intelligent data service method based on distributed system
WO2013097119A1 (en) Method and device for realizing multilevel storage in file system
JP2022550401A (en) Data upload method, system, device and electronic device
US20080168071A1 (en) Storing Data in Predicted Formats
US10838931B1 (en) Use of stream-oriented log data structure for full-text search oriented inverted index metadata
EP2208317B1 (en) Compressing null columns in rows of the tabular data stream protocol
WO2012088767A1 (en) Device and method for storing mass data based on tree structure
CN112035466B (en) External index development framework for block chain query
WO2024032526A1 (en) Data retrieval processing method and system
WO2021258360A1 (en) On-board data storage method and system
WO2011131078A1 (en) Data management method and system for field bus instrument management system
CN117149777A (en) Data query method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11771532

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11771532

Country of ref document: EP

Kind code of ref document: A1