neo4j学习记录

 

neo4j学习记录

 

 

1、neo4j 文章
https://segmentfault.com/a/1190000017911964
https://cloud.tencent.com/developer/article/1526949
http://doc.we-yun.com:1008/we-yun/demo-gxs.html
http://doc.we-yun.com:10010/browser/
demo
http://dingzhitupu.com/

2、下载
https://github.com/neo4j/neo4j/releases
https://neo4j.com/download-center/
http://we-yun.com/index.php/blog/releases-56.html
https://we-yun.com/doc/neo4j-chs-doc/
https://mirrors.tuna.tsinghua.edu.cn/AdoptOpenJDK/
http://jdk.java.net/java-se-ri/11
3、安装
https://www.cnblogs.com/april-chen/p/12765686.html
https://www.cnblogs.com/jpfss/p/10874303.html
https://www.cnblogs.com/zcy9838/p/11619933.html
https://www.cnblogs.com/soymilk2019/p/14860299.html

压缩包安装
1、新建NEO4J_HOME = C:\neo4j-community-4.2.2
在path后增加%NEO4J_HOME%\bin

JAVA_HOME
C:\Program Files\Java\jdk1.8.0_191\
编辑Path添加%JAVA_HOME%\bin

新建系统环境变量CLASSPATH,
变量值为.;%Java_Home%\bin;%Java_Home%\lib\dt.jar;%Java_Home%\lib\tools.jar

APOC是基于Neo4j的一个Java存储过程包

2、启动
在命令行中输入
neo4j.bat console
输入命令:neo4j,系统会返回关于neo4j 运行命令的相关指令,通过使用“neo4j <指令名>”的格式就可以运行相关操作了,其中的指令名包括:
neo4j stop
neo4j restart

console:打开Neo4j的控制台。
start:启动Neo4j。
stop:关闭Neo4j。
restart:重启Neo4j。
status:查看Neo4j运行状态。
install-service:安装Neo4j在Windows系统上的服务。
uninstall-service:卸载Neo4j在Windows系统上的服务。


4、访问
端口
允许通过端口Bolt7687,HTTP7474和HTTPS7473访问本机。
在浏览器地址栏里输入http://localhost:7474
默认会跳转到 http://localhost:7474/browser
初始用户名密码:neo4j
bolt://localhost:7687

http://192.168.8.248:7474        
bolt://192.168.8.248:7687
neo4j
huajuntec4j
D:\apache-maven-3.3.9\conf\settings.xml
D:\apache-maven-3.3.9\repository
http://127.0.0.1:12012


5、理论原理
Traversal
在Cypher中,关系分为三种:符号“--”,表示有关系,忽略关系的类型和方向;
符号“-->”和“<--”,表示有方向的关系
Neo4j中不存在表的概念,只有两类:
节点(Node)和关联(Relation),
可以简单理解为图里面的点和边。
在数据查询中,节点一般用小括号(),关联用中括号[]。
当然也隐含路径的概念,是用节点和关联表示的,如:
(a)-[r]->(b),表示一条从节点a经关联r到节点b的路径。
节点用小括号“()”来表示,关系用中括号“[]”来表
示,而属性用大括号“{}”来表
() 表示节点
[] 表示关系
{} 表示节点的属性,每个属性通过key:value的形式表示,多个属性之间用逗号隔开
节点
() 表示一个最简单的节点,没有标签和属性。
(:label1) 有一个标签的节点
(:label1:label2:label3) 有多个标签的节点
(:label1 {prop1:value1}) 有一个属性的节点
(:label1 {key1:value1,key2:value2}) 有一个标签和节点
(nodeName:label1 {key1:value1}) 这里可以给node起一个别名,但是,这只是一个别名,和节点本身无关,是一个变量,用于后续语句操作该节点,而不是节点的名字。
关系
-- 无向关系
<--、--> 有向关系
-[:type]-> 表示一个类型为type的关系
-[:type {key1:value1,key2:value2}] 关系也可以有一个或多个属性。
-[rel:type {key1:value1,key2:value2}] 同节点,这里rel只是关系的一个别名而已。
创建关系时必须有方向,关系也必须有且只有一个类型。
5、系列教程
https://www.cnblogs.com/ljhdo/p/5521577.html
https://www.cnblogs.com/hwaggLee/p/5950173.htmlml
https://www.cnblogs.com/wenruo/p/7850120.html
https://www.cnblogs.com/justcooooode/p/8179202.html
https://www.cnblogs.com/qindongliang/p/6055285.html

