CN105404556B - Communication system and method based on L-QT-P multithreading event trigger mechanisms - Google Patents

Communication system and method based on L-QT-P multithreading event trigger mechanisms Download PDF

Info

Publication number
CN105404556B
CN105404556B CN201510691455.7A CN201510691455A CN105404556B CN 105404556 B CN105404556 B CN 105404556B CN 201510691455 A CN201510691455 A CN 201510691455A CN 105404556 B CN105404556 B CN 105404556B
Authority
CN
China
Prior art keywords
event
multithreading
manager module
communication system
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510691455.7A
Other languages
Chinese (zh)
Other versions
CN105404556A (en
Inventor
单红宇
林琦
李培培
缪凯
陈志明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
Jiangsu Fangtian Power Technology Co Ltd
Yangzhou Power Supply Co of Jiangsu Electric Power Co
Original Assignee
State Grid Corp of China SGCC
Jiangsu Fangtian Power Technology Co Ltd
Yangzhou Power Supply Co of Jiangsu Electric Power Co
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 State Grid Corp of China SGCC, Jiangsu Fangtian Power Technology Co Ltd, Yangzhou Power Supply Co of Jiangsu Electric Power Co filed Critical State Grid Corp of China SGCC
Priority to CN201510691455.7A priority Critical patent/CN105404556B/en
Publication of CN105404556A publication Critical patent/CN105404556A/en
Application granted granted Critical
Publication of CN105404556B publication Critical patent/CN105404556B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a kind of communication systems and method based on L-QT-P multithreading event trigger mechanisms, communication system includes, event manager module provides affair logic cycle, supports the various ways such as SELECT, POLL, EPOLL to detect ready event signal, passes through call back scheme trigger event signal;Fundamental functional modules provide abundant basic function, including interfaces such as IO read-writes, file directory monitoring, timer and encoding and decoding;Multithreading module provides thread pool service, supports the establishment and destruction of thread, while also providing the thread lock type of a variety of practicalities.The present invention can the ready event signal of high speed detection, provide abundant basic function interface, multithreading operation class be provided.The communication means of the present invention efficiently, portable, non-obstruction and cross-platform, to for electric system provide easily communication technology frame, greatly improve power system information platform construction speed.

Description

Communication system and method based on L-QT-P multithreading event trigger mechanisms
Technical field
The present invention relates to a kind of communication systems and method based on L-QT-P multithreading event trigger mechanisms, belong to power train System auxiliary monitoring technology field.
Background technology
In March, 2015, premier Li Keqiang was put forward for the first time " internet+" action plan, " internet in the government work report + " it is exactly " internet+each traditional industries ", the core feature that internet is developed as current informationization, with industry, business And the service trades such as financial circles are merged comprehensively.The whole society reinforces promoting all trades and professions all in response " internet+" upsurge at present Informatization.
In electric system, " internet+" is equally also pushed to build, still the Information System configuration of " internet+" is all It is be unable to do without communication infrastructure, the technical support as bottom is communicated, is the core layer of information system, therefore there is an urgent need to a kind of stabilizations Efficient communication means will provide communication construction for various Information System configurations, to more preferably promote the " mutual of power industry Networking+" is built.
Invention content
The purpose of the present invention is to provide a kind of communication system based on the efficient multithreading event trigger mechanisms of L-QT-P and Method, that is, just it is to provide a kind of technology of efficient multithreading event trigger mechanism, it can be provided for various information systems The communication construction of convenient and efficient, the development cycle so as to shorten information system and development cost technically support " internet+" It builds.
In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:
Based on the communication system of L-QT-P multithreading event trigger mechanisms, including fundamental functional modules, event manager module With multithreading module,
The fundamental functional modules provide I/O read-writes, timer, catalogue monitoring, encoding and decoding, signal/slot, data structure, Network library functional interface, all functional interfaces are presented in a manner of standard C++;
The event manager module provides affair logic cycle, support SELECT, POLL, EPOLL, KQUEUE, DEVPOLL, EVPORT and WIN32 event detection mode detect ready event signal;The event manager module is for inspection Ready event signal is measured, with call-back manner trigger event signal, and notifies upper layer application in time;
The multithreading module is based on the libraries PTHREAD, provides cross-platform multithreading service.
Event manager module above-mentioned can select optimal event detection mode automatically according to current platform, also can be according to upper The specified event detection mode of layer is detected.
The event of event manager module detection above-mentioned includes network event, file event and other events.
Multithreading module above-mentioned supports the establishment and destruction of thread, while also providing a variety of thread lock types.
The method that communication system based on L-QT-P multithreading event trigger mechanisms is communicated, includes the following steps:
1) event type of the upper layer application to event manager module registration concern;
2) event manager module starts event detection, identifies all event signals of registration;
3) when event occurs, after event manager module detects ready event signal, led in time by call-back manner Know upper layer application;
4) upper layer application carries out respective logic business processing according to event type, to complete the place of whole event flow Reason.Communication means above-mentioned supports WINDOWS, LINUX kinds of platform.
The advantageous effect that the present invention is reached:
(1) communication construction of efficient stable, the development cycle so as to shorten information system and development cost are formulated, letter is accelerated Breathization construction speed;
(2) multiple functions interface is provided, abundant basic function library is integrated, meets various requirement of information system;
(3) it supports multi-threaded architecture, meets information system for big concurrent requirement;
(4) support is cross-platform, and technical support is provided to be built under each platform;
(5) communication means of the invention has high speed, portable and non-blocking performance.
Description of the drawings
Fig. 1 is the structural schematic diagram of the communication system of the present invention;
Fig. 2 is the flow chart that network event triggers in the embodiment of the present invention.
Specific implementation mode
The invention will be further described with reference to the accompanying drawings and detailed description.Following embodiment is only used for more clear Illustrate to Chu technical scheme of the present invention, and not intended to limit the protection scope of the present invention.
The present invention provides a kind of communication means based on the efficient multithreading event trigger mechanisms of L-QT-P, and wherein L indicates base In the event manager module that Libevent is provided, QT expressions are C++ base libraries, rely on QT and provide fundamental functional modules, P indicates base Cross-platform multithreading library is provided in PTHREAD.
As shown in Figure 1, the communication system based on the efficient multithreading event trigger mechanisms of L-QT-P of the present invention, includes mainly Three big module of fundamental functional modules, event manager module and multithreading module.Wherein,
Fundamental functional modules rely primarily on the libraries QT, provide I/O read-writes, timer, catalogue monitoring, encoding and decoding, signal/slot, The functional interfaces such as data structure, network library and other basic functions, all functional interfaces are presented in a manner of standard C++, are used Get up convenient and efficient.
Event manager module is core of the invention module, provides affair logic and recycles, support SELECT, POLL, EPOLL, KQUEUE, DEVPOLL, EVPORT and WIN32 mode detect ready event signal, can be automatically according to current platform Optimal event detection mode is selected, can also be detected in such a way that upper layer is specified.Wherein, event can be network thing Part, file event and other events.For detecting ready event signal, can be believed with call-back manner trigger event Number, upper layer application is notified in time.
Multithreading module is based primarily upon the libraries PTHREAD, provides cross-platform multithreading service, supports establishment and the pin of thread It ruins, while the thread lock type of a variety of practicalities being also provided.
As shown in Fig. 2, by taking network event as an example, the flow that system using the present invention is communicated includes mainly following Step:
1) event type of the upper layer application to event manager module registration concern;
2) event manager module starts event detection mechanism, identifies all event signals of registration;
3) when there is network event generation, including network connection event, network data event and thing may be disconnected Part etc.;
4) after event manager module detects ready event signal, upper layer application is just notified by call-back manner in time;
5) upper layer application carries out respective logic business processing according to event type, so as to complete the height of whole event flow Effect processing.
The communication means of the present invention supports the kinds of platform constructing environments such as WINDOWS, LINUX.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, without departing from the technical principles of the invention, several improvement and deformations can also be made, these improvement and deformations Also it should be regarded as protection scope of the present invention.

