Summary of the invention
The object of the invention is to overcome deficiency of the prior art, and a kind of crane remote hierarchical monitoring system of based role is provided, user, role, monitor message are carried out management at different levels, wherein role comprises authority, priority, QOS requirement etc., according to the priority etc. of role assignments visit information, scheduling, thus ensure real-time Transmission and the safety of monitor message, achieve the remote real-time monitoring of crane safety information, streamlining management and maintenance, and be with good expansibility.
The technical solution adopted in the present invention: a kind of crane remote hierarchical monitoring system of based role, comprises information gathering subsystem, remote information maintenance and management subsystem, remote monitoring terminal subsystem;
Described information gathering subsystem adopts embedded technology, various crane sensor signal can be gathered, and send to remote information maintenance and management subsystem, it comprises sensor information collecting unit and information transmitting unit, wherein sensor information collecting unit reads in the information of all the sensors with patrol mode, buffer zone is kept at respectively with respective data type, information transmitting unit, to the form group bag of buffer data according to regulation, then adopts ICP/IP protocol to send data packet to remote information maintenance and management subsystem;
The sensing data that described remote information maintenance and management subsystem responsible receives information acquisition unit is gone forward side by side line pipe reason, receives the request of remote monitoring terminal subsystem, and dispatches the data of Forward-reques; Describedly comprise remote information receiving element, sensor information administrative unit, service management unit, Role Management unit, distribution scheduling administrative unit according to remote information maintenance and management subsystem, wherein remote information receiving element can be received information the connection request of acquisition subsystem, namely start server to monitor, and the data packet that automatic reception information gathering subsystem sends, unpack according to predetermined format, then stored in sensor information database; Sensor information administrative unit is responsible for the maintenance and management of sensor information database; Service management unit is responsible for the User Information Database comprising handler and active user at different levels in maintenance system, comprises user basic information management, user authority management, subscription authentication, user's debarkation authentication; Role Management unit can carry out message reference control by role and ensure monitoring in real time, it is responsible for that role creates, role assignments and mandate, role succession, the restriction of role, the deletion of role and role amendment, control to realize message reference, ensure the real-time monitoring of safety, low discharge; Distribution scheduling administrative unit is at running background, and be responsible for monitoring and accept the request of remote monitoring terminal subsystem, the role according to monitoring client user prepares visit data, and dispatches according to User Priority etc., supports that the real time information of specific user monitors; Described service management unit and Role Management unit belong to static management, before server work and on period, carry out distribution and the rights management of user management and role by handler after being logged in;
Described remote monitoring terminal subsystem can monitor parameters and the operating mode of hoisting crane, and accept and forward suitable control command, comprise user log in subelement, information displaying subelement, query statistic subelement, long-range only stop control subelement, wherein user logs in subelement and can verify user profile, and from remote information maintenance and management subsystem, the data list sensor information database can be passed to this locality; Information displaying subelement can be kept in local buffer memory by downloading data from remote information maintenance and management subsystem, and show data list, sensor to be monitored and the form of display is selected for user, realize real time monitoring, the form wherein shown comprises original data list, histogram, diagram of curves; Query statistic subelement according to the information inquiry corresponding data of user's input, can be presented at this unit interface with original data tabular form; Operating personal directly can send shutdown control signal at the long-range control subelement that only stops, and control convenience is shut down at once.
Described information gathering subsystem also comprises SMS alarm unit, according to the Multi-stage alarming threshold value pre-set, can process the original sensor data being kept at buffer zone, if more than 3 grades of alarm threshold values, then send SMS alarm at once.
Described remote information maintenance and management subsystem also comprises statistics and lead-out unit, can add up hoisting crane running condition, and will add up and Query Result derivation, save as Excel file, wherein hoisting crane running condition statistics comprises operating mode statistics, reports to the police and fault statistics, user's statistics.
Described sensor information administrative unit provides the operation added sensor information database, delete, revise, inquire about, log in rear execution by administrator, wherein inquiry comprises the inquiry by one or more mixing in sensor type, sensor number, moment and period.
Described service management unit does not provide user to register voluntarily online, only has handler to have authority and carries out user authority management, and handler is according to the written application of user, and typing log-on message, for user distributes role, and customizes corresponding authority according to role.
Described user role is divided into multilevel precedence, and distribution scheduling administrative unit carries out management and running according to priority to user's request, and progression is lower, and rank is higher, and the request that priority is the highest meets with a response at first.
Described remote monitoring terminal subsystem can run on desk computer, notebook and handheld mobile device, and wherein handheld mobile device comprises mobile phone, palm PC.
Beneficial effect of the present invention:
1, the present invention supports real-time multiuser to remotely distributed monitoring; By distributing different roles for different user, it is made to possess corresponding information access rights and priority, thus a guiding can be had to security information and partial data distribution, the supervisory user of different role need not transmit full detail, but obtaining portion divided data as required, therefore significantly reduce communication flows, alleviate the pressure of server bandwidth, the real-time scheduling according to priority design, makes high-priority users obtain best real-time performance.
2, the present invention is with good expansibility and retractility; Hoc scenario according to the departments at different levels of crane safety management arranges role, can customize accordingly according to crane type and expand in role's setting, priority assignation and distribution, priority level are arranged, the parameter of monitoring terminal system be configurable, functional module can be reduced.
3, the present invention has good safety; Different role has the data access authority of different stage, is merely able to the security information and the visit capacity that obtain corresponding authority; Various monitor terminal obtains corresponding priority according to the role of user, in conjunction with the type (calculating and storage capacity) of terminal, obtains the information meeting safety and network transmission service quality requirement.
4, the present invention has advanced information dissemination management technology, ensures the real-time monitoring realizing multi-user; Be provided with two distribution administration queue, one for leading subscriber request, the task that management data forwards, takes into full account priority and data volume, devises new time slice method of calculating.
Detailed description of the invention
As shown in Figure 1, a kind of crane remote hierarchical monitoring system of based role, comprise information gathering subsystem, remote information maintenance and management subsystem, remote monitoring terminal subsystem, information gathering subsystem adopts embedded technology, various crane sensor signal can be gathered, and sending to remote information maintenance and management subsystem, information gathering subsystem comprises network connection unit, sensor information collecting unit, SMS alarm unit, information transmitting unit; Remote information maintenance and management subsystem responsible receives the sensing data of information acquisition unit and to go forward side by side line pipe reason, receive the request of remote monitoring terminal subsystem, and dispatch the data of Forward-reques, remote information maintenance and management subsystem comprises remote information receiving element, sensor information administrative unit, service management unit, Role Management unit, distribution scheduling administrative unit and statistics and lead-out unit; Remote monitoring terminal subsystem can monitor parameters and the operating mode of hoisting crane, and accept and forward suitable control command, remote monitoring terminal subsystem comprise user log in subelement, information displaying subelement, query statistic subelement, long-range only stop control subelement; Connection between information gathering subsystem, remote information maintenance and management subsystem, remote monitoring terminal subsystem can adopt radio communication, also can adopt cable network.
(1) information gathering subsystem
1, hardware-software design
This subsystem is developed based on embedded technology.CPU adopts the ARM COTEX A8 S5PV210 treater of Samsung, and dominant frequency reaches 1GHz, and carries 512MB Nand Flash, 1GB DDR sdram memory.Integrated Qualcomm WCDMA 3G module, supports the movement/UNICOM/telecommunications 3G communication module of usb mouth simultaneously.
The operation platform of information gathering subsystem software is Linux2.6 operating system, adopts QT Embedded 4.5 to develop.Comprise 4 component units: network connection unit, sensor information collecting unit, SMS alarm unit, information transmitting unit.
2, workflow
First, after present system works on power, namely 3G module starts automatic searching network and connects, and the information transmitting unit remote server IP address that then basis is default is from being dynamically connected remote central; In each sampling time, sensor information collecting unit reads in the information of all the sensors with patrol mode, is kept at buffer zone respectively with respective data type; SMS alarm unit, according to the Multi-stage alarming threshold value pre-set, processes the original sensor data being kept at buffer zone, if more than 3 grades of alarm threshold values, then send SMS alarm at once; Information transmitting unit, to the form group bag of buffer data according to regulation, then adopts ICP/IP protocol to send data packet to remote central.
(2) remote information maintenance and management subsystem
This subsystem work, in remote central, is the core of whole system.Primary responsibility receives the sensing data of information gathering subsystem and to go forward side by side line pipe reason, receives the request of remote monitor and control end, and dispatches the data of Forward-reques.Below from three these subsystems of aspect labor.
1, hardware-software design
The system hardware of remote information maintenance and management subsystem is made up of a high-performance server and the network switching equipment.Server adopts HP ProLiant ML350p Gen8 (646677-AA1) (the two cpu/ six cores/internal memory 8G of Xeon E5-2630/), and wireless router adopts Asus RT-AC66U enterprise-level wireless router.Software platform is: Ubuntu Linux 12.04, Qt 4.5 Runtime Library.Data bank adopts MySql.
Software section comprises six subelements altogether, respectively: remote information receiving element, sensor information administrative unit, service management unit, Role Management unit, distribution scheduling administrative unit and statistics and lead-out unit.
2, workflow
After startup of server, namely remote information receiving element starts automatic searching wireless network, the connection request of acquisition subsystem and preparation is received information, and namely starts server and monitors.After receiving information gathering subsystem connection request, accept and connect, automatically starting to receive the data packet that information gathering subsystem sends, unpack according to predetermined format, then stored in sensor information database.Be responsible for the maintenance and management of sensor database by sensor information administrative unit, as inquiry, interpolation, amendment etc., after administrator normally logs in, can associative operation be performed.
Comprise handler and active user at different levels in system, be responsible for maintenance customer's information database by service management unit, comprise that user adds, authority authorizes, deletion etc., also comprise logging in and certification of user.Data access authority, priority etc. are responsible for by Role Management unit, and this is the core function unit of native system.The function of Role Management unit also comprises role's amendment, authority amendment etc.User management and Role Management belong to static management, before server work and on period, carry out distribution and the rights management of user management and role by handler after being logged in.The distribution scheduling management of distribution scheduling administrative unit is also after startup of server, at running background, be responsible for monitoring and accept the request of remote monitor and control end, the role according to monitoring client user prepares visit data, and dispatch according to User Priority etc., support the real time information monitoring of specific user.Service management unit, Role Management unit, distribution scheduling administrative unit are the cores of present system.
As shown in Figure 2, that user proposes monitoring request and the diagram of circuit of response, user first carries out connected system, then authentication is carried out at service management unit input identity information, if checking is not passed through, then returning connection carries out from newly inputting identity information, if the verification passes then by the data analysis of Role Management unit to user role and user's request access, and according to by priority, the data of user's request access are counted data transmit queue, if data transmit queue is empty, then send data, if data with existing request is being waited in line in data transmit queue, then data return queue, the data to be sent such as to rank.
In addition, server run duration, handler can also call statistics and add up hoisting crane running condition with lead-out unit, and will add up and Query Result derivation, saves as Excel file.
(3) each unit detail design in remote information maintenance and management subsystem
1, remote information receiving element
As shown in Figure 3, first server ip address and port are set on software interface, then start monitoring.As client proposes connection request, then accept and connect, starting the data receiving remote transmission, after unpacking by predetermined format, preserving into data bank.
2, sensor information administrative unit
Be responsible for maintenance and management sensor information database, every operations to data bank such as interpolation, deletion, amendment, inquiry are provided.Inquiry comprises by sensor type, by sensor number, by moment and period, and the inquiry of multiple mixing condition, is presented on interface by Query Result.As table 1, be real time information table: preserve the long-range real time sensor data passing to server end.
Table 1 real time information table
| Field name | Type | Whether major key | Remarks |
| Sensor | varchar | No | Sensor type |
| SensorNum | varchar | No | Sensor number |
| Position | varchar | No | Installation site |
| Value | double | No | Sampled value |
| Time | datetime | No | Sampling instant |
3, service management unit
In present system, every authority of user is directly not associated with the data, but is determined by the role of user.Therefore, user management mainly manages as which type of role user distributes.This unit comprises following function: user basic information manages, user authority management, subscription authentication, user's debarkation authentication.
Maintenance and management user basic information data bank is responsible in user basic information management, comprises ID, user name, the age, department, sex, post etc.This module provides every operations to data bank such as interpolation, deletion, amendment, inquiry.
In addition, the ability that user is relevant to service data is kept at " user facillity information table ", and the list item of this table arranges as shown in table 2.Wherein, most important information comprises: role, landing time and subject word.This module provides every operations to data bank such as interpolation, deletion, amendment, inquiry equally.
Table 2 user facillity information table
| Field name | Type | Whether major key | Remarks |
| UserID | varchar | Be | ID |
| UserName | varchar | No | User name |
| Password | varchar | No | Password |
| Role | varchar | No | Role |
| LoginTime | datetime | No | Landing time |
| Duration | int | No | Subject word |
Native system does not provide user to register voluntarily online, only has handler to have authority and carries out user authority management.Handler is according to the written application of user, and typing log-on message, for user distributes role, and customizes corresponding authority according to role.Such as, certain role has 10 kinds of data access operation, but certain user only needs wherein 6 kinds, then handler can delete for it.That is, native system follows principle of least privilege, only for user opens the authority needed most.
According to its authority, subscription authentication module always in background work, judges whether that permission operates when user performs various operation during system cloud gray model, determine the need of debarkation authentication again according to landing time and non-operating time.
User's log-in module is responsible for carrying out password authentication when user's login system, simultaneously according to subject word judge user and password whether effective.
4, Role Management unit
Role Management is the core of native system, carries out message reference control and ensure monitoring in real time by role.This unit comprises following function: role creates, role assignments and mandate, role succession, and Role Management (restriction, deletion and amendment), controls to realize message reference, ensure the real-time monitoring of safety, low discharge.
(1) role creates
The role comprised in system is arranged according to the supervisory management zone grade of enterprise completely, can customize according to the management mode of respective enterprise.With other system unlike, in native system, each role has specific priority, and the determination of priority is see distribution scheduling administrative section.Role Information after customization is saved in the table of character data storehouse.If table 3 is character data storehouse table.
Table 3 character data storehouse is shown
| Field name | Type | Whether major key | Remarks |
| RoleId | varchar | Be | Role ID |
| RoleName | varchar | No | Role name |
| ParentRole | varchar | No | Higher level role |
| Priority | int | No | Priority |
(2) role assignments and mandate
So-called mandate, authorizes the operation power of the corresponding visit information of role exactly.Therefore, first carry out dividing step by step as follows to the information access operation in system.As shown in Figure 4, first the message reference in system is divided into five large classes: sensor information access, user profile access, Role Information access, statistical information access, information access control.Then, continue to divide step by step for sensor information.
Like this, have 62 operations in system, be saved in data manipulation data bank table, as table 4.Wherein, action type refers to above-mentioned five classes.Concrete operations are not exceeding the situation of this five class, can also continue to add.
Table 4 data manipulation data bank table
| Field name | Type | Whether major key | Remarks |
| OperationId | varchar | Be | Operation ID |
| OperationName | varchar | No | Operation name |
| OperationType | varchar | No | Action type |
Then, role-operative relationship table is set up.After being logged in by handler, be the corresponding operating right of each role assignments, be saved in role-operative relationship table.
(3) role succession
Set up in role-operative relationship table process, role inherits all authorities of higher level role automatically, then deletes wherein, namely only has the authority of part higher level role.The authority of all roles is successively decreased step by step.The authority of each role can customize as required, and tailored range can not exceed the extent of competence of higher level role.
(4) Role Management (restriction, deletion and amendment)
Handler has the right to delete role, amendment role ID, title, higher level role and priority.Role's restriction is a kind of special role-operation table, when certain role uses certain to operate, does not allow other roles to use this operation, i.e. Mutual exclusion of roles, is responsible for safeguarding Mutual exclusion of roles information table by handler.
5, distribution scheduling administrative unit
This unit runs on backstage, is responsible for the monitor message request that in disposal system, multiple user proposes.Common remote monitor and control request processes successively by prerequisite variable, if a lot of user asks monitor message within shorter time period, then that asks relatively afterwards must wait for, if be now out of order, corresponding personnel just can not obtain information in time, have larger potential safety hazard.
For ensureing the real time access of each user, carry out the management and running of multi-user's request based on priority.Devise 64 grades of priority, progression is lower, and rank is higher.Wherein 0-3 level retains, and regardless of Provisioning Role when handler distributes, some specific user can use this priority as the request of urgent process.The priority level initializing of control command information is 4 grades, namely has the limit priority of common application.
(1) treating process of user monitoring request of data
As shown in Figure 5, first user's request enters request queue, and then adjust according to priority, the request that priority is the highest meets with a response at first.In same priority situation, first in first out (FIFO) principle is adopted to process.
(2) user asks the process of transmitting of the monitor data obtained
As shown in Figure 5, meet with a response and respective handling after, the data of each user enter forwarding queue and are ready for sending.The scheduling of forwarding queue does not adopt the scheduling strategy of first in first out, but adopts round-robin method.Wherein, the calculating that wheel turns time slice not only considers priority, also needs the size (departure time) considering data volume.If between the wheel refunding each user task distribute counter basic time sheet nice(initial value 1), after the time slice of all tasks is finished, restart new transmission cycle, for each task recalculate distribution basic time sheet quantity.The computing formula distributing to the time slice quantity counter of each task is as follows:
counter=(counter>>1)+(64-priority+1)
Wherein, priority represents priority, and priority is higher, and the time slice of distribution is more, thus maximum possible ensures that the user that priority is high obtains more CPU time.If but after terminating a turnaround time, transmission task does not also complete, represent and send data volume comparatively greatly, for meeting the transmission request of other users, when redistributing time slice, allocation base reduces by half.
6, statistics and lead-out unit
This unit has two kinds of executive modes, and one is periodic statistical, namely arranges measurement period, the triggering statistics that a kind of specific user of being asks.Statistical content mainly comprises following three major types:
(1) operating mode statistics, comprises uninterrupted working time, cumulative operation time, service life etc.;
(2) warning and fault statistics, need to arrange statistical time range;
(3) user's statistics, comprises and logs in number of times, module service condition etc. to user and add up;
In addition, this unit supports statistics to derive, and saves as Excel file.
(3) remote monitoring terminal subsystem
1, Software for Design
Remote monitoring terminal subsystem demands can run on desktop computer, notebook, also can run on the handheld mobile device such as mobile phone, PAD.Therefore, native system comprises two versions that function is identical, interface is consistent: one is adopt QT exploitation, can run on the kinds of platform such as Windows, Linux, can run on desktop computer or notebook; Two is adopt Android exploitation, can run on the equipment such as mobile phone, PAD.
Remote monitoring terminal subsystem software runs on various remote monitoring terminal, belongs to pure software system, comprises four subelements: user log in subelement, information displaying subelement, query statistic subelement, long-range only stop control subelement.
2, workflow
After running software, be dynamically connected remote central certainly.First user needs to carry out authentication by logging in subelement, after checking, from server, this locality is passed in sensor list, is presented in the tree control on the left of software interface.At information displaying subelement, user selects the form of sensor (monitored item) to be monitored and display from the list of tree-shaped sensor, comprise original data list, histogram, curve, this unit starts to download related data (sampling period every certain) from server, is kept in local buffer memory.Next, the main display space data of buffer zone being presented at software interface is selected in display, realizes real time monitoring (postpone very little, according to network state and distance, concrete length of delay has fine difference).At query statistic subelement, user can input pickup type, numbering, monitor data time range etc., from server lookup corresponding data, this unit interface is presented at original data tabular form, the annual report, monthly magazine, the daily paper statistics that comprise peak value, time of run etc. can be carried out, save as text.When occurring abnormal, operating personal directly can send shutdown control signal at the long-range control subelement that only stops, and control convenience is shut down at once.
The present invention is based on the crane remote hierarchical monitoring system of role, adopt the thought of based role to set up the distributed security monitored control system of heavy-duty machine, RBAC method is improved, adds two priority classes and perfect scheduling strategy.User, role's (comprising authority, priority, QOS requirement etc.), monitor message are carried out management at different levels by system, according to the priority etc. of role assignments visit information, scheduling, thus ensure real-time Transmission and the safety of monitor message.In addition, ask real-time grade to divide as required to crane remote monitoring client, thus achieve hierarchical monitoring.This system can realize the remote real-time monitoring of crane safety information, streamlining management and maintenance, and is with good expansibility.