CN107391533A - Generate the method and device of graphic data base Query Result - Google Patents

Generate the method and device of graphic data base Query Result Download PDF

Info

Publication number
CN107391533A
CN107391533A CN201710252223.0A CN201710252223A CN107391533A CN 107391533 A CN107391533 A CN 107391533A CN 201710252223 A CN201710252223 A CN 201710252223A CN 107391533 A CN107391533 A CN 107391533A
Authority
CN
China
Prior art keywords
type
summit
subgraph
vertex
unit
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
CN201710252223.0A
Other languages
Chinese (zh)
Other versions
CN107391533B (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710252223.0A priority Critical patent/CN107391533B/en
Publication of CN107391533A publication Critical patent/CN107391533A/en
Application granted granted Critical
Publication of CN107391533B publication Critical patent/CN107391533B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9038Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A kind of method and device for generating graphic data base Query Result, to optimize the bandwagon effect of graphic data base Query Result.Wherein, method includes:Graphic data base is inquired about according to the summit ID of input, obtains corresponding with summit ID subgraph, the pel element in the subgraph includes summit and the side being connected between two summits;According to the type of each pel element in the subgraph, at least one displaying desired value related to the type is determined;According to the displaying desired value, to be presented figure of the generation comprising the pel element for being used to describe the displaying desired value is simultaneously shown.

Description

Generate the method and device of graphic data base Query Result
Technical field
The application is related to database technical field, more particularly to a kind of method and dress for generating graphic data base Query Result Put.
Background technology
Graphic data base (Graph Database) is that the entity (Object) in real world is abstracted as into summit (Vertex) relation between entity and entity, is abstracted as the database that side (Edge) stored, is applied to many necks Domain.Generally, the figure of graph data library storage includes digraph (Oriented Graph) and non-directed graph (Undirected Graph).User can be obtained and the subgraph of some vertex correspondence (Subgraph) by query image database.With oriented , can be to look into when user inputs some summit ID to be checked and behind given query direction exemplified by scheming (Oriented Graph) Ask and obtain to put the subgraph for beginning or end corresponding to the ID of the summit.What the subgraph for inquiring about to obtain generally, due to user included Number of vertex and side number are very more, on the one hand, user is not easy to from inquiry obtained subgraph quick obtaining to some overviews Information;On the other hand, the memory space shared by subgraph inquired is also larger, influences search efficiency.
The content of the invention
In view of this, the application provides a kind of method and device for generating graphic data base Query Result.
To achieve the above object, the technical scheme that the application provides is as follows:
According to the first aspect of the application, it is proposed that a kind of method for generating graphic data base Query Result, including:
Graphic data base is inquired about according to the summit ID of input, subgraph corresponding with the summit ID is obtained, wherein the son Pel element in figure includes summit and the side being connected between two summits;
According to the type of each pel element in the subgraph, at least one displaying index related to the type is determined Value;
According to the displaying desired value, generate figure to be presented and show, the figure to be presented, which includes, to be used to describe the exhibition Show the pel element of desired value.
According to the second aspect of the application, it is proposed that a kind of device for generating graphic data base Query Result, described device Including query unit, determining unit and generation unit;
The query unit inquires about graphic data base according to the summit ID of input, obtains son corresponding with the summit ID Scheme, the pel element in the subgraph includes summit and the side being connected between two summits;
The determining unit determines at least one related to the type according to the type of each pel element in the subgraph Displaying desired value;
The generation unit generates figure to be presented and shown, the figure to be presented, which includes, to be used according to the displaying desired value In the pel element for describing the displaying desired value.
According to the third aspect of the application, it is proposed that a kind of computer-readable storage medium, computer program is stored thereon with, should Following steps are realized when computer program is executed by processor:
Graphic data base is inquired about according to the summit ID of input, obtains corresponding with summit ID subgraph, in the subgraph Pel element include summit and the side that is connected between two summits;
According to the type of each pel element in the subgraph, at least one displaying index related to the type is determined Value;
According to the displaying desired value, generate figure to be presented and show, the figure to be presented, which includes, to be used to describe the exhibition Show the pel element of desired value.
It is can be seen that by above technical scheme after inquiry obtains subgraph corresponding with some summit ID, according to subgraph The type of middle pel element, it may be determined that one or more displaying desired values related to the type, finally, utilize the exhibition of determination Show desired value, generate figure to be presented and show, wherein, the figure to be presented includes the pel for being used for describing the displaying desired value Element.Wherein, for the figure to be presented ultimately generated compared to original subgraph, its shared memory space is smaller, improves database Search efficiency;On the other hand, user can check relevant displaying desired value by the figure to be presented of generation come quick, and lifting user obtains Take the efficiency of useful information.
Brief description of the drawings
Fig. 1 shows a kind of flow of the method for generation graphic data base Query Result that an exemplary embodiment provides;
Fig. 2 shows a kind of structure for digraph that an exemplary embodiment provides;
Fig. 3 shows the structure for the subgraph inquired that an exemplary embodiment provides;
Fig. 4 shows a kind of structure of the figure to be presented for the generation that an exemplary embodiment provides;
Fig. 5 shows the structure of another figure to be presented for the generation that an exemplary embodiment provides;
Fig. 6 shows the structure for a kind of electronic equipment that an exemplary embodiment provides;
Fig. 7 shows a kind of block diagram of the device for generation graphic data base Query Result that an exemplary embodiment provides;
Fig. 8 shows the frame of the device for another generation graphic data base Query Result that an exemplary embodiment provides Figure.
Embodiment
Generally, in graphic data base (Graph Database), the summit (Vertex) in figure (Graph) is representative Entity (Object) can be:People, thing, the object of objective reality, the event of abstract entities, form, task dispatching, figure (Graph) relation representated by side (Edge) in can be:Dependence, social relationships etc..Each top in figure (Graph) Point possesses vertex attribute (Vertex Property), and vertex attribute refers to corresponding entity attributes (age of such as people, name Deng);Each edge in figure (Graph) also possesses side attribute (Edge Property), and side attribute refers between corresponding entity The attribute of relation.Graphic data base can be applied to structure social networks, public traffic network, map and network and open up spectrum etc.. In correlation technique, because the subgraph (Subgraph) that user inquires about to obtain usually contains very more number of vertex and side number, make User is not easy from inquiry obtained subgraph quick obtaining to some profile informations.It is proposed to this end that the application's is as follows Scheme.In one embodiment, the graph data query engine instrument or data storage facility for realizing following proposal include but It is not limited to:geabase、Neo4J、titan、GraphDB、MYSQL、ADS、HBASE、ODPS、HIVE、ORACLE、GREENPLUM Deng.
Fig. 1 shows a kind of flow of the method for generation graphic data base Query Result that an exemplary embodiment provides. As shown in figure 1, in one embodiment, this method comprises the steps 101~103, wherein:
In a step 101, graphic data base is inquired about according to the summit ID of input, obtains son corresponding with the summit ID Figure.Wherein, the pel element in the subgraph includes summit and the side being connected between two summits.
Figure in graphic data base generally can be divided into digraph (Oriented Graph) and non-directed graph (Undirected Graph), its query process is less identical.In one embodiment, if the figure stored in graphic data base to be checked is undirected Figure, then only need to input the i.e. achievable inquiry of summit ID to be checked.In another embodiment, if graphic data base to be checked The figure of middle storage is digraph, then user is while summit ID to be checked is inputted, it is also necessary to given query direction, its In, the inquiry direction can be:Direction using the summit corresponding to the summit ID of input as starting point, or the summit ID institutes with input Corresponding summit is the direction of terminal.
Shown in cooperation reference picture 2, Fig. 3, in the example of digraph, each summit in digraph is used to identify with one The summit ID of the unique identities on the summit is corresponding, such as:A, b, c, also, each vertex correspondence is in a kind of vertex type (Vertex Type), such as:type1、type2.Based on the digraph (Oriented Graph) shown in Fig. 2, if what user inputted Summit ID to be checked is a, and the inquiry direction specified is:Direction using the summit corresponding to the summit ID of input as starting point, then look into Obtained subgraph is ask as shown in figure 3, wherein, the subgraph is made up of summit a, b, c, d, e, f, g, h, wherein summit a is the subgraph Starting point.On the contrary, if the summit ID to be checked of user's input is a, the inquiry direction specified is:With corresponding to the summit ID of input Summit be terminal direction, then the subgraph for inquiring about to obtain is made up of summit a, j, i, q, k, p, and wherein summit a is the subgraph Terminal.
In a step 102, according to the type of each pel element in the subgraph, determine at least one related to the type Displaying desired value.
Displaying desired value is generally used for reflecting the index of correlation that the user of graphic data base is actually needed.For user For, after graphic data base is inquired about, it is desirable at least one index wanted to know about is quickly learned from Query Result.It is actual With when, user can adjust or set one or more indexs according to self-demand.In one embodiment, above-mentioned displaying index Value can include but is not limited to following at least one:
1. the number of types on summit in subgraph;
2. belong to the number of vertex of each type in subgraph;
3. the vertex type side number consistent with terminal type is played in subgraph.
It will be illustrated herein so that above-mentioned three kinds show desired value as an example.
In one embodiment, the step 102 can be realized by procedure below:
Step 1021:The type on each summit in the subgraph obtained according to inquiry, obtains quaternary group information, wherein, four-tuple Information includes starting point ID, plays vertex type, terminal ID and terminal type.
In the example shown in Fig. 3, the quaternary group information of acquisition is as shown in table 1.
Table 1:
Starting point ID Play vertex type Terminal ID Terminal type
a type1 b type2
a type1 c type1
b type2 d type2
b type2 e type2
c type1 d type2
d type2 f type3
d type2 g type3
e type2 h type3
Step 1022:Quaternary group information based on acquisition, the vertex type side number consistent with terminal type is counted.
Based on table 1, count to obtain to play the vertex type side number consistent with terminal type as shown in table 2.
Table 2:
Play vertex type Terminal type The quantity on side
type1 type1 1
type2 type2 2
type1 type2 2
type2 type3 3
Step 1023:Quaternary group information based on acquisition, statistics belong to the number of vertex of each type.
Based on table 1, the number of vertex for belonging to each type for counting to obtain is as shown in table 3.Wherein, it is same under certain type Individual vertice counts are once.
Table 3:
Terminal type Belong to summit (i.e. terminal) number of the type
type1 1
type2 3
type3 3
In step 103, the pel element for being used to describe the displaying desired value is included according to the displaying desired value, generation Figure to be presented and show.
In one embodiment, the step 103 can be realized by procedure below:
Step 1031:Draw target point corresponding with each vertex type in the subgraph inquired.
Step 1032:Mark belong to the number of vertex of the type respectively for each target point of drafting.
Step 1033:Vertex type and terminal type are played according to statistics, drafting is connected on a target point or is connected to Directed edge between two target points.
Step 1034:The vertex type side number consistent with terminal type has been marked respectively for each directed edge of drafting.
Fig. 4 is a kind of figure to be presented generated according to above-mentioned table 2 and table 3, wherein, during the figure is generated, first, Three points are drawn out, the ID of these three points is respectively:type1、type2、type3.Then, according to the number for counting to obtain in table 3 Value, respectively ID are " type1 ", " type2 ", the corresponding numerical value of point mark of " type3 ":1st, 3,3 (can by ID and numerical value with Certain form is labeled in a little).Then, according to table 2, it is " type2 " that drafting one, which is connected to the point that ID is " type1 " and ID, Directed edge between point, a directed edge being connected between the point that ID is " type2 " and the point that ID is " type3 ", Yi Jiyi Directed edge of the bar start, end on the point that ID is " type2 ".Finally, according to table 2, marked respectively on above-mentioned three directed edges Note corresponding numerical value.By showing the figure to be presented shown in above-mentioned Fig. 4 to user, user can quickly view inputted top Point ID is common for the downstream (being inquired about using the summit as starting point) on the summit of " a " or upstream (being inquired about using the summit as terminal) The summit of how many type, how many summit, how many bar side of a type to another type etc. is believed under each type Breath.Especially when the subgraph inquired is complex, the process of user's Query Information and acquisition information can be highly efficient.
In another embodiment, above-mentioned steps 102 can be realized by procedure below:
Step 1021:According to the type on each summit in the subgraph, quaternary group information is obtained, wherein quaternary group information includes Starting point ID, play vertex type, terminal ID and terminal type.
Similarly, in the example shown in Fig. 3, the quaternary group information of acquisition is as listed in Table 1.
Step 1025:Play vertex type by corresponding with the summit ID of input in the quaternary group information of acquisition and replace with the top Point ID.
In the example shown in Fig. 3, the quaternary group information obtained after replacement is as shown in table 4.
Table 4:
Step 1026:Based on the quaternary group information obtained after replacement, the vertex type side number consistent with terminal type has been counted.
In the example shown in Fig. 3, according to above-mentioned table 4, the vertex type side number consistent with the terminal type such as institute of table 5 has been counted Show.
Table 5:
Play vertex type Terminal type The quantity on side
a type2 1
a type1 1
type2 type2 2
type1 type2 1
type2 type3 3
Step 1027:Based on the quaternary group information before replacement, statistics belongs to the number of vertex of each type.
The obtained number of vertex for belonging to each type is counted as shown in upper table 3.
Finally, summit corresponding to the summit ID of input is added into above-mentioned table 3, obtains table 6:
Vertex type Number of vertex under the type
a 1
type1 1
type2 3
type3 3
According to above-mentioned table 5 and table 6, figure to be presented as shown in Figure 5 can be finally generated.Wherein, in order to further improve exhibition Show effect, the present embodiment can increase the summit that the ID that is queried is " a " on the basis of above-mentioned Fig. 4, so as to which user is from the figure In can view the summit for having which type that is joined directly together of summit that ID is " a ".
In other possible embodiments, the form of the figure to be presented of generation, the figure element type included and displaying desired value Mark mode is not limited to example shown in Fig. 4 or Fig. 5, no longer enumerate herein.
In the above example that the application provides, after inquiry obtains subgraph corresponding with some summit ID, according to subgraph The type of middle pel element, it may be determined that one or more displaying desired values related to the type, finally, utilize the exhibition of determination Show desired value, generate figure to be presented and show, wherein, the figure to be presented includes the pel for being used for describing the displaying desired value Element.Wherein, for the figure to be presented ultimately generated compared to original subgraph, its shared memory space is smaller, improves database Search efficiency;On the other hand, user can check relevant displaying desired value by the figure to be presented of generation come quick, and lifting user obtains Take the efficiency of useful information.
Fig. 6 shows the structure for a kind of electronic equipment that an exemplary embodiment provides.As shown in fig. 6, the electronics is set Standby can be graphic data base server, the electronic equipment can including processor, internal bus, network interface, internal memory and Nonvolatile memory, the hardware being also possible that certainly required for other business.Processor is read from nonvolatile memory Computer program corresponding to taking is into internal memory and then runs, and a kind of generation graphic data base Query Result is formed on logic level Device.Certainly, in addition to software realization mode, the application is not precluded from other implementations, for example, logical device or Mode of software and hardware combining etc., that is to say, that the executive agent of following handling process is not limited to each logic unit, Can be hardware or logical device.
As shown in fig. 7, in one embodiment, a kind of device 200 for generating graphic data base Query Result, including cargo tracer Member 201, determining unit 202 and generation unit 203, wherein:
Query unit 201 is configured as inquiring about graphic data base according to the summit ID of input, obtains and ID pairs of the summit The subgraph answered, the pel element in the subgraph include summit and the side being connected between two summits.
Determining unit 202 is configured as the type according to each pel element in the subgraph, determine it is at least one with it is described The related displaying desired value of type.
Generation unit 203 is configured as according to the displaying desired value, and generation, which includes, to be used to describe the displaying desired value Pel element figure to be presented and show.
Displaying index is usually the index viewed required for the user of graphic data base, during practice, Yong Huke One or more indexs are adjusted or set according to self-demand.In one embodiment, the displaying index can be included but not The one or more being limited in following indexs:
1. the number of types on summit in subgraph;
2. belong to the number of vertex of each type in subgraph;
3. the vertex type side number consistent with terminal type is played in subgraph.
Other feasible indexs are for example:Clustered according to the type on side, obtain belonging to each side type
The quantity on side, etc..
In one embodiment, if the figure stored in graphic data base to be checked is digraph, the query unit 201 are configured as:According to the summit ID of input and inquiry direction query graph graphic data storehouse, acquisition is corresponding with the summit ID to be had To subgraph, wherein summit corresponding to the summit ID is the beginning or end of the directed subgraph.
As shown in figure 8, in another embodiment, in a kind of device 200 ' for generating graphic data base Query Result, including Query unit 201, determining unit 202 and generation unit 203, wherein, on the basis of the device 200 shown in figure 7 above, this is true Order member 202 can specifically include:
Quaternary group information obtaining unit 2021, the type according to each summit in the subgraph is configured as, obtains four-tuple Information, wherein quaternary group information include starting point ID, play vertex type, terminal ID and terminal type.
Statistic unit 2022, it is configured as being based on the quaternary group information, it is consistent with terminal type has counted vertex type Side number;And/or the number of vertex of each type is belonged to based on the quaternary group information, statistics.
Wherein, in one embodiment, the statistic unit 2022 can also further comprise:
Replacement unit, it is configured as the vertex type that rises corresponding with the summit ID of input in the quaternary group information by acquisition and replaces For the summit ID.
Side number statistic unit, it is configured as, based on the quaternary group information obtained after replacement, having counted vertex type and terminal class The quantity on the consistent side of type.
In one embodiment, the generation unit 203 can specifically include:
Point-rendering unit 2031, it is configured as drawing target point corresponding with each vertex type in the subgraph.
Point mark unit 2032, each target point being configured as drafting mark the number of vertex for belonging to the type respectively.
Edge drawing unit 2033, it is configured as playing vertex type and terminal type according to statistics, drafting is connected to a mesh On punctuate or the directed edge that is connected between two target points.
Side marks unit 2034, is configured as having marked vertex type and terminal type one respectively for each directed edge of drafting The side number of cause.
As can be seen that the technical scheme provided by above example, be able to will be looked into during graphic data base is inquired about The complex subgraph ask, it is polymerize for one or more displaying index, changes into a relatively simple general view Scheme (i.e. above-mentioned figure to be presented), consequently facilitating the user of graphic data base check at a glance required for information, can be Exploitation and the efficiency of management of some projects are greatly promoted to a certain extent.
It should be noted that on the premise of not disagreing, said apparatus embodiment and above method embodiment can be each other Supplement.
System, device, module or the unit that above-described embodiment illustrates, it can specifically be realized by computer chip or entity, Or realized by the product with certain function.One kind typically realizes that equipment is computer, and the concrete form of computer can To be personal computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet PC, wearable device or these equipment The combination of any several equipment.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, this is being implemented The function of each unit can be realized in same or multiple softwares and/or hardware during application.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and internal memory.
Internal memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability Comprising so that process, method, commodity or equipment including a series of elements not only include those key elements, but also wrapping Include the other element being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described Other identical element also be present in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product. Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code The shape for the computer program product that storage media is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The application can be described in the general context of computer executable instructions, such as program Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these DCEs, by Task is performed and connected remote processing devices by communication network.In a distributed computing environment, program module can be with In the local and remote computer-readable storage medium including storage device.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment stressed is the difference with other embodiment.It is real especially for system For applying example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
Embodiments herein is the foregoing is only, is not limited to the application.For those skilled in the art For, the application can have various modifications and variations.All any modifications made within spirit herein and principle, it is equal Replace, improve etc., it should be included within the scope of claims hereof.

Claims (13)

  1. A kind of 1. method for generating graphic data base Query Result, it is characterised in that methods described includes:
    Graphic data base is inquired about according to the summit ID of input, subgraph corresponding with the summit ID is obtained, wherein in the subgraph Pel element include summit and the side that is connected between two summits;
    According to the type of each pel element in the subgraph, at least one displaying desired value related to the type is determined;
    According to the displaying desired value, generate figure to be presented and show, the figure to be presented includes to be referred to for describing the displaying The pel element of scale value.
  2. 2. according to the method for claim 1, it is characterised in that the displaying desired value includes following at least one:
    The number of types on summit in subgraph;
    Belong to the number of vertex of each type in subgraph;
    The vertex type side number consistent with terminal type is played in subgraph.
  3. 3. according to the method for claim 1, it is characterised in that it is described that graphic data base is inquired about according to the summit ID of input, Subgraph corresponding with the summit ID is obtained, including:
    According to the summit ID of input and inquiry direction query graph graphic data storehouse, directed subgraph corresponding with the summit ID is obtained, Summit corresponding to wherein described summit ID is the beginning or end of the directed subgraph.
  4. 4. according to the method for claim 1, it is characterised in that the type according to each pel element in the subgraph, At least one displaying desired value related to the type is determined, including:
    According to the type on each summit in the subgraph, quaternary group information is obtained, wherein quaternary group information includes starting point ID, starting point class Type, terminal ID and terminal type;
    Based on the quaternary group information, the vertex type side number consistent with terminal type has been counted;And/or based on the quaternary Group information, statistics belong to the number of vertex of each type.
  5. 5. according to the method for claim 4, it is characterised in that it is described to be based on the quaternary group information, count vertex type The side number consistent with terminal type, including:
    The vertex type that rises corresponding with the summit ID of input in the quaternary group information of acquisition is replaced with into the summit ID;
    Based on the quaternary group information obtained after replacement, the quantity on the vertex type side consistent with terminal type has been counted.
  6. 6. the method according to claim 1 or 4, it is characterised in that described to be presented according to the displaying desired value, generation Figure, including:
    Draw target point corresponding with each vertex type in the subgraph;
    Mark belong to the number of vertex of the type respectively for each target point of drafting;
    Vertex type and terminal type are played according to statistics, drafting is connected on a target point or is connected between two target points Directed edge;
    The vertex type side number consistent with terminal type has been marked respectively for each directed edge of drafting.
  7. 7. a kind of device for generating graphic data base Query Result, it is characterised in that described device includes query unit, determines list Member and generation unit;
    The query unit inquires about graphic data base according to the summit ID of input, obtains subgraph corresponding with the summit ID, institute Stating the element of the pel in subgraph includes summit and the side being connected between two summits;
    The determining unit determines at least one exhibition related to the type according to the type of each pel element in the subgraph Show desired value;
    The generation unit generates figure to be presented and shown, the figure to be presented, which includes, to be used to retouch according to the displaying desired value State the pel element of the displaying desired value.
  8. 8. device according to claim 7, it is characterised in that the displaying desired value includes following at least one:
    The number of types on summit in subgraph;
    Belong to the number of vertex of each type in subgraph;
    The vertex type side number consistent with terminal type is played in subgraph.
  9. 9. device according to claim 7, it is characterised in that the query unit is according to the summit ID of input and issuer To inquiry graphic data base, directed subgraph corresponding with the summit ID is obtained, wherein summit corresponding to the summit ID is institute State the beginning or end of directed subgraph.
  10. 10. device according to claim 7, it is characterised in that the determining unit includes quaternary group information obtaining unit And statistic unit;:
    The quaternary group information obtaining unit obtains quaternary group information, wherein quaternary according to the type on each summit in the subgraph Group information includes starting point ID, plays vertex type, terminal ID and terminal type;
    The statistic unit is based on the quaternary group information, has counted the vertex type side number consistent with terminal type;And/or Based on the quaternary group information, statistics belongs to the number of vertex of each type.
  11. 11. device according to claim 10, it is characterised in that the statistic unit includes replacement unit and side number counts Unit;
    The replacement unit plays corresponding with the summit ID of input in the quaternary group information of acquisition vertex type and replaces with the top Point ID;
    The side number statistic unit has counted the vertex type side consistent with terminal type based on the quaternary group information obtained after replacement Quantity.
  12. 12. the device according to claim 7 or 10, it is characterised in that the generation unit includes point-rendering unit, point mark Note unit, edge drawing unit and side mark unit;
    The point-rendering unit draws target point corresponding with each vertex type in the subgraph;
    The point mark unit marks the number of vertex for belonging to the type respectively for each target point drawn;
    The edge drawing unit plays vertex type and terminal type according to statistics, and drafting is connected on a target point or is connected to Directed edge between two target points;
    It is described to have marked the vertex type while number consistent with terminal type respectively in mark unit for each directed edge drawn.
  13. 13. a kind of computer-readable storage medium, is stored thereon with computer program, it is characterised in that the computer program is processed Device realizes following steps when performing:
    Graphic data base is inquired about according to the summit ID of input, obtains corresponding with summit ID subgraph, the figure in the subgraph Element includes summit and the side being connected between two summits;
    According to the type of each pel element in the subgraph, at least one displaying desired value related to the type is determined;
    According to the displaying desired value, generate figure to be presented and show, the figure to be presented includes to be referred to for describing the displaying The pel element of scale value.
CN201710252223.0A 2017-04-18 2017-04-18 Method and device for generating query result of graphic database Active CN107391533B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710252223.0A CN107391533B (en) 2017-04-18 2017-04-18 Method and device for generating query result of graphic database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710252223.0A CN107391533B (en) 2017-04-18 2017-04-18 Method and device for generating query result of graphic database

Publications (2)

Publication Number Publication Date
CN107391533A true CN107391533A (en) 2017-11-24
CN107391533B CN107391533B (en) 2020-04-07

Family

ID=60338296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710252223.0A Active CN107391533B (en) 2017-04-18 2017-04-18 Method and device for generating query result of graphic database

Country Status (1)

Country Link
CN (1) CN107391533B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532317A (en) * 2019-08-26 2019-12-03 北京百度网讯科技有限公司 Case analysis data processing method, device, equipment and readable storage medium storing program for executing
CN110543528A (en) * 2019-07-30 2019-12-06 深圳众赢维融科技有限公司 Information display method and device, electronic equipment and storage medium
CN111814001A (en) * 2019-04-11 2020-10-23 杭州海康威视数字技术股份有限公司 Method and device for feeding back information

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007140707A (en) * 2005-11-15 2007-06-07 Nippon Telegr & Teleph Corp <Ntt> Graph retrieval device
US20080243908A1 (en) * 2007-03-29 2008-10-02 Jannes Aasman Method for Creating a Scalable Graph Database Using Coordinate Data Elements
CN101620606A (en) * 2008-06-30 2010-01-06 国际商业机器公司 The method and system of automatically generated data library inquiry
CN102193988A (en) * 2011-03-25 2011-09-21 北京世纪互联工程技术服务有限公司 Method and system for retrieving node data in graphic database
CN102332009A (en) * 2011-09-02 2012-01-25 北京大学 Relational query method implemented on large-scale data set
CN104679764A (en) * 2013-11-28 2015-06-03 方正信息产业控股有限公司 Method and device for searching graph data
CN105956114A (en) * 2016-05-05 2016-09-21 南京邮电大学 Method for searching pattern matching subgraphs based on tag graph
CN106227800A (en) * 2016-07-21 2016-12-14 中国科学院软件研究所 The storage method of the big data of a kind of highlights correlations and management system
CN106294655A (en) * 2016-08-04 2017-01-04 华东师范大学 The data clearing method of the RDF directed acyclic graph inquiry that a kind of starting point determines
CN106547809A (en) * 2015-09-18 2017-03-29 邻客音公司 Complex relation is represented in chart database

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007140707A (en) * 2005-11-15 2007-06-07 Nippon Telegr & Teleph Corp <Ntt> Graph retrieval device
US20080243908A1 (en) * 2007-03-29 2008-10-02 Jannes Aasman Method for Creating a Scalable Graph Database Using Coordinate Data Elements
CN101620606A (en) * 2008-06-30 2010-01-06 国际商业机器公司 The method and system of automatically generated data library inquiry
CN102193988A (en) * 2011-03-25 2011-09-21 北京世纪互联工程技术服务有限公司 Method and system for retrieving node data in graphic database
CN102332009A (en) * 2011-09-02 2012-01-25 北京大学 Relational query method implemented on large-scale data set
CN104679764A (en) * 2013-11-28 2015-06-03 方正信息产业控股有限公司 Method and device for searching graph data
CN106547809A (en) * 2015-09-18 2017-03-29 邻客音公司 Complex relation is represented in chart database
CN105956114A (en) * 2016-05-05 2016-09-21 南京邮电大学 Method for searching pattern matching subgraphs based on tag graph
CN106227800A (en) * 2016-07-21 2016-12-14 中国科学院软件研究所 The storage method of the big data of a kind of highlights correlations and management system
CN106294655A (en) * 2016-08-04 2017-01-04 华东师范大学 The data clearing method of the RDF directed acyclic graph inquiry that a kind of starting point determines

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
LEIZOU: "TOP-K Correlation Sub-graph Search in Graph Database", 《PROEEEDINGS OF 14TH INTEMATIONAL CONFERENEE ON DATABASE SYSTEMS FOR ADVANCED APPLICATIONS(DASFAA》 *
张海威: "一种基于自适应结构概要的有向标签图子图匹配查询算法", 《软件学报》 *
李燕: "基于单邻域的子图查询算法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
杜方: "RDF数据查询处理技术综述", 《软件学报》 *
焦晓翠: "基于V_index的子图查询算法的研究与实现", 《中国优秀硕士学位论文全文数据库 社会科学Ⅱ辑》 *
王会会: "精确子图数据库查询技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
邹磊: "图数据库中的子图查询算法研究", 《中国博士学位论文全文数据库 信息科技辑》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111814001A (en) * 2019-04-11 2020-10-23 杭州海康威视数字技术股份有限公司 Method and device for feeding back information
CN111814001B (en) * 2019-04-11 2024-05-10 杭州海康威视数字技术股份有限公司 Method and device for feeding back information
CN110543528A (en) * 2019-07-30 2019-12-06 深圳众赢维融科技有限公司 Information display method and device, electronic equipment and storage medium
CN110532317A (en) * 2019-08-26 2019-12-03 北京百度网讯科技有限公司 Case analysis data processing method, device, equipment and readable storage medium storing program for executing
CN110532317B (en) * 2019-08-26 2022-06-14 北京百度网讯科技有限公司 Case analysis data processing method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN107391533B (en) 2020-04-07

Similar Documents

Publication Publication Date Title
WO2017215370A1 (en) Method and apparatus for constructing decision model, computer device and storage device
US20150032708A1 (en) Database analysis apparatus and method
CN106557486A (en) A kind of storage method and device of data
US10650559B2 (en) Methods and systems for simplified graphical depictions of bipartite graphs
CN106649316A (en) Video pushing method and device
CN111159184B (en) Metadata tracing method and device and server
CN107016001A (en) A kind of data query method and device
CN108710654B (en) Public opinion data visualization method and equipment
CN111046237A (en) User behavior data processing method and device, electronic equipment and readable medium
CN107705199A (en) The generation method and device of feature calculation code
CN115544183B (en) Data visualization method, device, computer equipment and storage medium
US9606997B2 (en) Inferred operations for data analysis
CN110119401A (en) Processing method, device, server and the storage medium of user&#39;s portrait
CN107391533A (en) Generate the method and device of graphic data base Query Result
CN106991090A (en) The analysis method and device of public sentiment event entity
Amirkhanyan et al. Real-time clustering of massive geodata for online maps to improve visual analysis
CN114372060A (en) Data storage method, device, equipment and storage medium
CN104573132B (en) Song lookup method and device
CN110363206A (en) Cluster, data processing and the data identification method of data object
CN111444368B (en) Method and device for constructing user portrait, computer equipment and storage medium
CN112100177A (en) Data storage method and device, computer equipment and storage medium
CN108429632B (en) Service monitoring method and device
CN109582476A (en) Data processing method, apparatus and system
CN113570464B (en) Digital currency transaction community identification method, system, equipment and storage medium
CN106372081A (en) Form identifier generation method, form diversion method and apparatus

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200923

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200923

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.