Claims (6)

1. the communication system based on L-QT-P multithreading event trigger mechanisms, which is characterized in that including fundamental functional modules, event Management module and multithreading module,
The fundamental functional modules provide I/O read-writes, timer, catalogue monitoring, encoding and decoding, signal/slot, data structure, network Library facility interface, all functional interfaces are presented in a manner of standard C++;
The event manager module provides affair logic cycle, support SELECT, POLL, EPOLL, KQUEUE, DEVPOLL, EVPORT and WIN32 event detection modes detect ready event signal;The event manager module is for detecting Ready event signal with call-back manner trigger event signal, and notifies upper layer application in time;
The multithreading module is based on the libraries PTHREAD, provides cross-platform multithreading service;
The L indicates the event manager module provided based on Libevent, and QT expressions are C++ base libraries, relies on QT and provides basis Function module, P expressions provide cross-platform multithreading library based on PTHREAD.
2. the communication system according to claim 1 based on L-QT-P multithreading event trigger mechanisms, which is characterized in that institute Optimal event detection mode can be selected automatically according to current platform by stating event manager module, the event that can be also specified according to upper layer Detection mode is detected.
3. the communication system according to claim 1 based on L-QT-P multithreading event trigger mechanisms, which is characterized in that institute The event for stating event manager module detection includes network event, file event and other events.
4. the communication system according to claim 1 based on L-QT-P multithreading event trigger mechanisms, which is characterized in that institute It states multithreading module and supports the establishment and destruction of thread, while a variety of thread lock types being also provided.
5. the communication system according to any one of claims 1 to 4, based on L-QT-P multithreading event trigger mechanisms into The method of row communication, which is characterized in that include the following steps:
1) event type of the upper layer application to event manager module registration concern;
2) event manager module starts event detection, identifies all event signals of registration;
3) it when event occurs, after event manager module detects ready event signal, is notified in time by call-back manner Layer application;
4) upper layer application carries out respective logic business processing according to event type, to complete the processing of whole event flow.
6. according to the method described in claim 5, it is characterized in that, the communication means supports more kinds of WINDOWS, LINUX flat Platform.
CN201510691455.7A 2015-10-22 2015-10-22 Communication system and method based on L-QT-P multithreading event trigger mechanisms Active CN105404556B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510691455.7A CN105404556B (en) 2015-10-22 2015-10-22 Communication system and method based on L-QT-P multithreading event trigger mechanisms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510691455.7A CN105404556B (en) 2015-10-22 2015-10-22 Communication system and method based on L-QT-P multithreading event trigger mechanisms

