CN108959584A - A kind of method and device of the processing diagram data based on community structure - Google Patents

A kind of method and device of the processing diagram data based on community structure Download PDF

Info

Publication number
CN108959584A
CN108959584A CN201810744938.2A CN201810744938A CN108959584A CN 108959584 A CN108959584 A CN 108959584A CN 201810744938 A CN201810744938 A CN 201810744938A CN 108959584 A CN108959584 A CN 108959584A
Authority
CN
China
Prior art keywords
community
diagram data
node
attribute
processing
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.)
Granted
Application number
CN201810744938.2A
Other languages
Chinese (zh)
Other versions
CN108959584B (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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN201810744938.2A priority Critical patent/CN108959584B/en
Publication of CN108959584A publication Critical patent/CN108959584A/en
Application granted granted Critical
Publication of CN108959584B publication Critical patent/CN108959584B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the present invention provides a kind of method and device of processing diagram data based on community structure, which comprises obtains the process instruction of diagram data;The process instruction is that the language of chart database system of the foundation based on community structure is write;According to the incidence relation pre-established determine the diagram data belonging to target community;Wherein, the incidence relation is default diagram data and the intercommunal subordinate relation belonging to it;The process instruction is parsed, the movement of the processing based on the target community is done to the diagram data according to parsing result.Described device executes the above method.The method and device of processing diagram data provided in an embodiment of the present invention based on community structure, by obtaining the process instruction write according to the language of the chart database system based on community structure, determine target community belonging to diagram data, processing based on target community movement is done to the parsing result of process instruction, can be improved the efficiency to diagram data processing.

Description

A kind of method and device of the processing diagram data based on community structure
Technical field
The present embodiments relate to diagram data processing technology fields, and in particular to a kind of processing figure number based on community structure According to method and device.
Background technique
User writes process instruction according to the language of chart database system, and the data in database are managed and are made With.A kind of important attribute of the community as diagram data, can reflect aggregation situation and the correlation degree between data.Based on community structure Chart database system community according to belonging to node storage and management are carried out to diagram data, to promote processing to diagram data Efficiency.
The prior art writes language as the instruction of chart database system using Cypher etc..Cypher is Neo4j data Query language on library, user can be used Cypher and operate to the data stored in Neo4j.But due to Cypher Communities' relevant informations such as the affiliated community of diagram data can not be obtained, so that it is relatively low to the efficiency of diagram data processing, such as: it does not prop up It holds user and carries out relevant calculation in some community.
Therefore, how to avoid drawbacks described above, thus improve processing diagram data efficiency, become one need solve ask Topic.
Summary of the invention
In view of the problems of the existing technology, the embodiment of the present invention provides a kind of processing diagram data based on community structure Method and device.
In a first aspect, the embodiment of the present invention provides a kind of method of processing diagram data based on community structure, the method Include:
Obtain the process instruction of diagram data;The process instruction is the language according to the chart database system based on community structure What speech was write;
According to the incidence relation pre-established determine the diagram data belonging to target community;Wherein, the incidence relation To preset diagram data and the intercommunal subordinate relation belonging to it;
The process instruction is parsed, it is dynamic to do the processing based on the target community to the diagram data according to parsing result Make.
Second aspect, the embodiment of the present invention provide a kind of device of processing diagram data based on community structure, described device Include:
Acquiring unit, for obtaining the process instruction of diagram data;The process instruction is according to the figure based on community structure What the language of Database Systems was write;
Determination unit, for according to the incidence relation pre-established determine the diagram data belonging to target community;Wherein, The incidence relation is default diagram data and the intercommunal subordinate relation belonging to it;
Processing unit does based on the target diagram data according to parsing result for parsing the process instruction The processing of community acts.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, comprising: processor, memory and bus, wherein
The processor and the memory complete mutual communication by the bus;
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to refer to Order is able to carry out following method:
Obtain the process instruction of diagram data;The process instruction is the language according to the chart database system based on community structure What speech was write;
According to the incidence relation pre-established determine the diagram data belonging to target community;Wherein, the incidence relation To preset diagram data and the intercommunal subordinate relation belonging to it;
The process instruction is parsed, it is dynamic to do the processing based on the target community to the diagram data according to parsing result Make.
Fourth aspect, the embodiment of the present invention provide a kind of non-transient computer readable storage medium, comprising:
The non-transient computer readable storage medium stores computer instruction, and the computer instruction makes the computer Execute following method:
Obtain the process instruction of diagram data;The process instruction is the language according to the chart database system based on community structure What speech was write;
According to the incidence relation pre-established determine the diagram data belonging to target community;Wherein, the incidence relation To preset diagram data and the intercommunal subordinate relation belonging to it;
The process instruction is parsed, it is dynamic to do the processing based on the target community to the diagram data according to parsing result Make.
The method and device of processing diagram data provided in an embodiment of the present invention based on community structure, by obtaining according to base In the process instruction that the language of the chart database system of community structure is write, target community belonging to diagram data is determined, it is right The parsing result of process instruction does the movement of the processing based on target community, can be improved the efficiency to diagram data processing.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to do a simple introduction, it should be apparent that, the accompanying drawings in the following description is this hair Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the method flow schematic diagram of processing diagram data of the embodiment of the present invention based on community structure;
Fig. 2 is the apparatus structure schematic diagram of processing diagram data of the embodiment of the present invention based on community structure;
Fig. 3 is electronic equipment entity structure schematic diagram provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, the technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Fig. 1 is the method flow schematic diagram of processing diagram data of the embodiment of the present invention based on community structure, as shown in Figure 1, A kind of method of processing diagram data based on community structure provided in an embodiment of the present invention, comprising the following steps:
S101: the process instruction of diagram data is obtained;The process instruction is according to the chart database system based on community structure What the language of system was write.
Specifically, device obtains the process instruction of diagram data;The process instruction is according to the figure number based on community structure It is write according to the language of library system.The language can be used for: indicate that node attribute, side attribute and the community of the community belong to Property.Each node can indicate each of social networks, be connected between node by side, indicate the connection between everyone, The connection may include the connection carried out using social tool, there are connection of personal attribute of genetic connection etc. etc., communities It can be and node is drawn according to the attribute information (may include name, gender, age, the educational background etc. of people) that node corresponds to people Get.Node attribute may include node build-in attribute, and the node build-in attribute may include node types, node ID, node degree and node betweenness center degree;Node attribute can also include user-defined attribute.The side attribute can wrap Include side build-in attribute, the type when build-in attribute may include, side ID;Side attribute can also include user-defined category Property.The community attributes may include community ID, community's capacity;Community's capacity can be understood as the number of node in community Amount.
S102: according to the incidence relation pre-established determine the diagram data belonging to target community;Wherein, the association Relationship is default diagram data and the intercommunal subordinate relation belonging to it.
Specifically, device according to the incidence relation pre-established determine the diagram data belonging to target community;Wherein, institute Stating incidence relation is default diagram data and the intercommunal subordinate relation belonging to it.It is illustrated below: if in diagram data Ode table is leted others have a look at, and the association attributes of node are the sports items of corresponding people's favorite, two associated when indicating between node The corresponding people of node has the sports items of identical favorite.Community discovery is carried out on default diagram data, it is assumed that obtains four societies The sports items that favorite is separately included in area A, B, C, D are the people of basketball, football, table tennis and shuttlecock.Then when determination will be into Row processing be the sports items of favorite be people's corresponding diagram data of basketball when, corresponding data processing is only needed in community A Middle progress, without being carried out in all data (all data that tetra- communities A, B, C, D include), so as to improve data The efficiency of processing.
S103: parsing the process instruction, does the place based on the target community to the diagram data according to parsing result Reason movement.
Specifically, device parses the process instruction, is done the diagram data based on the target society according to parsing result The processing in area acts.It may further include and do maintenance and/or inquiry calculating based on the target community to the diagram data. Wherein, maintenance can also be more specifically: insertion, deletion based on the target community are done to the node of the diagram data.Inquiry Calculating can also be more specifically: carry out inquiry calculating to default query term by parameter preset in default query context.Wherein, Be included in the target community in the default query context carry out inquiry calculating, the default query term includes the target Node in community, community belonging to node to be checked can also be inquired including such as subgraph match, be not especially limited.
Specific and comprehensive explanation is done below:
(1) predefined part
Some constants are defined first:
The value of INT_VALUE:=integer type
The value of STRING_VALUE:=character string type
The value of DOUBLE_VALUE:=float
ANY_VALUE:=INT_VALUE | STRING_VALUE | DOUBLE_VALUE
Value_List:=ANY_VALUE | ANY_VALUE, Value_List
Some attribute-name of ANY_ATTRIBUTE:=existing object
OP:=>|<|>=|≤|=|!=
LOGIC_OP:=AND | OR
For node, its some attribute is indicated with Node.ANY_ATTRIBUTE;For side, its some attribute is used Edge.ANY_ATTRIBUTE is indicated;For community, its some attribute is indicated with Community.ANY_ATTRIBUTE.
In language the relevant attribute of node include node build-in attribute and user-defined attribute.The build-in attribute of node Including type, ID, degree and betweenness center degree.Equally there are build-in attribute and user-defined attribute, the build-in attribute packet on side in side Include while type, while ID.Community only has build-in attribute without user-defined attribute, its build-in attribute includes community The quantity of node in ID and community.Definition is as follows:
Any attribute name in the attribute list of InputNodeAttr:=Node.+ user's input
Any attribute name in the attribute list of InputEdgeAttr:=Edge.+ user's input
NodeAttr:=Node.Type | Node.ID | Node.Degree | Node.Betweenness | InputNodeAttr
CommunityAttr:=Community.Id | Community.Size
EdgeAttr:=Edge.Type | Edge.Id | InputEdgeAttr
Wherein InputNodeAttr, that is, user-defined node attribute, InputEdgeAttr are that user-defined side belongs to Property.
(2) maintenance of node and side
The maintenance of node and side, the modification of insertion, deletion and their attribute including node and side.
1, the insertion of node
The insertion process of node needs ID, type and the relevant attribute of given node, and in addition to this, user can determine This adopted node belongs to which or which community, and definition is as follows:
CommunityMatch:=CommunityAttr LOGIC_OP ANY_VALUE
CommunityMatchList:=CommunityMatch | CommunityMatch LOGIC_OP CommunityMatchList
NodeCommunityInsertSetter:=| into CommunityMatchList
NodeId:=INT_VALUE
NodeTypeId:=INT_VALUE
NodeAttrValueList:=NodeId | NodeId, Value_List
InsertNodeStmt:=insert NodeCommunityInsertSetter values NodeTypeId (NodeAttrValueList)
InsertNodeStmt corresponding is the sentence for being inserted into node.Insert is keyword. Community's relevant information of the node of the corresponding insertion of NodeCommunityInsertSetter, value can be sky, that is, indicate not people Work specifies the affiliated community of node, and value is also possible to a CommunityMatchList, to give relevant community information.
CommunityMatchList works as given a series of communities for meeting the condition that CommunityMatch is provided Preceding node will be considered to belong to these communities.
NodeAttrValueList, that is, node attribute list, wherein the first item of attribute list can be node ID, subsequent can be sky, can also provide attribute value by user oneself.
2, the deletion of node
In the cancel statement of node, user provides the association attributes and condition of the node to be deleted, is sieved according to condition The deletion of several nodes is carried out after choosing.Specific definition is as follows:
NodeMatch:=NodeAttr LOGIC_OP ANY_VALUE
NodeMatchList:=NodeMatch | NodeMatch LOGIC_OP NodeMatchList
NodeWhereStmt:=where NodeMatchList
NodeWhereStmtList:=NodeWhereStmt | NodeWhereStmt NodeWhereStmtList
NodeCommunityDeleteSetter:=| from CommunityMatchList
DeleteNodeStmt:=delete from CommunityMatchList | delete NodeCommunityDeleteSetter NodeWhereStmtList
DeleteNodeStmt corresponding is the sentence for deleting node, and delete is keyword.It has the subordinate clause containing where With the totally two kinds of deletion modes for being free of where subordinate clause.For being free of the deletion mode of where subordinate clause, deletion is particular community In all nodes.CommunityMatchList gives a community lists, which, which will be deleted in list, owns Node in community.Deletion for the subordinate clause containing where, can there is from subordinate clause, can also not have from subordinate clause, i.e. community's item Part is optional.NodeWhereStmtList subordinate clause corresponds to where subordinate clause, and subordinate clause gives the screening conditions of node, if not having From subordinate clause deletes all nodes for meeting screening conditions from figure;If there is from subordinate clause, from the corresponding community of from subordinate clause All nodes for meeting screening conditions are deleted in the community that list summarizes.
3, the insertion on side
User to carry out side insertion, then need to provide while starting point, terminal, type, while ID and association attributes.Its In, while ID be by while the ID of starting point, " _ " and side terminal the character string that constitutes of ID.If can be once inserted into figure A side is done, is separated between side with ", ".Definition is as follows:
Edge_Start_Id:=INT_VALUE
Edge_End_Id:=INT_VALUE
Edge_Type_Id:=INT_VALUE
Edge_Id:=STRING_VALUE
EdgeAttrValueList:=Edge_Id | Edge_Id, Value_List
EdgeWithValueStmt:=(Edge_Start_Id, Edge_End_Id, Edge_Type_Id) values (EdgeAttrValueList)
EdgeWithValueStmtList:=EdgeWithValueStmt | EdgeWithValueStmt, EdgeWithValueStmtList
InsertEdgeStmt:=insert edges EdgeWithValueStmtList
InsertEdgeStmt corresponding is the sentence for being inserted into side, and insert and edges are both keywords. The information list on EdgeWithValueStmtList corresponding insertion side, may include the information of multiple summits EdgeWithValueStmt.The information EdgeWithValueStmt of each edge is made up of: (the starting point comprising side information ID, terminal ID, side type ID) triple, values keyword, left bracket, attribute list, right parenthesis.Wherein, the attribute column on side First attribute of table must be the ID on side, behind can be used user oneself setting attribute.
4, the deletion on side
User will carry out the deletion on side, need to provide starting point, terminal and the type information on side, can once delete from figure Several sides are separated with ", " between side.Definition is as follows:
EdgeStmt:=(Edge_Start_Id, Edge_End_Id, Edge_Type_Id)
EdgeStmtList:=EdgeStmt | EdgeStmt, EdgeStmtList
DeleteEdgeStmt:=delete edges EdgeStmtList
DeleteEdgeStmt corresponding is the sentence for deleting side, and delete and edges are both keywords. EdgeStmtList is side information list, may include the information EdgeStmt of multiple summits.The information EdgeStmt of each edge is One (the starting point ID on side, terminal ID, the type ID on side) triple.
5, the modification of node and the attribute on side
Node and the attribute on side are stored in relevant database, therefore, can be with to the modification of the attribute of node and side It is realized by using the SQL statement of relevant database.Definition are as follows:
UpdateAttrStmt:=ATTR SQL_Stmt
Wherein, ATTR is keyword, and SQL_Stmt is the SQL statement for modifying the attribute of corresponding node and side.In the sentence Under, SQL statement can be sent to the modification that attribute data is carried out in relevant database by the interface that relevant database provides.
6, it inquires and calculates
User passes through language given query and the method name of calculating, parameter, scope, result arrangement mode.It is defined Formula is as follows:
QueryMethods:=getOneHopNeighbours | getTwoHopNeighbours | canReach | getCommunity|getNodesSortByDegree|getNodeInCommunity|getNeighbours| getBetweenness|getAllNodes|getInNeighbours|getNodeType|getSubgraphMatch
EdgeMatch:=EdgeAttr LOGIC_OP ANY_VALUE
EdgeMatchList:=EdgeMatch | EdgeMatch LOGIC_OP EdgeMatchList
ConstValueMatch:=constvalue=ANY_VALUE
FromAllMatch:=CommunityMatch | NodeMatch | EdgeMatch
FromAllMatchList:=FromAllMatch | FromAllMatch LOGIC_OP FromAllMatchList
WhereAllMatch:=CommunityMatch | NodeMatch | EdgeMatch | ConstValueMatch
WhereAllMatchList:=WhereAllMatch | WhereAllMatch LOGIC_OP WhereAllMatchList
FromConditions:=| from FromAllMatchList
WhereCondition:=where WhereAllMatchList
WhereConditionList:=WhereCondition | WhereCondtion, WhereConditionList
OrderMethod:=| ASC | DESC
OrderStmt:=| Order By NodeAttr OrderMethod
QueryStmt:=select QueryMethods FromConditions WhereConditionList OrderStmt
Wherein QueryStmt inquires corresponding sentence.Select is keyword.QueryMethods expression to be carried out The title of inquiry and the title calculated, available inquiry and calculating includes two jumps inquired a hop neighbor of node, inquire node Neighbours judge accessibility between node, the affiliated community of inquiry node, node are sorted by degree and is exported, inquires community Zhong Bao The node contained, the betweenness center degree for inquiring node, type, the calculating subgraph match of inquiring node etc..FromConditions table Show the range of inquiry, if FromConditions is sky, then it represents that it inquires and calculates in all data, otherwise, by The range that FromAllMatchList sentence provides inquiry and calculates.CommunityMatch be given in which community inquiry and It calculates, NodeMatch provides the domain of node, and EdgeMatch provides inquired and calculated using which side, these ranges Between can be handed over and be operated by logical operator.WhereConditionList sentence provides inquiry and calculates needed for function Parameter list.It include several parameters in WhereConditionList, each parameter is indicated with a WhereCondition, The value of the direct given parameters of constvalue keyword can be used in each WhereCondition, can also be by such as Three kinds of Match mode given ranges of FromAllMatch then calculate and traverse the combination that each parameter is optionally worth in range, Obtain multiple groups inquiry or calculated result.OrderStmt gives the sortord of result, then indicates not sort for sky.If OrderStmt is not sky, then the attribute NodeAttr and collating sequence of sort by are given by Order By keyword OrderMethod.OrderMethod is specified to sort query result by ascending or descending order, defaults when OrderMethod is empty It is sorted in ascending order.
The method of processing diagram data provided in an embodiment of the present invention based on community structure, by obtaining according to based on community The process instruction that the language of the chart database system of structure is write, determines target community belonging to diagram data, refers to processing The parsing result of order does the movement of the processing based on target community, can be improved the efficiency to diagram data processing.
On the basis of the above embodiments, the content write includes:
The community attributes of node attribute, side attribute and the community.
Specifically, the content to be write in device includes the community attributes of node attribute, side attribute and the community.It is right The content to be write is not especially limited.It can refer to above-described embodiment, repeat no more.
The method of processing diagram data provided in an embodiment of the present invention based on community structure, by writing node attribute, side Attribute and the corresponding sentence of the community attributes of community, enable the language to support the relevant calculation based on community structure, thus It can be improved the efficiency to diagram data processing.
On the basis of the above embodiments, the node attribute includes node build-in attribute, the node build-in attribute packet Include node types, node ID, node degree and node betweenness center degree;The side attribute includes side build-in attribute, and the side is solid Have attribute include while type, while ID;The community attributes include community ID, community's capacity;Community's capacity is that community holds Receive the upper limit of the number of node.
Specifically, the node attribute in device includes node build-in attribute, and the node build-in attribute includes node Type, node ID, node degree and node betweenness center degree;The side attribute includes side build-in attribute, the side build-in attribute Including while type, while ID;The community attributes include community ID, community's capacity;Community's capacity is that community accommodates node The upper limit of the number.It can refer to above-described embodiment, repeat no more.
The method of processing diagram data provided in an embodiment of the present invention based on community structure, by determining specific knot respectively Point attribute, side attribute and community attributes, can effectively manage diagram data.
On the basis of the above embodiments, described that the diagram data is done based on the target community according to parsing result Processing movement, comprising:
Maintenance and/or inquiry calculating based on the target community are done to the diagram data.
Specifically, device does maintenance and/or inquiry calculating based on the target community to the diagram data.It can refer to Embodiment is stated, is repeated no more.
The method of processing diagram data provided in an embodiment of the present invention based on community structure, by doing diagram data based on mesh The maintenance and/or inquiry for marking community calculate, and are further able to improve the efficiency to diagram data processing.
It is on the basis of the above embodiments, described that the maintenance based on the target community is done to the diagram data, comprising:
Insertion and deletion based on the target community are done to the node of the diagram data.
Specifically, device does insertion and deletion based on the target community to the node of the diagram data.It can refer to Embodiment is stated, is repeated no more.
The method of processing diagram data provided in an embodiment of the present invention based on community structure, by being based on respectively to node The insertion of target community is deleted, and can be improved the efficiency to diagram data maintenance.
On the basis of the above embodiments, described that the calculating of the inquiry based on the target community, packet are done to the diagram data It includes:
Inquiry calculating is carried out to default query term by parameter preset in default query context.
Specifically, device carries out inquiry calculating to default query term by parameter preset in default query context;Wherein, Be included in the target community in the default query context carry out inquiry calculating, the default query term includes the target Node in community, community belonging to node to be checked.It can refer to above-described embodiment, repeat no more.
The method of processing diagram data provided in an embodiment of the present invention based on community structure, by default query context Inquiry calculating is carried out to default query term by parameter preset, can be improved the efficiency calculated diagram data inquiry.
Fig. 2 is the apparatus structure schematic diagram of processing diagram data of the embodiment of the present invention based on community structure, as shown in Fig. 2, The device for the processing diagram data that the embodiment of the invention provides a kind of based on community structure, including acquiring unit 201, determination unit 202 and processing unit 203, in which:
Acquiring unit 201 is used to obtain the process instruction of diagram data;The process instruction is according to based on community structure What the language of chart database system was write;Determination unit 202 is used to determine the figure according to the incidence relation pre-established Target community belonging to data;Wherein, the incidence relation is default diagram data and the intercommunal subordinate relation belonging to it; Processing unit 203 does based on the target community diagram data according to parsing result for parsing the process instruction Processing movement.
Specifically, acquiring unit 201 is used to obtain the process instruction of diagram data;The process instruction is according to based on community What the language of the chart database system of structure was write;Determination unit 202 is used to be determined according to the incidence relation pre-established Target community belonging to the diagram data;Wherein, the incidence relation be default diagram data and belonging to it is intercommunal from Category relationship;Processing unit 203 does based on the target diagram data according to parsing result for parsing the process instruction The processing of community acts.
The device of processing diagram data provided in an embodiment of the present invention based on community structure, by obtaining according to based on community The process instruction that the language of the chart database system of structure is write, determines target community belonging to diagram data, refers to processing The parsing result of order does the movement of the processing based on target community, can be improved the efficiency to diagram data processing.
The device of processing diagram data provided in an embodiment of the present invention based on community structure specifically can be used for executing above-mentioned The process flow of each method embodiment, details are not described herein for function, is referred to the detailed description of above method embodiment.
Fig. 3 is electronic equipment entity structure schematic diagram provided in an embodiment of the present invention, as shown in figure 3, the electronic equipment It include: processor (processor) 301, memory (memory) 302 and bus 303;
Wherein, the processor 301, memory 302 complete mutual communication by bus 303;
The processor 301 is used to call the program instruction in the memory 302, to execute above-mentioned each method embodiment Provided method, for example, obtain the process instruction of diagram data;The process instruction is according to the figure based on community structure What the language of Database Systems was write;According to the incidence relation pre-established determine the diagram data belonging to target society Area;Wherein, the incidence relation is default diagram data and the intercommunal subordinate relation belonging to it;The processing is parsed to refer to It enables, the movement of the processing based on the target community is done to the diagram data according to parsing result.
The present embodiment discloses a kind of computer program product, and the computer program product includes being stored in non-transient calculating Computer program on machine readable storage medium storing program for executing, the computer program include program instruction, when described program instruction is calculated When machine executes, computer is able to carry out method provided by above-mentioned each method embodiment, for example, obtains the processing of diagram data Instruction;The process instruction is that the language of chart database system of the foundation based on community structure is write;According to building in advance Vertical incidence relation determines target community belonging to the diagram data;Wherein, the incidence relation is default diagram data and its institute The intercommunal subordinate relation belonged to;The process instruction is parsed, the diagram data is done based on the mesh according to parsing result Mark the processing movement of community.
The present embodiment provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage medium Computer instruction is stored, the computer instruction makes the computer execute method provided by above-mentioned each method embodiment, example It such as include: the process instruction for obtaining diagram data;The process instruction is the language according to the chart database system based on community structure What speech was write;According to the incidence relation pre-established determine the diagram data belonging to target community;Wherein, the association Relationship is default diagram data and the intercommunal subordinate relation belonging to it;The process instruction is parsed, according to parsing result pair The diagram data does the movement of the processing based on the target community.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light The various media that can store program code such as disk.
The embodiments such as electronic equipment described above are only schematical, wherein it is described as illustrated by the separation member Unit may or may not be physically separated, and component shown as a unit may or may not be object Manage unit, it can it is in one place, or may be distributed over multiple network units.It can select according to the actual needs Some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying wound In the case where the labour for the property made, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation Method described in certain parts of example or embodiment.
Finally, it should be noted that the above various embodiments is only to illustrate the technical solution of the embodiment of the present invention, rather than it is right It is limited;Although the embodiment of the present invention is described in detail referring to foregoing embodiments, the ordinary skill of this field Personnel are it is understood that it is still possible to modify the technical solutions described in the foregoing embodiments, or to part Or all technical features are equivalently replaced;And these are modified or replaceed, it does not separate the essence of the corresponding technical solution The range of various embodiments of the present invention technical solution.

Claims (9)

1. a kind of method of the processing diagram data based on community structure characterized by comprising
Obtain the process instruction of diagram data;The process instruction be according to the chart database system based on community structure language into What row was write;
According to the incidence relation pre-established determine the diagram data belonging to target community;Wherein, the incidence relation is pre- If diagram data and the intercommunal subordinate relation belonging to it;
The process instruction is parsed, the movement of the processing based on the target community is done to the diagram data according to parsing result.
2. the method according to claim 1, wherein the content write includes:
The community attributes of node attribute, side attribute and the community.
3. according to the method described in claim 2, it is characterized in that, the node attribute includes node build-in attribute, the knot Point build-in attribute includes node types, node ID, node degree and node betweenness center degree;
The side attribute includes side build-in attribute, the type when build-in attribute includes, side ID;
The community attributes include community ID, community's capacity;Community's capacity is the node quantity in community.
4. method according to any one of claims 1 to 3, which is characterized in that it is described according to parsing result to the diagram data Do the processing movement based on the target community, comprising:
Maintenance and/or inquiry calculating based on the target community are done to the diagram data.
5. according to the method described in claim 4, it is characterized in that, described do based on the target community diagram data Maintenance, comprising:
Insertion, deletion based on the target community are done to the node of the diagram data.
6. according to the method described in claim 4, it is characterized in that, described do based on the target community diagram data Inquiry calculates, comprising:
Inquiry calculating is carried out to default query term by parameter preset in default query context;Wherein, the default inquiry model Include in enclosing inquiry calculating is carried out in the target community, the default query term include node in the target community, Community belonging to node to be checked.
7. a kind of device of the processing diagram data based on community structure characterized by comprising
Acquiring unit, for obtaining the process instruction of diagram data;The process instruction is according to the diagram data based on community structure What the language of library system was write;
Determination unit, for according to the incidence relation pre-established determine the diagram data belonging to target community;Wherein, described Incidence relation is default diagram data and the intercommunal subordinate relation belonging to it;
Processing unit does based on the target community diagram data according to parsing result for parsing the process instruction Processing movement.
8. a kind of electronic equipment characterized by comprising processor, memory and bus, wherein
The processor and the memory complete mutual communication by the bus;
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to instruct energy Enough methods executed as described in claim 1 to 6 is any.
9. a kind of non-transient computer readable storage medium, which is characterized in that the non-transient computer readable storage medium is deposited Computer instruction is stored up, the computer instruction makes the computer execute the method as described in claim 1 to 6 is any.
CN201810744938.2A 2018-07-09 2018-07-09 Community structure-based method and device for processing graph data Active CN108959584B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810744938.2A CN108959584B (en) 2018-07-09 2018-07-09 Community structure-based method and device for processing graph data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810744938.2A CN108959584B (en) 2018-07-09 2018-07-09 Community structure-based method and device for processing graph data

Publications (2)

Publication Number Publication Date
CN108959584A true CN108959584A (en) 2018-12-07
CN108959584B CN108959584B (en) 2023-02-10

Family

ID=64483563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810744938.2A Active CN108959584B (en) 2018-07-09 2018-07-09 Community structure-based method and device for processing graph data

Country Status (1)

Country Link
CN (1) CN108959584B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111353046A (en) * 2018-12-20 2020-06-30 杭州海康威视数字技术股份有限公司 Map data storage method and device, electronic equipment and readable storage medium
CN112000848A (en) * 2020-08-20 2020-11-27 南京智慧图谱信息技术有限公司 Graph data processing method and device, electronic equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006121575A2 (en) * 2005-05-10 2006-11-16 Alice Muntz Method and apparatus for distributed community finding
JP2009157864A (en) * 2007-12-28 2009-07-16 Nifty Corp System, method and program for supporting creation of community
US8005823B1 (en) * 2007-03-28 2011-08-23 Amazon Technologies, Inc. Community search optimization
CN102693246A (en) * 2011-03-22 2012-09-26 日电(中国)有限公司 Method and system for obtaining information from dataset
CN103166988A (en) * 2011-12-13 2013-06-19 深圳市腾讯计算机系统有限公司 Method and device for dividing user groups in social network site (SNS) community
CN104504003A (en) * 2014-12-09 2015-04-08 北京航空航天大学 Graph data searching method and device
CN105868313A (en) * 2016-03-25 2016-08-17 浙江大学 Mapping knowledge domain questioning and answering system and method based on template matching technique
CN105894387A (en) * 2016-04-01 2016-08-24 清华大学 Method of predicting behaviors of online social network users
CN106202184A (en) * 2016-06-27 2016-12-07 华中科技大学 A kind of books personalized recommendation method towards libraries of the universities and system
CN106446143A (en) * 2016-09-21 2017-02-22 四川长虹电器股份有限公司 Intelligent recommendation system and method based on graph structure matching
CN106528822A (en) * 2016-11-17 2017-03-22 山东合天智汇信息技术有限公司 Construction method of business relationship circle, query method and query system of business relationship circle
CN106776897A (en) * 2016-11-29 2017-05-31 中国农业银行股份有限公司 A kind of user's portrait label determines method and device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006121575A2 (en) * 2005-05-10 2006-11-16 Alice Muntz Method and apparatus for distributed community finding
US8005823B1 (en) * 2007-03-28 2011-08-23 Amazon Technologies, Inc. Community search optimization
JP2009157864A (en) * 2007-12-28 2009-07-16 Nifty Corp System, method and program for supporting creation of community
CN102693246A (en) * 2011-03-22 2012-09-26 日电(中国)有限公司 Method and system for obtaining information from dataset
CN103166988A (en) * 2011-12-13 2013-06-19 深圳市腾讯计算机系统有限公司 Method and device for dividing user groups in social network site (SNS) community
CN104504003A (en) * 2014-12-09 2015-04-08 北京航空航天大学 Graph data searching method and device
CN105868313A (en) * 2016-03-25 2016-08-17 浙江大学 Mapping knowledge domain questioning and answering system and method based on template matching technique
CN105894387A (en) * 2016-04-01 2016-08-24 清华大学 Method of predicting behaviors of online social network users
CN106202184A (en) * 2016-06-27 2016-12-07 华中科技大学 A kind of books personalized recommendation method towards libraries of the universities and system
CN106446143A (en) * 2016-09-21 2017-02-22 四川长虹电器股份有限公司 Intelligent recommendation system and method based on graph structure matching
CN106528822A (en) * 2016-11-17 2017-03-22 山东合天智汇信息技术有限公司 Construction method of business relationship circle, query method and query system of business relationship circle
CN106776897A (en) * 2016-11-29 2017-05-31 中国农业银行股份有限公司 A kind of user's portrait label determines method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
SHIMIN MIAO等: "Detecting overlapping community structure of complex networks in nature and society", 《2014 INTERNATIONAL CONFERENCE ON AUDIO, LANGUAGE AND IMAGE PROCESSING》 *
姜人和等: "一种基于UML关系的Java代码库构造方法", 《计算机科学》 *
张俍: "支持查询的大规模图数据无损压缩", 《中国博士学位论文全文数据库 (信息科技辑)》 *
王建孟: "基于数据社区的领域数据图信息发现算法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111353046A (en) * 2018-12-20 2020-06-30 杭州海康威视数字技术股份有限公司 Map data storage method and device, electronic equipment and readable storage medium
CN111353046B (en) * 2018-12-20 2023-05-26 杭州海康威视数字技术股份有限公司 Map data storage method, device, electronic equipment and readable storage medium
CN112000848A (en) * 2020-08-20 2020-11-27 南京智慧图谱信息技术有限公司 Graph data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108959584B (en) 2023-02-10

Similar Documents

Publication Publication Date Title
US7409401B2 (en) Method and system for supporting multivalue attributes in a database system
US10078802B2 (en) Method and system of discovering and analyzing structures of user groups in microblog
CN104794177B (en) A kind of date storage method and device
CN111008521B (en) Method, device and computer storage medium for generating wide table
CN108089893A (en) Definite method, apparatus, terminal device and the storage medium of redundant resource
CN106933837A (en) A kind of database table model and creation method
CN103561133A (en) IP address ownership information indexing and fast querying method
CN105630803B (en) The method and apparatus that Document image analysis establishes index
CN108388642A (en) A kind of subgraph query method, device and computer readable storage medium
CN114510611B (en) Method and device for constructing metadata blood relationship atlas and related equipment
US8015195B2 (en) Modifying entry names in directory server
CN105631749A (en) User portrait calculation method based on statistical data
CN103324701A (en) Data searching device and method
US10747786B2 (en) Spontaneous networking
CN109815238A (en) The dynamic adding method and device of database are realized with strict balanced binary tree
CN109885585A (en) Support the distributed data base system and method for storing process, trigger and view
CN103064908A (en) Method for rapidly removing repeated list through a memory
CN108959584A (en) A kind of method and device of the processing diagram data based on community structure
CN109033157B (en) Complex data retrieval method and system based on user-defined search condition tree
CN104199964A (en) Information processing method and information processing device
CN106250456A (en) Bid winning announcement extraction method and device
CN113704248A (en) Block chain query optimization method based on external index
US10235100B2 (en) Optimizing column based database table compression
CN113157904A (en) Sensitive word filtering method and system based on DFA algorithm
CN108345699A (en) Obtain the method, apparatus and storage medium of multi-medium data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant