Advertisement
Advertisement

More Related Content

Advertisement

Applying Drools in Assistive Technology

  1.  
  2. Applying JBoss Drools in Assistive Technology
  3. Contributor and committer on Seam
  4. Applying Drools in AT
  5. Event Processing
  6. Drools Fusion examples
  7. Vision for the future
  8. Q&A
  9. AT products help peoples with disabilities to achieve greater independence, enhance their quality of life and compete in the real world ( inclusive society ).
  10. Modern AT industry sustainable and profitable.
  11. Main focus: respond to the needs and wants of users.
  12. Close relationships to main-stream researches, such as robotics, cognition, AI, IT, sensor technology, real time control etc.
  13. Scalability and adaptivity
  14. Improve performance over time
  15. Acquisition/preservation of user experience and knowledge
  16. Improve maintainability and robustness in spite of user and environmental disturbances
  17. Mouse cursor control for handicapped individuals (MCC) – main operations: pointing and clicking .
  18. Ca. 250 commercial MCC products available at the market worldwide.
  19. Multitude of MCC concepts: switch-related systems (sip/puff switches), head pointing systems, eye tracking systems, BCI etc.
  20. None of them provide a standardized general system for subjects with severe disabilities.
  21. Use of innovative technologies, such as AI approaches, methods and tools (e.g. automated reasoning, first-order logic, fuzzy logic, neural-networks etc.).
  22. Development of standardized HW and SW modules that can be configured for a specific user.
  23. Indirect pointing of target items (scanning) based on Morse codes sequences of dots (sip) and dashes (puff).
  24. Traditional line scanning.
  25. Quite inefficient and tedious, especially for users with limited breathing or learning capabilities.
  26. New input air flow defines velocity of cursor moving.
  27. Fuzzy scanning algorithms: circular scan, selection area scan, object selection, etc
  28. Feasible and promising solution for development of sophisticated and adaptive MMC (HCI) systems.
  29. Constraints: relatively good breathing control is needed. Sensitivity to disturbances.
  30. Multi-channel inputs and action outputs (MIMO) can further improve performance and robustness, however fuzzy logic and control applications become extremely complex.
  31. Processing large number of input events becomes problematic.
  32. ability to combine classical predicate logic with fuzzy logic to represent the system as combination of discrete as well as continuous events.
  33. ability to process large number of complex events through multiple input channels.
  34. BPM capabilities
  35. tooling and testing support
  36. Drools (1) “ A common platform to model and govern the business logic of the enterprise.”
  37. Drools (2) “ A common platform to model and govern the business logic of the enterprise.”
  38. Extensions of the RETE networks using set of pluggable modules.
  39. Drools-Chance (still in development) makes Drools capable of dealing with imperfect information natively. Also adds possibility to configure behavior of the engine to reason with different type of imperfection without changing the production rules.
  40. Tooling support
  41. Ability to test/monitor all parts of AT system.
  42. Ability to run/embed into OSGi environments and future AT devices.
  43. Changing rules does not require a complete deployment of AT systems.
  44. Provides background to build modular and scalable AT systems, such as integrate additional sensors for a specific user and develop rules, without influencing specific application (e.g. computer or assistive device control).
  45. Rules can be modified by different group of users (technicians, physicians, end-users).
  46. Rule language is simple to learn.
  47. End-users can be involved to resolve conflicts and perform specific actions (improved robustness).
  48. Efficient for frequent change of rules dependent on user experience, health state, specific needs etc.
  49. Comp. Systems: entity/object that represents this occurrence
  50. 1 RW Event -> ∞ CS Events
  51. Distribution Channels: provides means of distributing events (typically one-to-many distribution, async)
  52. Consumers: receive and act upon events (Applications, Systems, Data Stores, Business Processes, etc)
  53. Intermediary Processing: rout / filter (raw events), produce (derived events). Consists of a number of building blocks (Agents) Intermediary Processing Event Producers Event Consumers
  54. Event Processing Agents Building Blocks for: Translation, Composition, Aggregation, Enrichment, Splitting, Projection, Pattern Detection, etc. Even Filtering Event Matching Event Derivation time time time
  55. Can be described as process flows such as Drools-Flow
  56. Testing, debugging, monitoring (and self-monitoring/adapting)
  57. Customizable and easily replaceable network parts
  58. Integration with Human tasks public class ErrorEventListener implements ProcessEventListener { public void afterNodeLeft(ProcessNodeLeftEvent event) { ksession .getWorkingMemoryEntryPoint( entryPointName ).insert(event); ... } declare ProcessNodeLeftEvent @role( event ) end rule "Number of Cursor Rotations is above threshold" when Number( nbProcesses : intValue > 5 ) from accumulate ( e: ProcessNodeLeftEvent( nodeInstance.nodeName == "CursorRotationNode" ) over window:size(10s), count(e) ) then drools.getWorkingMemory().getProcessInstance(ATDepartmentNotificationProcess).signalEvent( "notify" , "cursor rotation threshold exceeded" ); end
  59. Spacial: takes account geospatial event info
  60. State-oriented: depends on state of some external entity
  61. Segmentation-oriented: partitions events by their attribute values (for example age >= 35)
  62. Drools Fusion
  63. Creating Derived Events: declare Direction @role( event ) @timestamp( timestamp ) @expires( 1m ) end declare Strength @role( event ) @expires( 1m ) end declare DoubleClick @role( event ) direction : Direction strength : Strength delay : int end rule detectDoubleClick when $direction : Direction( ) from entry-point "Raw-Direction-Stream" ... $strength : Strength( ) from entry-point "Raw-Strength-Stream" ... then DoubleClick dc = new DoubleClick($direction, $strength, 0); entryPoints[ "Cursor-Control-Endpoint-Stream" ). insert (dc); end
  64. Negative patterns, waiting for events to happen: declare Click @role( event ) @expires( 1m ) delay : int end declare Drag @role( event ) @expires( 1m ) direction : Direction strength : Strength delay : int end rule invalidDragMotion when $dragEvent : Drag( ) from entry-point "Cursor-Control-Endpoint-Stream" not ( Click( this before $dragEvent ) from entry-point "Cursor-Control-Endpoint-Stream" ) // click starts drag event then # notify user+system of invalid command ... end rule lenientDragMotion when $dragEvent : Drag( ) from entry-point "Cursor-Control-Endpoint-Stream" not ( Click( this before $dragEvent ) from entry-point "Cursor-Control-Endpoint-Stream" ) Click( this after[0s,5s] $dragEvent ) from entry-point "Cursor-Control-Endpoint-Stream" then # allow drag motion... ... end
  65. Engine manages all scoping and synchronizations behind the scenes.
  66. Event processing from specific streams in rules: StatefulKnowledgeSession ksession = ... ... WorkingMemoryEntryPoint rawDirectionEntryPoint = ksession.getWorkingMemoryEntryPoint( "Raw-Direction-Stream" ); WorkingMemoryEntryPoint rawStrengthEntryPoint = ksession.getWorkingMemoryEntryPoint( "Raw-Strength-Stream" ); … // Every time we get input from direction sensor do: rawDirectionEntryPoint.insert(direction); // Every time we get input from flow sensor do: rawStrengthEntryPoint.insert(strength); ... rule detectVerticalScrolling When ... $direction : Direction( ) from entry-point "Raw-Direction-Stream" $strength : Strength( ) from entry-point "Raw-Strength-Stream" ... then ...
  67. Dynamic registration of consumers in channels possible.
  68. b) Channel Implementation:
  69. Push derived events for distribution in rules: StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(config, null ); ksession.registerChannel( &quot;cursor-control&quot; , new CursorControlChannel()); ... public class CursorControlChannel implements Channel { private List<MouseControlService> controlServices ; @Override public void send(Object command) { for (MouseControlService service : controlServices ) { service.publishCommand(command); } } ... rule detectDoubleClick when ... then DoubleClick dc = new DoubleClick(); ... channels[ &quot;cursor-control&quot; ].send( dc ); end
  70. Choose a Clock type (realtime or pseudo for testing): ... KnowledgeBaseConfiguration config = KnowledgeBaseFactory. newKnowledgeBaseConfiguration (); config.setOption( EventProcessingOption. STREAM ); KnowledgeBase kbase = KnowledgeBaseFactory. newKnowledgeBase (config); ... ... KnowledgeSessionConfiguration config = KnowledgeBaseFactory. newKnowledgeSessionConfiguration (); config.setOption( ClockTypeOption. get ( &quot;realtime&quot; ) ); StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(config, null ); ...
  71. Automatic event lifecycle management
  72. Support for sliding windows
  73. Length rule &quot;Normalize cursor motion speed&quot; when CursorSpeedThreshold( $max : max ) Number( doubleValue > $max) from accumulate ( Strength( $val : value ) over window:length( 200 ), average( $val ) ) then // normalize the cursor speed end rule “Detect excessive Cursor Rotation” when Number( intValue > 15 ) from accumulate ( CursorRotation( ) over window:time(30s), count(e) ) then drools.getWorkingMemory().getProcessInstance(ATDepartmentNotificationProcess).signalEvent( &quot;notify&quot; , &quot;cursor rotation threshold exceeded&quot; ); end
  74. Drools Fusion – Temporal Context Operators
  75. Project: http://www.jboss.org/drools
  76. Reference Manual: http://www.jboss.org/drools/documentation.html
  77. Blog: http://blog.athico.com/
  78. Mailing Lists: http://www.jboss.org/drools/lists.html

Editor's Notes

  1. Expert – Rule Engine side, Logic side Flow – advanced process engine, tight integration of processes and rules Fusion – Even Processing , CEP integration into Drools Guvnor - about server-side management, web stuff
  2. Expert – Rule Engine side, Logic side Flow – advanced process engine, tight integration of processes and rules Fusion – Even Processing , CEP integration into Drools Guvnor - about server-side management, web stuff
Advertisement