6、关系
https://blog.csdn.net/qq_45503600/article/details/99412349
https://blog.csdn.net/u014365133/article/details/101615152
https://blog.csdn.net/u014365133/article/details/101642752
https://blog.csdn.net/hwz2311245/article/details/54602706


7、应用场景
https://www.jianshu.com/p/44abffe7e204
https://www.percent.cn/Product/znwbfxxt.html
http://nimblex.cn/index.php?a=shows&catid=15&id=99
http://www.sinodt.net/product/showproduct.php?id=12&bd_vid=8515503733237905888
百分比
https://www.jianshu.com/p/d5a9fd4c39bd
https://www.bsia.org.cn/site/content/6306.html
https://www.bilibili.com/video/BV1Bi4y1778E/
https://www.bilibili.com/video/BV13y4y1z78e/?spm_id_from=333.788.videocard.3
大数据产品:渊海知识图谱产品演示视频(字幕版
https://www.bilibili.com/video/BV1qg4y1i7Ur/?spm_id_from=333.788.videocard.10
金融投资知识图谱
https://www.bilibili.com/video/BV17g4y1v76L/?spm_id_from=333.788.videocard.8
http://dingzhitupu.com/
星环科技知识图谱全场景解决方案
https://www.bilibili.com/video/BV1of4y1m76o/?spm_id_from=333.788.videocard.4

市安科院:构建风险-隐患-事故知识图谱推进城市安全一体化主动防控体系建设
http://yjglj.beijing.gov.cn/art/2020/7/15/art_6058_640686.html

广东省安全生产科学技术研究院基于知识图谱技术的危险化学品安全生产突发事故应急决策系统开发服务项目采购公示
http://yjgl.gd.gov.cn/gkmlpt/content/2/2994/post_2994383.html?jump=false#2476
https://www.hisense-transtech.com.cn/Smart_City/Solution/1076.html
http://bas.qianjia.com/html/2020-02/20_361059.html

应急救援知识图谱项目
http://www.nimblex.cn/index.php?a=shows&catid=17&id=98
https://www.percent.cn/Solution/yj.html
应急智能搜索知识服务系统
http://www.bywin.cn/solution/yjgl.htm
http://www.disttime.com/article/150/7.html
https://www.cnblogs.com/hadoopdev/archive/2004/01/13/10064611.html


8、定制化知识图谱 项目介绍
http://neo4j.com.cn/topic/5f153a49a4477ec754d2b4ea
http://dingzhitupu.com/
http://neo4j.com.cn/topic/5e43d6ef5d35814e52e2d25d
http://neo4j.com.cn/topic/5d0338a967894c2541913b93
http://neo4j.com.cn/getstart
基于电影知识图谱的智能问答系统
https://blog.csdn.net/appleyk/article/details/80422055


9、开发记录
https://www.huaweicloud.com/product/nlpkg.html
http://192.168.8.248:7474
bolt://192.168.8.248:7687

http://192.168.8.202:7474
bolt://192.168.8.202:7687
neo4j://192.168.8.202:7687
neo4j
huajuntec4j

netstat -aon|findstr "8080"
tasklist|findstr "1724"
taskkill /f /t /im javaw.exe


http://127.0.0.1:8080


10、清空数据库
https://www.cnblogs.com/jpfss/p/11578903.html


11、关系neo4j @Relationship 理解
在哪个类里定义,看关系类型,举例如下人员和电影
在人员类里定义OUTGOING关系,则从人员指向电影
    @Relationship(type = "ACTED_IN", direction = Relationship.OUTGOING)
    public Set<Movie> actors;

    public void addActor(Movie movie) {
        if (actors == null) {
            actors = new HashSet<>();
        }
        actors.add(movie);
    }
@Relationship(type = "DIRECTED", direction = Relationship.OUTGOING)
    public Set<Movie> directors;

    public void addDirector(Movie movie) {
        if (directors == null) {
            directors = new HashSet<>();
        }
        directors.add(movie);
    }

在人员类里定义INCOMING关系,则从电影指向人员
  @Relationship(type = "ACTED_IN", direction = Relationship.INCOMING)
    public Set<Movie> actors;

    public void addActor(Movie movie) {
        if (actors == null) {
            actors = new HashSet<>();
        }
        actors.add(movie);
    }
 @Relationship(type = "DIRECTED", direction = Relationship.INCOMING)
    public Set<Movie> directors;

    public void addDirector(Movie movie) {
        if (directors == null) {
            directors = new HashSet<>();
        }
        directors.add(movie);
    }



12、重要参考
https://github.com/Cpaulyz/CO-IN
https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#reference            很重要
https://neo4j.github.io/sdn-rx/current/#neo4j4.0supportsmultipledatabases-howcaniusethem   很重要
https://github.com/spring-projects/spring-data-neo4j
https://spring.io/guides/gs/accessing-data-neo4j/
https://spring.io/guides/gs/accessing-neo4j-data-rest/
https://neo4j-contrib.github.io/
https://blog.csdn.net/qq_43544596/article/details/105386179
https://www.jianshu.com/p/5cef9f723f73
https://developer.aliyun.com/article/724964
https://www.tutorialspoint.com/neo4j/neo4j_spring_data_example.htm
http://www.systonsoft.com/article/400876.html                 vue GraphVis关系图谱 vue使用GraphVis开发无限拓展的关系图谱的实现
https://www.cnblogs.com/zaijin-yang/p/15094290.html
https://www.cnblogs.com/bookc/p/9914132.html
https://www.cnblogs.com/bookc/p/9952111.html
https://www.techwasti.com/neo4j-spring-data-reactive-crud-example/
https://spring.io/guides/gs/accessing-data-neo4j/
https://github.com/spring-guides/gs-accessing-data-neo4j
https://blog.csdn.net/qq_33257527/article/details/109710057
https://gitee.com/dalaoyang/springboot_learn/tree/master/springboot2_neo4j
https://www.jianshu.com/p/ad85adf4dd3e
https://developer.aliyun.com/article/763361   扫描
https://www.codenong.com/cs106122514/    SpringBoot整合Neo4j(SpringBoot+Mybatis+Druid+Neo4j)
https://github.com/JavaLionLi/RuoYi-Vue-Plus
https://www.baeldung.com/spring-data-neo4j-intro
https://www.plantdata.cn/portal/home
https://api.9idudu.com/mf/detail?aid=3a7d6vuw&mid=2abbd1754a3ff5b2:1204013&ct=NEWS&tk=3a7d6vuw&cid=d7f3f71f9b0b4717a0b2c28ae1ce829e&origin=nonList&userId=7b326c435b3042a78e330a1a23cadc20ae23c869
https://www.huaweicloud.com/product/nlpkg.html
https://support.huaweicloud.com/qs-kg/kg_05_0002.html
https://gitee.com/MiraculousWarmHeart
https://cloud.tencent.com/developer/article/1523866
https://github.com/ownthink/KnowledgeGraphData
https://mediacenter.ibm.com/media/%E7%9F%A5%E8%AF%86%E5%9B%BE%E8%B0%B1%E5%8A%A0%E9%80%9F%E5%B9%B3%E5%8F%B0+%28IKE%29/0_0bp1nrhr/98864382
http://www.dataexa.com/product/sati
http://www.dataexa.com/product/insight
https://xiaotiandi.github.io/publicBlog/2018-10-09-436b4d47.html


ReactiveNeo4jRepository
CrudRepository
PagingAndSortingRepository
epositoryCrudRepositoryPagingAndSortingRepository@RepositoryDefinitionCrudRepositoryCrudRepository
interface UserRepository extends CrudRepository<User, Long>, CustomizedUserRepository {
GraphRepository
  // Declare query methods here
}
Neo4jTemplateReactiveNeo4jTemplate



13、neo4j-apoc
org.neo4j.driver.v1.exceptions.ClientException: There is no procedure with the name `apoc.create.node` registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed
https://www.cnblogs.com/wangymd/p/11271365.html
https://github.com/neo4j-contrib/neo4j-apoc-procedures
https://neo4j.com/developer/neo4j-apoc/
https://weikeqin.com/2018/04/17/neo4j-apoc-use/
return apoc.version()

 

posted @ 2021-09-08 14:18  DarJeely  阅读(345)  评论(0编辑  收藏  举报