Re: [Neo4j] how to model sequence of events?

483 views
Skip to first unread message

Lasse Westh-Nielsen

unread,
Oct 10, 2012, 7:42:13 AM10/10/12
to ne...@googlegroups.com
Paul,

You can use relationships to model came-before, like so:
http://console.neo4j.org/r/owv0da

Probably simplistic, but wanted to show you http://console.neo4j.org ;)

- Lasse




On Wed, Oct 10, 2012 at 10:59 AM, Paul Lam <paul...@forward.co.uk> wrote:
> Say I have
>
> a set of users
> a set of actions
> timestamped events of directing users to actions
>
> How can I model the graph such that I can find patterns with time-ordering?
> For example, find/count all the users that did action A after action B, or
> find the most popular ordered path between action A and action E.
>
> Cheers,
> Paul
>
> --
>
>

Mattias Persson

unread,
Oct 10, 2012, 8:25:38 AM10/10/12
to ne...@googlegroups.com
Something like http://console.neo4j.org/?id=4p9jvt perhaps?

Where you have users performing actions, where you insert a middle node for each action which points to the action as well as the next action in line. The user node has a relationship to the last middle node where new actions gets appended. Such a middle node could have a time stamp also.

2012/10/10 Lasse Westh-Nielsen <lasse.wes...@neopersistence.com>
--





--
Mattias Persson, [mat...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com

Michael Hunger

unread,
Oct 10, 2012, 8:47:42 AM10/10/12
to ne...@googlegroups.com
Yep a secondary graph structure of a linked list is usually what you use for this.

Probably combined with a time-tree index structure for easier access of time intervals or points in time:

Michael

--
 
 

Duane Nickull

unread,
Oct 10, 2012, 10:28:46 AM10/10/12
to ne...@googlegroups.com
There used to be a good time series graph doc somewhere too yes?
***********************************
Technoracle Advanced Systems Inc.
Consulting and Contracting; Proven Results!
i.  Neo4J, PDF, Java, LiveCycle ES, Flex, AIR, CQ5 & Mobile
t.  @duanechaos
"Don't fear the Graph!  Embrace Neo4J"



--
 
 

Peter Neubauer

unread,
Oct 11, 2012, 10:47:25 AM10/11/12
to ne...@googlegroups.com
Yes,
a timeline implementation is here:
https://github.com/neo4j/graph-collections/blob/master/src/test/java/org/neo4j/collections/timeline/TestTimeline.java

Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html
> --
>
>
Reply all
Reply to author
Forward
0 new messages