Publications (2)

Publication Number Publication Date
CN105404556A CN105404556A (en) 2016-03-16
CN105404556B true CN105404556B (en) 2018-10-30

Family

ID=55470055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510691455.7A Active CN105404556B (en) 2015-10-22 2015-10-22 Communication system and method based on L-QT-P multithreading event trigger mechanisms

Country Status (1)

Country Link
CN (1) CN105404556B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096340B (en) * 2018-01-29 2020-11-17 北京世纪好未来教育科技有限公司 Timing task processing method and device
CN109274643A (en) * 2018-08-14 2019-01-25 国网甘肃省电力公司电力科学研究院 A kind of new energy plant stand generator unit terminal access management system based on libevent framework
CN109298955A (en) * 2018-09-30 2019-02-01 苏州浪潮智能软件有限公司 One kind being based on event driven robot application framework
CN109408048A (en) * 2018-09-30 2019-03-01 苏州浪潮智能软件有限公司 One kind being based on event driven robot platform system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102457578A (en) * 2011-12-16 2012-05-16 中标软件有限公司 Distributed network monitoring method based on event mechanism
CN103761235A (en) * 2013-11-18 2014-04-30 芜湖大学科技园发展有限公司 Distribution method and application of universal power data platform
CN104360904A (en) * 2014-10-16 2015-02-18 四川长虹电器股份有限公司 Intermodular message transmission mechanism based on event bus

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8032792B2 (en) * 2003-07-11 2011-10-04 Avicode, Inc. Dynamic discovery algorithm
US7610266B2 (en) * 2005-05-25 2009-10-27 International Business Machines Corporation Method for vertical integrated performance and environment monitoring

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102457578A (en) * 2011-12-16 2012-05-16 中标软件有限公司 Distributed network monitoring method based on event mechanism
CN103761235A (en) * 2013-11-18 2014-04-30 芜湖大学科技园发展有限公司 Distribution method and application of universal power data platform
CN104360904A (en) * 2014-10-16 2015-02-18 四川长虹电器股份有限公司 Intermodular message transmission mechanism based on event bus

Also Published As

Publication number Publication date
CN105404556A (en) 2016-03-16

Similar Documents

Publication Publication Date Title
CN105404556B (en) Communication system and method based on L-QT-P multithreading event trigger mechanisms
Dongarra Report on the sunway taihulight system
US8516112B2 (en) Performance monitoring of a computer resource
CN103389715B (en) A kind of high performance distributive data center monitoring framework
RU2015153190A (en) COMBINATION OF GEOZONE EVENTS
CN103761182A (en) Method and device for deadlock detection
CN102135932A (en) Monitoring system and monitoring method thereof
CN104182846A (en) Client management system
CN104699735A (en) Data processing method and device for enterprise data center
WO2018120891A1 (en) Software development progress early warning method, device, server, and storage medium
CN103324715A (en) Disaster recovery backup system availability detection method and device
CN102467434A (en) Method for acquiring storage device state signal by utilizing baseboard management controller
WO2019047618A1 (en) Fault report processing method, device and system for article
CN105573842B (en) The method and device of process recovery processing is carried out in the application
CN105468438B (en) The method and device of process recovery processing is carried out in the application
CN115102838B (en) Emergency processing method and device for server downtime risk and electronic equipment
CN105955865A (en) Monitoring method and system aiming at K-DB database
CN104113871A (en) Multi-dimension based invalid number detecting system and method
CN115470075A (en) Application program fault detection method and device, electronic equipment and storage medium
CN114706371A (en) Complete vehicle network non-dormancy diagnosis method and device, electronic equipment and storage medium
CN103823812A (en) System data management method
CN103197981A (en) Prewarning method and system for memory space
CN103902388A (en) Method for achieving communication between applications and electronic device
CN101140529A (en) Multiple events handling method and apparatus based on synchronous affair duplex separator
Chen et al. Experimental Study on Cloud-Computing-Based Electric Power SCADA System

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant