CN103632331B - A kind of data service method of configurable plug-in type - Google Patents

A kind of data service method of configurable plug-in type Download PDF

Info

Publication number
CN103632331B
CN103632331B CN201310606355.0A CN201310606355A CN103632331B CN 103632331 B CN103632331 B CN 103632331B CN 201310606355 A CN201310606355 A CN 201310606355A CN 103632331 B CN103632331 B CN 103632331B
Authority
CN
China
Prior art keywords
service
thread
data
services
mode
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
CN201310606355.0A
Other languages
Chinese (zh)
Other versions
CN103632331A (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.)
Four creation technology limited company
Original Assignee
FUJIAN STRONG SOFTWARE Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by FUJIAN STRONG SOFTWARE Co Ltd filed Critical FUJIAN STRONG SOFTWARE Co Ltd
Priority to CN201310606355.0A priority Critical patent/CN103632331B/en
Publication of CN103632331A publication Critical patent/CN103632331A/en
Application granted granted Critical
Publication of CN103632331B publication Critical patent/CN103632331B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to the data service method of a kind of configurable plug-in type, it is characterised in that comprise the steps: step S01: the data, services gathering service is configured, and each data, services makes a distinction with described configuration item, initializes;Step S02: instantiation data service, and service with separate threads service data;Step S03: in the host process of service, by the monitor mode of timeslice mode on duty by turns and event, follows the tracks of, monitors the running status of each business datum service thread;Comprise the steps: step S031: on timeslice is on duty by turns, by traveling through thread, and judge the thread state on each thread, just carry out registration daily record once occur improper state, and attempt restarting this service thread;Step S032: the run case mechanism of binding thread, also registers daily record when thread triggers run case, and carries out the operation of corresponding event;Step S04: report service operation daily record, it is achieved service monitoring alerts.

Description

A kind of data service method of configurable plug-in type
Technical field
The present invention relates to the relevant industrial application of information technology technical fields of preventing and reducing natural disasters, the particularly data service method of taking precautions against natural calamities of a kind of configurable plug-in type such as water conservancy, flood control, the hydrology, meteorology, ocean, territory.
Background technology
Currently, for the tidal data recovering service that industry of preventing and reducing natural disasters is relevant, it is common that when system Construction, which kind of data of service needed, just set up a corresponding data acquisition program or service, data are acquired.It is being continuously increased along with the desired data of business, what flood control was conventional has the data such as watermark protocol data, typhoon data, satellite cloud picture, radar map, ocean has the data of class up to a hundred to need collection, capture program is also continuously increased therewith, a station server often has a variety of different types of data acquisition program, in daily management work, adds many workloads to our management personnel.
The mode of the corresponding data acquisition program of existing a kind of business datum, the resource occupation of server is very big, often too much because gathering service operation, and have influence on the operation stability of system.Daily management is got up also very inconvenient, once personnel change or server hardware environment changes, brings very big parameter all to the properly functioning of whole data acquisition.
Summary of the invention
In view of this, it is an object of the invention to provide the data service method of a kind of configurable plug-in type, carry out configurable centralized management for the program gathered and service, and monitor each collection service, ensure the normal table operation of the service of collection.
The present invention adopts below scheme to realize: the data service method of a kind of configurable plug-in type, it is characterised in that comprise the steps:
Step S01: the data, services gathering service is configured, and each data, services makes a distinction with described configuration item, initializes;
Step S02: instantiation data service, and service with separate threads service data;
Step S03: in the host process of service, by the monitor mode of timeslice mode on duty by turns and event, follows the tracks of, monitors the running status of each business datum service thread;Comprise the steps:
Step S031: on timeslice is on duty by turns, by traveling through thread, and judges the thread state on each thread, just carries out registration daily record once occur improper state, and attempts restarting this service thread;
Step S032: the run case mechanism of binding thread, also registers daily record when thread triggers run case, and carries out the operation of corresponding event;
Step S04: report service operation daily record, it is achieved service monitoring alerts.
In an embodiment of the present invention, being achieved in that of configuration described in described step S01 carries out XML configuration by the service that needs are gathered, it is achieved when data host process starts, and can carry out initializing each data, services according to the content of configuration;Wherein service configuration item is as follows:
ID=services ID;
NAME=Service name;
ServiceID=service plug Thread Id;
Whether AutoRun=runs automatically;
The filename of ServiceAssembly=service plug class libraries DLL;
LogName=service log file name;
RunBase=serving starting method.
In an embodiment of the present invention, the implementation of described step S02: when host process starts, load service by loading the mode of service configuration item;Mode by MainAssembly=System.Reflection.Assembly.LoadFile (ServiceAssembly), the service of loading needs the DLL storehouse run, and by the mode of MainAssembly.CreateInstance, create independent thread and run the data, services loaded;Each data, services has different starting methods, and the configuration content can passed through in RunBase loads starting method, makes it possible to properly functioning.
In an embodiment of the present invention, the implementation of described step S04: when service thread breaks down, registration running log, and by abnormal information regularly by remote access mode, transmission, to the server at center, recognizes the situation of service data service on every station server by the server at center, when there being fault to occur, carry out carrying out at center sound alarm, remind operator on duty to note.
The inventive method, suitable in preventing and reducing natural disasters trade information service, can be passed through the different business data gathered on different server are carried out service configuration.By a main service, the pattern of multiple subservice data, services, data, services is carried out unified management, and support the expansible of future services data, perplex by this method solving the management of many capture programs, the problems such as data, services is unstable, daily data, services management work more scientificization, easy.
Accompanying drawing explanation
Fig. 1 is the inventive method schematic flow sheet.
Detailed description of the invention
Below in conjunction with drawings and Examples, the present invention will be further described.
As it is shown in figure 1, the data service method of a kind of configurable plug-in type, it is characterised in that comprise the steps:
Step S01: the data, services gathering service is configured, and each data, services makes a distinction with described configuration item, initializes;
Step S02: instantiation data service, and service with separate threads service data;
Step S03: in the host process of service, by the monitor mode of timeslice mode on duty by turns and event, follows the tracks of, monitors the running status of each business datum service thread;Comprise the steps:
Step S031: on timeslice is on duty by turns, by traveling through thread, and judges the thread state on each thread, just carries out registration daily record once occur improper state, and attempts restarting this service thread;
Step S032: the run case mechanism of binding thread, also registers daily record when thread triggers run case, and carries out the operation of corresponding event;
Step S04: report service operation daily record, it is achieved service monitoring alerts.
Concrete, the present embodiment to realize step as follows:
1, the data, services gathering service is configured
By to needing the service gathered to carry out XML configuration, it is achieved when data host process starts, it is possible to carry out initializing each data, services according to the content of configuration.Service configuration item is as follows:
ID=services ID;
NAME=Service name;
ServiceID=service plug Thread Id;
Whether AutoRun=runs automatically;
The filename of ServiceAssembly=service plug class libraries DLL;
LogName=service log file name;
RunBase=serving starting method;
……
Each data, services is made a distinction by above acquisition configuration item, is initialized, and when the later stage has newly-increased new business datum to service, directly can increase this data service information in configuration item newly.
2, instantiation data service, and service with separate threads service data
When host process starts, load service by loading the mode of service configuration item.By the mode (wherein this System.Reflection.Assembly.LoadFile is the process operation class libraries of microemulsion sample injection framework) of MainAssembly=System.Reflection.Assembly.LoadFile (ServiceAssembly), the service of loading needs the DLL storehouse run, and by the mode of MainAssembly.CreateInstance (wherein, this MainAssembly.CreateInstance is the process operation class libraries of microemulsion sample injection framework), create independent thread and run the data, services loaded.Each data, services has different starting methods, and the configuration content can passed through in RunBase loads starting method, makes it possible to properly functioning.
3, by servicing host process tracking, monitoring each service thread running status
In the host process of service, by the monitor mode of timeslice mode on duty by turns and event, follow the tracks of, monitor the running status of each business datum service thread.First, on timeslice is on duty by turns, by traveling through thread, and judge the thread state on each thread, just carry out registration daily record once occur improper state, and attempt restarting this service thread.Secondly, the run case mechanism of binding thread, also register daily record when thread triggers run case, and carry out the operation of corresponding event.
4, service operation daily record is reported, it is achieved service monitoring alerts
When service thread breaks down, registration running log, and by abnormal information regularly by remote access mode, transmission is to the server at center, by the server at center it is recognized that the situation of service data service on every station server, when there being fault to occur, it is possible to carry out carrying out sound alarm at center, operator on duty is reminded to note.
The foregoing is only presently preferred embodiments of the present invention, all equalizations done according to the present patent application the scope of the claims change and modify, and all should belong to the covering scope of the present invention.

Claims (2)

1. the data service method of a configurable plug-in type, it is characterised in that comprise the steps:
Step S01: the data, services gathering service is configured, and each data, services makes a distinction with configuration item, initializes;
Step S02: instantiation data service, and service with separate threads service data;
Step S03: in the host process of service, by the monitor mode of timeslice mode on duty by turns and event, follows the tracks of, monitors the running status of each business datum service thread;Comprise the steps:
Step S031: on timeslice is on duty by turns, by traveling through thread, and judges the thread state on each thread, just carries out registration daily record once occur improper state, and attempts restarting this service thread;
Step S032: the run case mechanism of binding thread, also registers daily record when thread triggers run case, and carries out the operation of corresponding event;
Step S04: report service operation daily record, it is achieved service monitoring alerts;
The implementation of described step S02: when host process starts, loads service by loading the mode of service configuration item;Mode by MainAssembly=System.Reflection.Assembly.LoadFile (ServiceAssembly), the service of loading needs the DLL storehouse run, and by the mode of MainAssembly.CreateInstance, create independent thread and run the data, services loaded;Each data, services has different starting methods, and the configuration content can passed through in RunBase loads starting method, makes it possible to properly functioning;
The implementation of described step S04: when service thread breaks down, registration running log, and by abnormal information regularly by remote access mode, transmission is to the server at center, the situation of service data service on every station server is recognized by the server at center, when there being fault to occur, carry out carrying out at center sound alarm, remind operator on duty to note.
2. the data service method of a kind of configurable plug-in type according to claim 1, it is characterized in that: being achieved in that of configuration described in described step S01 carries out XML configuration by the service that needs are gathered, realize when data host process starts, can carry out initializing each data, services according to the content of configuration;Wherein service configuration item is as follows:
ID=services ID;
NAME=Service name;
ServiceID=service plug Thread Id;
Whether AutoRun=runs automatically;
The filename of ServiceAssembly=service plug class libraries DLL;
LogName=service log file name;
RunBase=serving starting method.
CN201310606355.0A 2013-11-26 2013-11-26 A kind of data service method of configurable plug-in type Active CN103632331B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310606355.0A CN103632331B (en) 2013-11-26 2013-11-26 A kind of data service method of configurable plug-in type

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310606355.0A CN103632331B (en) 2013-11-26 2013-11-26 A kind of data service method of configurable plug-in type

Publications (2)

Publication Number Publication Date
CN103632331A CN103632331A (en) 2014-03-12
CN103632331B true CN103632331B (en) 2016-06-29

Family

ID=50213350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310606355.0A Active CN103632331B (en) 2013-11-26 2013-11-26 A kind of data service method of configurable plug-in type

Country Status (1)

Country Link
CN (1) CN103632331B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461862B (en) * 2014-10-23 2017-07-21 中标软件有限公司 Resource recovery method and apparatus after data handling system and thread collapse
CN106385341B (en) * 2016-08-31 2021-03-26 福建天晴数码有限公司 Method and system for monitoring thread by client
CN106933636B (en) * 2017-03-16 2020-08-18 北京奇虎科技有限公司 Method and device for starting plug-in service and terminal equipment
CN109298988A (en) * 2018-07-20 2019-02-01 山东中创软件商用中间件股份有限公司 A kind of acquisition methods and relevant apparatus of cluster instance state
CN112214459A (en) * 2020-10-12 2021-01-12 成都精灵云科技有限公司 Resource processing flow log collection system based on event mechanism

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169436A (en) * 2011-05-10 2011-08-31 清华大学 General control kernel system used for integrated circuit manufacturing equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169436A (en) * 2011-05-10 2011-08-31 清华大学 General control kernel system used for integrated circuit manufacturing equipment

Also Published As

Publication number Publication date
CN103632331A (en) 2014-03-12

Similar Documents

Publication Publication Date Title
CN103632331B (en) A kind of data service method of configurable plug-in type
CN112667362B (en) Method and system for deploying Kubernetes virtual machine cluster on Kubernetes
US7340654B2 (en) Autonomic monitoring in a grid environment
CN101996106B (en) Method for monitoring software running state
CN101799751B (en) Method for building monitoring agent software of host machine
CN101464811B (en) Multitask monitoring management system
CN112328456B (en) Cluster resource monitoring system based on service discovery
CN105677501A (en) Refined process monitoring method and system based on watchdog in Linux system
CN105843182A (en) Power dispatching accident handling scheme preparing system and power dispatching accident handling scheme preparing method based on OMS
CN103049268A (en) Naplet based application development and management system
CN101719852B (en) Method and device for monitoring performance of middleware
US11782946B2 (en) Automatic tag mapping and generation from data string
CN110134518A (en) A kind of method and system improving big data cluster multinode high application availability
CN102722431A (en) Process monitoring method and process monitoring device
CN105224464A (en) A kind of parallel automated testing method
CN105490864A (en) Business module monitoring method based on OSGI
CN109471778A (en) A kind of monitoring method of electric system, device and equipment
CN111368165A (en) Spatio-temporal streaming data integration platform
CN103324715A (en) Disaster recovery backup system availability detection method and device
CN105227379A (en) A kind of centralized monitor for java web application and method for early warning
CN105893211A (en) Method and system for monitoring
CN109450694A (en) Multinode isomery operation management method and system based on autonomous controllable software and hardware
CN106547861A (en) A kind of method and device of the data base of intelligent management machine node
CN102929619A (en) Process automation software development system across hardware platform
CN106527371B (en) Intelligence manufacture BC system general driving frame

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 350001 unit 6, 4 building, 245 Xiu Shan Road, Xin Dian Town, Jinan District, Fuzhou, Fujian, 608

Patentee after: Four creation technology limited company

Address before: 350001 Fuzhou, Minhou, Fujian province Minhou Town, Fuzhou Road, Hi-tech Zone, Hi-tech Industrial Park, Chuang Chuang Building 9 and 10

Patentee before: Fujian Strong Software Co., Ltd.

CP03 Change of name, title or address