Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of a method for visualizing a reference relationship of a digital object identifier according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step 101: acquiring a digital object identifier DOI (data object identifier) to be inquired and a reference relation level corresponding to an object to be inquired, which are input by a user;
specifically, a user inputs DOI numbers and reference relationship hierarchies of objects to be queried at a user terminal, wherein one object to be queried and the DOI numbers correspond to each other one by one, in addition, the objects to be queried can be used for guiding other objects, and the guided objects can be used for guiding, so that a multi-level reference relationship is formed, and the user can set the reference relationship hierarchies according to own requirements. The device acquires the DOI number and the reference relation level corresponding to the object to be queried, which are input by a user.
Step 102: acquiring corresponding DOI node data and a first relation node having an affiliation with the DOI number to be inquired from a data graph model according to the DOI number to be inquired, and acquiring a second relation node having a reference relation with the DOI number to be inquired of a corresponding level from the data graph model according to the reference relation level;
specifically, a pre-constructed data graph model is obtained, the data graph model comprises a plurality of DOI nodes and the subordinate relation or the reference relation among the DOI nodes, the device obtains corresponding DOI node data and first relation nodes with the subordinate relation with the DOI number to be inquired from the data graph model according to the obtained DOI number to be inquired, and obtains corresponding levels of second relation nodes with the reference relation with the DOI number to be inquired from the data graph model according to the reference relation level. It should be noted that the dependency relationship is a parent-child relationship identifier of the DOI node to be queried, the reference relationship is a reference relationship between the DOI node to be queried and other DOI nodes, and the reference relationship includes an indexing relationship and a quoted relationship.
Step 103: and sending the graph constructed by the DOI node data, the first relation node, the second relation node, the subordinate relation and the reference relation to a user terminal as a query result.
Specifically, because the data graph model includes the dependency relationship or the reference relationship among the nodes, after the first relationship node and the second relationship node corresponding to the DOI node to be queried are obtained, the DOI node data, the first relationship node, the second relationship node, the dependency relationship and the reference relationship can construct a graph of the relationship among the nodes, the graph is used as a query result, and the query result is sent to the user terminal. It should be noted that the DOI node data includes DOI nodes and attribute data of an object to be queried, the DOI nodes, the first relationship nodes and the second relationship nodes are represented by circles in the graph, a directional arrow is arranged between the DOI nodes and the first relationship nodes, the directional arrow indicates an affiliation, a directional arrow is arranged between the DOI nodes and the second relationship nodes, and the directional arrow indicates a reference relationship.
For example: fig. 2 is a schematic flow chart of a method for visualizing a reference relationship of a digital object identifier according to an embodiment of the present invention, as shown in fig. 2, including:
the device obtains a DOI number to be inquired and a reference relation level corresponding to an object to be inquired, wherein the DOI number to be inquired is the DOI number of an article 3, the reference relation level is 1, the device obtains DOI nodes corresponding to the article 3 and attribute data of the article 3 from a data graph model according to the DOI number to be inquired, and the attribute data comprise: it can be understood that the attribute data may also include other attribute information of the article 3, which is not specifically limited in this embodiment of the present invention, and the DOI node corresponding to the article 3 and the attribute data of the article 3 constitute DOI node data. First relationship nodes having an affiliation with the article 3 can also be obtained from the data graph model, as can be seen from fig. 2, the first relationship nodes include a term 1 node, a publication a node and a publisher node, and each first relationship node is indicated by a directional arrow with a corresponding DOI node of the article 3, and an association relationship is marked on the directional arrow. And acquiring second relation nodes of the first-level reference relation according to the reference relation hierarchy set by the user, wherein the second relation nodes comprise article 1 nodes, article 2 nodes, article A nodes and paragraph nodes, each second relation node and the DOI node corresponding to the article 3 are indicated by a directional arrow, and the association relation is marked on the directional arrow. Since the user specifies that the reference relationship hierarchy is 1, the second relationship node does not include the article 1 node, the article 2 node, the article a node, and the next-level reference relationship after the paragraph node. It should be noted that the dependency relationship between the first relationship node and the second relationship node may also be noted.
According to the embodiment of the invention, the DOI node data and the first relation node having the dependency relationship with the DOI number to be inquired are obtained from the data graph model according to the DOI number to be inquired, the second relation node is obtained according to the reference relationship level, and finally the constructed graph is used as the query result and is sent to the user terminal, so that the user can visually obtain the reference relationship among all the nodes.
On the basis of the above embodiment, the method further includes:
obtaining DOI metadata corresponding to an object in the data graph model, wherein the DOI metadata comprise a DOI number, attribute data, a first relation node with an affiliation relation with the DOI number and a second relation node with a reference relation with the DOI number;
establishing a DOI node according to the DOI number, and storing the DOI number and corresponding attribute data into the DOI node to form DOI node data;
and establishing association relations between the DOI nodes and the first relation nodes respectively according to the subordination relations, and establishing association relations between the DOI nodes and the second relation nodes according to the reference relations so as to construct the data graph model.
Specifically, a data graph model is constructed in advance, the data graph model comprises a plurality of objects, each object has corresponding DOI metadata, and the DOI metadata comprises a DOI number, attribute data, a first relation node with an affiliation relation with the DOI number and a second relation node with a reference relation with the DOI number. And finally, establishing an association relationship between the DOI number and the first relationship node according to the dependency relationship, and establishing an association relationship between the DOI number and the second relationship node according to the reference relationship. And constructing each object in the data graph model by using the method, and finally obtaining the complete data graph model. It should be noted that after creation is complete, the data diagram model is stored in the database. Fig. 3 is a schematic diagram of a node and a reference relationship of DOI data of periodicals provided in an embodiment of the present invention, where as shown in fig. 3, an object a is a node to be inserted into a data model, DOI metadata corresponding to an article a includes a DOI number a, attribute data is not shown in the diagram, a type X of the publication having an affiliation with the article a, an article B having a reference relationship with the article a, a node of the type X of the publication and the type X of the publication is created, then an affiliation is established between the article a and the type X of the publication, and an indexing relationship is established between the article a and the article.
According to the embodiment of the invention, the data graph model is created in advance, so that when a user inquires an object, the nodes related to the object can be displayed in a graph form, and the user can conveniently know the object.
On the basis of the above embodiment, the establishing a DOI node according to the DOI number, and storing the DOI number and corresponding attribute data into the DOI node includes:
judging whether the DOI exists in the data graph model or not, if not, establishing a DOI node according to the DOI, and storing the DOI and corresponding attribute data into the DOI node;
specifically, when creating a DOI node for an object, first, it may be queried in the data graph model whether a DOI number of the object already exists, if not, the DOI node may be created according to the DOI number, and the DOI number and attribute data in metadata of the object are stored in the DOI node to form DOI node data.
Accordingly, the method can be used for solving the problems that,
the establishing of the association relationship between the DOI nodes and the first relationship nodes respectively according to the subordination relationship and the establishing of the association relationship between the DOI nodes and the second relationship nodes according to the reference relationship to establish and complete the data graph model comprises the following steps:
if the data graph model is judged to have no first relation node with the dependency relationship with the DOI metadata, establishing a corresponding first relation node, and establishing an incidence relationship between the DOI node and the first relation node;
and if the data graph model is judged to have no second relation node having a reference relation with the DOI metadata, establishing a corresponding second relation node, and establishing an association relation between the DOI node and the second relation node.
Specifically, after the DOI node data is created, whether a first relation node having an affiliation with the object exists is searched from the data graph model, if not, a first relation node is automatically created, and then the association relationship between the DOI node and the first relation node is established, that is, the DOI node and the first relation node are connected by a directed arrow and marked as an affiliation.
If the DOI node has a second relation node of the reference relation and the data graph model does not have the second relation node, automatically creating a second relation node, and then establishing the association relation between the DOI node and the second relation node, namely connecting the DOI node and the second relation node by using a directed arrow and marking the DOI node and the second relation node as the reference relation.
It should be noted that after the data graph model is built, the data graph model may be mined, that is, if a node is clicked in the data graph model interface, the relationship node and the related attribute data are displayed, and if the relationship node is further clicked, the relationship of the relationship node may be mined, and the next-level node is further displayed.
According to the embodiment of the invention, the DOI node data and the first relation node having the dependency relationship with the DOI number to be inquired are obtained from the data graph model according to the DOI number to be inquired, the second relation node is obtained according to the reference relationship level, and finally the constructed graph is used as the query result and is sent to the user terminal, so that the user can visually obtain the reference relationship among all the nodes.
On the basis of the above embodiment, the establishing a DOI node according to the DOI number, and storing the DOI number and corresponding attribute data into the DOI node includes:
and judging whether the DOI exists in the data graph model or not, and if so, updating attribute data corresponding to the DOI in the data graph model, a first relation node with an affiliation and a second relation node with a reference relation.
Specifically, because the DOI metadata of the object may change, after the DOI metadata of the object required for constructing the data graph model is obtained, the DOI number is obtained from the DOI metadata, whether the DOI number already exists in the data graph model is determined, and if the DOI number already exists, it is indicated that data in the data graph model needs to be updated, at this time, all attribute data in the DOI node in the data graph model, the first relationship node having the dependency relationship, and the second relationship node having the reference relationship are deleted, and then information in the newly obtained DOI metadata of the object is reconstructed.
According to the embodiment of the invention, the information of the node is updated by judging the DOI node in the data graph model, so that a user can obtain a more accurate result during query.
On the basis of the above embodiment, the obtaining, from the data graph model according to the reference relationship hierarchy, the second relationship node having a reference relationship with the object to be queried at a corresponding hierarchy includes:
and recursively acquiring second relation nodes having reference relations with the DOI to be inquired, and stopping the recursion to acquire the second relation nodes of corresponding hierarchies if the number of recursions is judged to be equal to the reference relation hierarchy.
Specifically, when the corresponding second relationship node is obtained from the data graph model according to the DOI number to be queried, the node is obtained in a recursive mining mode, namely, a first layer of DOI nodes having a direct reference relationship with the DOI number to be queried is obtained first, and after the first layer of DOI nodes is obtained, a second layer of DOI nodes is obtained, and the number of obtained layers is known to reach a reference relationship level set by a user. For example: and if the reference relation level set by the user is 2, the query result obtained after the query is the atlas of the DOI node to be queried, the DOI node A and the DOI node B.
The embodiment of the invention acquires the query result of the corresponding level from the data graph model in a recursive mode, and can accurately return the query result to the user terminal.
On the basis of the above embodiment, the method further includes:
acquiring object metadata of an object to be registered submitted by a user, registering according to the object metadata, and generating a DOI (disk over interface) number corresponding to the object to be registered.
Specifically, the device obtains object metadata of an object to be registered submitted by a user, for example: to register a corresponding DOI number for an article, the submitted object metadata may include: article name, author, date, keyword, etc., and the device generates only one DOI number according to the object metadata and then returns the generated DOI number to the user terminal.
According to the embodiment of the invention, the DOI node data and the first relation node having the dependency relationship with the DOI number to be inquired are obtained from the data graph model according to the DOI number to be inquired, the second relation node is obtained according to the reference relationship level, and finally the constructed graph is used as the query result and is sent to the user terminal, so that the user can visually obtain the reference relationship among all the nodes.
Fig. 4 is a schematic structural diagram of a device for visualizing a reference relationship of identifiers of digital objects according to an embodiment of the present invention, as shown in fig. 4, the device includes: an obtaining module 401, an inquiring module 402 and a sending module 403, wherein:
the obtaining module 401 is configured to obtain a digital object identifier DOI number to be queried and a reference relationship hierarchy corresponding to an object to be queried, which are input by a user; the query module 402 is configured to obtain, according to the DOI number to be queried, corresponding DOI node data and a first relationship node having an affiliation with the DOI number to be queried from a data graph model, and obtain, according to the reference relationship hierarchy, a second relationship node having a reference relationship with the DOI number to be queried from the data graph model at a corresponding hierarchy; the sending module 403 is configured to send, as a query result, the DOI node data, the first relationship node, the second relationship node, the graph constructed by the dependency relationship and the reference relationship to a user terminal.
Specifically, a user inputs DOI numbers and reference relationship hierarchies of objects to be queried at a user terminal, wherein one object to be queried and the DOI numbers correspond to each other one by one, in addition, the objects to be queried can be used for guiding other objects, and the guided objects can be used for guiding, so that a multi-level reference relationship is formed, and the user can set the reference relationship hierarchies according to own requirements. The obtaining module 401 obtains the DOI number and the reference relationship level corresponding to the object to be queried, which are input by the user. The method comprises the steps of obtaining a pre-constructed data graph model, wherein the data graph model comprises a plurality of DOI nodes and the subordination or reference relationship among the DOI nodes, obtaining corresponding DOI node data and first relationship nodes with the subordination with the DOI number to be inquired from the data graph model according to the obtained DOI number to be inquired by an inquiry module 402, and obtaining corresponding levels of second relationship nodes with the reference relationship with the DOI number to be inquired from the data graph model according to the reference relationship levels. It should be noted that the dependency relationship is a parent-child relationship identifier of the DOI node to be queried, the reference relationship is a reference relationship between the DOI node to be queried and other DOI nodes, and the reference relationship includes an indexing relationship and a quoted relationship. Because the data graph model includes the dependency relationship or the reference relationship between the nodes, after the first relationship node and the second relationship node corresponding to the DOI node to be queried are obtained, a graph of the relationship between the nodes can be constructed by the DOI node data, the first relationship node, the second relationship node, the dependency relationship and the reference relationship, and the sending module 403 takes the graph as a query result and sends the query result to the user terminal.
The embodiment of the apparatus provided in the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions of the apparatus are not described herein again, and refer to the detailed description of the above method embodiments.
According to the embodiment of the invention, the DOI node data and the first relation node having the dependency relationship with the DOI number to be inquired are obtained from the data graph model according to the DOI number to be inquired, the second relation node is obtained according to the reference relationship level, and finally the constructed graph is used as the query result and is sent to the user terminal, so that the user can visually obtain the reference relationship among all the nodes.
Fig. 5 is a schematic structural diagram of an entity of an electronic device according to an embodiment of the present invention, and as shown in fig. 5, the electronic device includes: a processor (processor)501, a memory (memory)502, and a bus 503; wherein the content of the first and second substances,
the processor 501 and the memory 502 are communicated with each other through the bus 503;
the processor 501 is configured to call program instructions in the memory 502 to perform the methods provided by the above-mentioned method embodiments, for example, including: acquiring a digital object identifier DOI (data object identifier) to be inquired and a reference relation level corresponding to an object to be inquired, which are input by a user; acquiring corresponding DOI node data and a first relation node having an affiliation with the DOI number to be inquired from a data graph model according to the DOI number to be inquired, and acquiring a second relation node having a reference relation with the DOI number to be inquired of a corresponding level from the data graph model according to the reference relation level; and sending the graph constructed by the DOI node data, the first relation node, the second relation node, the subordinate relation and the reference relation to a user terminal as a query result.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: acquiring a digital object identifier DOI (data object identifier) to be inquired and a reference relation level corresponding to an object to be inquired, which are input by a user; acquiring corresponding DOI node data and a first relation node having an affiliation with the DOI number to be inquired from a data graph model according to the DOI number to be inquired, and acquiring a second relation node having a reference relation with the DOI number to be inquired of a corresponding level from the data graph model according to the reference relation level; and sending the graph constructed by the DOI node data, the first relation node, the second relation node, the subordinate relation and the reference relation to a user terminal as a query result.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: acquiring a digital object identifier DOI (data object identifier) to be inquired and a reference relation level corresponding to an object to be inquired, which are input by a user; acquiring corresponding DOI node data and a first relation node having an affiliation with the DOI number to be inquired from a data graph model according to the DOI number to be inquired, and acquiring a second relation node having a reference relation with the DOI number to be inquired of a corresponding level from the data graph model according to the reference relation level; and sending the graph constructed by the DOI node data, the first relation node, the second relation node, the subordinate relation and the reference relation to a user terminal as a query result.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the apparatuses and the like are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.